Results 1 to 2 of 2

Thread: [RESOLVED] [2005] Handling NullReferenceExceptions

  1. #1

    Thread Starter
    Hyperactive Member ZaNi's Avatar
    Join Date
    Jun 2006
    Location
    Australia
    Posts
    360

    Resolved [RESOLVED] [2005] Handling NullReferenceExceptions

    I've recently made a major modification to the program I'm working on, and now it compiles fine, but when I try to use some of the new code, I'm generating NullReferenceExceptions. Usually, I'd handle this by tracing where the exception was generated and adjusting the code to handle it, but this exception is not giving me any information about that.

    The only additional information I have (aside from the stack trace below) is "No Symbols are loaded for any call stack frame. The source code cannot be displayed." At this point my options are OK and Show Disassembly.

    While I think I understand the error messages, I don't understand why I'm not getting any additional information. Worse, I cannot think of any solution to the problem other than rolling back the changes then reintroducing them slowly to find the problem...

    Any thoughts?


    Code:
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\Documents and Settings\ChinchenS\Desktop\LoadCaseTrial\LoadCaseTrial\bin\Debug\LoadCaseTrial.vshost.exe', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', No symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\Microsoft.VisualBasic\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll', No symbols loaded.
    The thread 0x8d8 has exited with code 0 (0x0).
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\Documents and Settings\ChinchenS\Desktop\LoadCaseTrial\LoadCaseTrial\bin\Debug\LoadCaseTrial.exe', Symbols loaded.
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System.Runtime.Remoting\2.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll', No symbols loaded.
    A first chance exception of type 'System.DllNotFoundException' occurred in System.Windows.Forms.dll
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', No symbols loaded.
    Test
    'LoadCaseTrial.vshost.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\Accessibility\2.0.0.0__b03f5f7f11d50a3a\Accessibility.dll', No symbols loaded.
    A first chance exception of type 'System.NullReferenceException' occurred in LoadCaseTrial.exe
    A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
    A first chance exception of type 'System.NullReferenceException' occurred in System.dll
    * Don't limit yourself to sanity
    * I'd rather be optimistic and naive than pessimistic and right
    * Ask good questions, get good answers.

    My Codebank submissions:
    How to write one rountine to handle many events
    Accessing and Using variables across multiple forms
    Printing/Previewing a form or control

    Links I've "borrowed" from other people:
    vbdotnetboy - Awesome site for tips

  2. #2

    Thread Starter
    Hyperactive Member ZaNi's Avatar
    Join Date
    Jun 2006
    Location
    Australia
    Posts
    360

    Re: [2005] Handling NullReferenceExceptions

    Scrap that. I did a logic trace to find the function that caused the error. I've commented the whole thing and will reintroduce it to fix the problem.

    If anyone has any information they'd like to add about this error, it'd be good to hear it. Otherwise, consider this thread resolved.
    * Don't limit yourself to sanity
    * I'd rather be optimistic and naive than pessimistic and right
    * Ask good questions, get good answers.

    My Codebank submissions:
    How to write one rountine to handle many events
    Accessing and Using variables across multiple forms
    Printing/Previewing a form or control

    Links I've "borrowed" from other people:
    vbdotnetboy - Awesome site for tips

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