Thursday, November 03, 2005

Visual Studio .Net 2003 Blues (and greens)

So there, it had to be. Murphy has to intrude everywhere. He and his stupid law; I am fed up of them both. How I wish I could get my hands on his neck... But then, I should get my hands on the necks of all the greats out there, including Newton, Einstein, Archimedes, Galileo etc, and that makes a long list. Mein to thak jaaonga! So the problem now happens with the execution of Visual Studio. It would build the programs, but wouldnt run it. There was a stupid error that something went wrong in the FPU, and its mask was reset (if it all feels Greek to you, please bear with me). The (stupid) error said: An unhandled exception of type 'System.ArithmeticException' occurred in system.drawing.dll Additional information: Overflow or underflow in the arithmetic operation. And nothing else. So I searched around, and came across Aaron's* (somebody at Microsoft) blog. I fired him a mail explaining my plethora and asked him for help. Poor guy, even his angels didnt know of such error. And he wrote to me: "I've done some searches on the internet and in some Microsoft discussion aliases and couldn't find any info that I thought would be helpful in this scenario. Any steps I suggest to you to try to fix this would end up being guess work and I'm afraid they may not work and would end up wasting time." OMG! If you guys cant, then who will? Ahh, I knew I had to do it myself. So I made my search extensive, and then stumbled across the solution!!! Fired a mail to Aaron again (this was the wicked me): Dear Aaron, I am surprised, but not disappointed. I searched through, and finally discovered that this kind of error would occur due to some malfunctioning device driver/program. In my case, it was Yahoo! Messenger's latest version. I uninstalled it and installed an older version, and now VS works fine.

I got to learn from it. Hope this would have been enlightening to you too.

Regards uXuf

LOL. I am sorry Aaron. I couldnt be sarcastic enough!

*Names are changed to protect privacy

5 comments:

JonyBr said...

uXuf, i doubt it has anything to do with Yahoo messenger, how did u find out it was bcos of yahoo?

I would have loved to learn why, did u try to debug? run the code line by line? or catch the exception?

uXuf said...

Oh, I didnt go into technical details, bcuz, you know, err, our audience...

Khair, to get things straight, it was working fine since a few days, with building all the programs and executing them nicely, when suddenly, it went berserk.

Ab jab bhi I d try to add any control in any form, the program wouldnt execute and the exception was thrown, highliting the first control added (pointing the error was occuring somewhere there).

Most of the solutions that I came across while searching also took this as it is some problem with the code, while eventually, there was nothing on my code as such.

Infact, running a fresh program with nothing but a Windows form and a single button added, VS would not execute it. What did it point to? That there is some problem internally.

Then I stumbled across the FPU mask resetting explanation, and a bunch of code that seemingly fixed it. It didnt fix it either.

Aur haan, the latest Yahoo messenger (I don rem the version, whichever is the latest one on vags) was also conflicting with my VGA driver. And my mom primarily uses YM, so I was under constant fire from her (to "fix" the thing). Then I came across some forum where some (Pakistani) guy had narrated the same story with the solution (his modem driver was conflicting with it). So that gave me an idea.

I uninstalled my Sound Driver first, removed a few motherboard utilities, but to no avail. Then I went around my "System Restore" to see which of the applications were installed recently. That included Google Earth and YM. Removing Google Earth didnt prove much of an exercise, while removing YM fixed the problem.

I verified it by again installing the same YM and VS broke down again. Now I am using the older Yahoo Messenger :)

So that was the little way how I went about fixing my (nazuk) VS .Net 2003 (but they really need some swift kicks in the butts for being so ignorant!).

:)

Anonymous said...

remember my programmin days back when i was a 'KID'. this reminded me of why i dint continue: coz of errors that didnt make sense but somehow just had to. (visual basic wasnt that ez now, was it? specially with adodc controls*masoom si shakal banaing.)

JonyBr said...

Sid, VB? u know what, there is a saying in CS geek's world, "programmers stop using VB after puberty" VB is a kiddie toy :p and even when u r data binding u usually use the code manipulation...now who on earth will use ado data control for that ?:p


uXuf: yaar i have Latest Yahoo messenger and VS 2003, both work fine. But Yahoo was downloaded from their site not from the Vags. I downloaded & installed Google Messenger from Vags & it never worked, later i downloaded it from the google site & it worked. Maybe something fishy with the Vags.

But the problem was still interesting, the error is not in ur code its evident, it is (not in but as it shows) in the System.Drawing's namespace, that dll is probably calling win32 functions to draw the controls on screen.

Did the problem only occured when yahoo was on? or even when it was completly shutdown?

uXuf said...

s!d: Cant say more then what JonyDada has already said...

BTW those elusive errors are what make me feel intrigued. I dont think I ll ever get tired of these :)

JonyDada: The YM was the latest one, I dont know, maybe it was conflicting with my board resources. But I am sure it was causing the problem.

Aur yeah, Google Talk isnt working with me either. I thought the port was blocked or something. I'll try to download it now ;)

Rahi VB ki baat, woh to meinay kabhi use hee nahin ki.. shuru say (VB6) hee I thought it looked and felt very much childish, so u know... ;)