System.NullReferenceException in system.dll

F

Fredrik

Im getting:

"An unhandled exception of type 'System.NullReferenceException'
occurred in system.dll
Additional information: Object reference not set to an instance of an
object."

The error is outside of my code and I cant get any debug info, just a
disassembly of:

System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback
000000a0 movzx esi,al

I've used try-catch on all areas of the code that i think could be
involved, but yet the this exception slips though.

It taks me about half an hour to reproduce this error, so it is quite
a time consuming task to debug. Could someone please tell me what kind
of events might be the cause of this error?
 
F

Fredrik

Is there any way to contain/catch the exception then?
I still cant get rid of it. :(
I've tried

public static void SystemErrorHandler(Object Sender,
UnhandledExceptionEventArgs Args)
{
Exception e = (Exception)Args.ExceptionObject;
Console.WriteLine ("Caught : " + e.Message);
}

in winmain:

AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler ( SystemErrorHandler);

But the handler never seems to get invoked. The exception still
escapes and causes the program to crash.

PLEASE help, this error has brought the my entire project to a
complete stand-stil.

(and please excuse my bad English :) )
 

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