Here are some more things I learned today and all of these parts are related to the same program halt....
TODO: <File description>I don’t know exactly what triggers the MFC error message box with the text, "TODO: <File description>". But I now know that I have a good reason to fill in all the VS_VERSION_INFO resources in my projects. Under some circumstances Microsoft pops up the message box below, obviously I couldn’t find any documentation that tells me exactly when Microsoft will do this, but I know it can happen.
To identify which part of the project triggered the error, update the FileDescription field in all the VS_VERSION_INFO structures in all your projects. That way when it goes you’ll know what assembly/dll was involved.
In Visual Studio open your project's the
Resource View and under
Version you’ll see VS_VERSION_INFO, change "FileDescription" to something unique.
EEFileLoadExceptionI haven’t exactly tracked down why this exception is being thrown. Microsoft doesn’t document it. But Microsoft does document the exception
FileLoadException. Considering that I’m calling a managed assembly through an exposed COM interface from an unmanaged C++ executable, the error does fit. The description for FileLoadException is "The exception that is thrown when a managed assembly is found but cannot be loaded."
For some reason the description triggered some dormant brain cells, probably hanging around from when I was younger, which caused me to look in my Event Log. So I opened Event Viewer and I found that I had a .NET Runtime error that corresponded to the time I got the EEFileLoadException. Hmmm.
.NET Runtime version 2.0.50727.42 -
Fatal Execution Engine Error (79F97075) (80131506)
Okay, this is more information but...what does it mean? Searching on the number 80131506 from MSDN of course doesn’t get a hit (if you hear a really loud sucking sound, that would be Microsoft search...sucking!)
First-chance exception at 0x7c81eb33 in MonteCarloPiApp.exe: 0xE0434F4D: 0xe0434f4d.I also got a message box with the above error. Not much information available for this one, but I did find some recommendations about not running the application inside the debugger. So, I launched my program outside the debugger, got the "TODO message" box and selected the "Debug" button, which launches the debugger and sweetness... I get a "COMException was unhandled" error with an HRESULT of DISP_E_MEMBERNOTFOUND and a nice stack.
System.Runtime.InteropServices.COMException was unhandled
Message="Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))"
Source="System.Windows.Forms"
ErrorCode=-2147352573
StackTrace:
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at g.a(Delegate A_0, Object[] A_1)
at Digipede.Framework.Api.DigipedeClient.d(JobStatusEventArgs A_0)
at Digipede.Framework.Api.DigipedeClient.f(Object A_0)
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
That’s something I can work with.
Updated formatting problem