Results 1 to 4 of 4

Thread: Debug trouble, Exception occurred in Unknown Module

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2003
    Posts
    40

    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.

  2. #2
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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).

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2003
    Posts
    40
    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.

  4. #4
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    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
  •  



Click Here to Expand Forum to Full Width