General discussion

Locked

In. Dot net framework

By priyananth ·
Hi,

I'm getting a exception of type
'System.ArithmeticException' occurred in system.drawing.dll
Additional information: Overflow or underflow in the arithmetic
operation." when loading a Windows form. This
always occurs in the InitializeComponent routine.

Suggestions please....

-Arjun

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Some things to look at...

by ward In reply to In. Dot net framework

The initialize component routine is called by .NET to perform any startup / initialization actions on the objects that have been added to your form. I am assuming that you have written no code there, so there are a few things to investigate...

Does this happen on every form? Can you create a new form, set it be the startup form, run the program and have to form display?

If this happens on every form, even a "blank, new, virgin" form, then you got something hosed at a deep level. Can you create a new project, and have the same thing happen? Might be re-install time.

If this only occurs on a single form, then one of the controls, or embedded graphics, icons, etc. could be causing the problem. You could either remove controls and re-rerun, attempting to determine which object is making the exception, or you create a new form, verify that it starts, and start moving objects from the bad form to the good one until it breaks.

If this happens on every form, in every project, then you might want to look at a re-install of your tools/dotNet.

Another approach might be to remove all the references to System.Drawing.DLL, recompile and look at any errors generated. The thing to try and determine is whether this is your code problem, a problem in a control or component that someone else has written and you are using, or something is wrong with your installation / registry / configuration in Windows, dotNet, or Visual Studio.

Collapse -

'System.ArithmeticException' & LoaderLock

by p.watkinson In reply to In. Dot net framework

Arjun,

Don't know if your are still stuggling with this but I have had a similar problem. Turned out to be a small app running in the background. If I stopped it, all was OK. Fixed it by downloading latest version. Also had problems with LoaderLock error caused by iTunes.

Try stopping all other apps to see if this resolves your problem.

paul

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums