|
-
Dec 29th, 2003, 03:06 PM
#1
Thread Starter
Member
Debug trouble, Exception occurred in Unknown Module
Hello all,
Does anyone know how to debug for such an error?
An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.
Additional information: Object reference not set to an instance of an object.
I have a procedure that creates a grid of pictureboxes, everything seems to work, until they are visualised on the form.
When that happens I get that weird error message.
Thanks for your advice,
My best for the new year 2004.
-
Dec 29th, 2003, 08:01 PM
#2
Fanatic Member
That exception is usually a result of a missing "New" when you instantiate something.
Put the suspected code in a try catch block and print out the complete message e.tostring(). (also can use breakpoints - but I'm sure you know this already).
-
Dec 30th, 2003, 09:06 AM
#3
Thread Starter
Member
Hello,
It isn't simple to suspect any code, because the errormessage says "in unknonw module."
When I choose Break I get the message "There is no source code available for the current location.".
When I choose Continue, then the programs resumes its activity just as it should, no program disfunction to be seen.
How can you debug for code that isn't found by the debugger itself?
Greetings,
jabar.
-
Dec 30th, 2003, 09:16 AM
#4
Fanatic Member
Are you using a dll in your application? The error might be occuring in that dll, and your application can't step into the dll unless it is part of the same solution and is in Debug mode. Is this the case?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|