Obscure error

J

Jon Vaughan

Hi on executing my code I get the following :

An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.

Additional information: Object reference not set to an instance of an
object.

But when I step through thr code on load and dont get this error , any ideas
waht could be casuing this ?
 
G

Guest

Hi on executing my code I get the following :
An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.

Additional information: Object reference not set to an instance of an
object.

But when I step through thr code on load and dont get this error , any ideas
waht could be casuing this ?

A possible explanation under VS 2003 is that you have run into a bug in the
ide/debugger that I have also seen. When you have a situation that can
reproduce the problem, try running the exe outside the ide/debugger. You may
not be able to reproduce the exception. Go back to the ide/debugger, and the
problem will show up. If all this occurs as I have described, then IMO you
have run into the aforementioned ide/debugger bug.

In all my problems in this area, the 'unknown module' exceptions were rare
and intermittent, so my solution was to ignore them. Do your exceptions
happen rarely? often? always? Also, I have no idea if this problem remains
under VS 2005. Also, I am using FW 1.1, SP1, and since installing SP1, I
don't recall having the problem, although someone else described such a
situation in these newsgroups. Search these newsgroups for "unknown module"
and you will find some interesting reading.
 
J

Jon Vaughan

Happens always on load. By the sounds of it , it is this bug you mentioned.
I think the best thing for me to do is to ignore it and make sure that it
doesnt occur in the final compiled code.

Thanks
 
C

creator_bob

Jon said:
Happens always on load. By the sounds of it , it is this bug you mentioned.
I think the best thing for me to do is to ignore it and make sure that it
doesnt occur in the final compiled code.

Thanks

I had the following happen to me once:

private A as new myClass1
....
....
....
private B as new myClass2(A)

The compiler decided to run B first one day out of the blue and A was
not yet initialized.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top