FatalExecutionEngineError was detected
Message: The runtime has encountered a fatal error. The address of the error was at 0x79f783dd, on thread 0x5d0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
The error was presented in a Managed Debugging Assistant (MDA), which is something new for Visual Studio.Net 2005:
I tracked the issue down to a call in some EventPool code that we got from Marc Clifton's site. There was a demo program (EventPoolDemo.zip; you need to register with the site to be able to see the download link) available, so I downloaded it and loaded the solution in Visual Studio.Net 2005. The solution was written in Visual Studio.Net 2003, so the conversion wizard popped up and converted it without any issue. I pressed F5 to run, and Presto, I hit the same error.
I next checked the forums on Marc's site and discovered that someone else had hit this issue too. Unfortunately, nobody had posted a response. I decided to drop a line to Marc to see if he had any clues.
I spent the rest of the day banging my head against the wall trying to figure out the issue by debugging and Googling. I made no progress and by the end of the day had a real headache.
And then, as I was ready to throw in the towel for the day, up popped an email reply from Marc.
Hi Darryl,
See if the solution posted in this link solves the problem.
http://www.codeproject.com/csharp/eventpool.asp?msg=1541283#xx1541283xx
Marc
Holy deus ex machina, Batman, it worked! The problem was a naming conflict in the EventPool code. All I had to do was rename a delegate that conflicted with System.MulticastDelegate from this:
protected delegate void MulticastDelegate(object sender, EventArgs e);
to this:
protected delegate void EpMulticastDelegate(object sender, EventArgs e);
Hooray, the app is working again! Until I hit the next conversion issue...
1 comment:
Hey thanks for the solution!
Had a similar problem in some other demo code with the same implicit override.
Post a Comment