locked
Help! C# program died quietly! RRS feed

  • Question

  • The program was written with VB6 and C# (.Net 1.1). The dll written with C# is responsible to the real time communication with the industrial devices. It contains a few threads, some of which continuously poll the devices for the real time data. It exposes the COM interface (methods and events) to VB6 part.

    Most time the system can run smoothly without any problem. But sometime, after running for a while, the program just died QUIETLY. There is no any error information logged in system event log and no error reported to user. The time it takes could be a few minutes, a few hours or two or three days.

    In addition, I have found that sometime the internal reference of C# part can be changed. For example, it happened a few times that the event handle for function 'WaitForSingleObject' became invalid after running a few hours and the error message reported by system is "Access is denied".  This event handle is only used in one thread and the code does not change it after it is created. But the error message implies it is change by something.

    Therefore I think there might be problems between VB6 and .Net. It seems that the memory used by C# part is changed in some way, maybe by VB6 part calling the methods exposed by C# dll. When .Net engine cannot handle it, it just quietly stop all the related program.

    Please, if anyone knows, tell me that how to trace this strange problem. Is it worth upgrading to .Net V2.

    Thursday, May 25, 2006 2:35 PM

Answers

  • I don't remember specifically what causes Fatal Execution Engine Errors.  I do remember there is a bit of chatter on that around the Web.  Try searching for "Fatal Execution Engine Error" in Google; as I recall there were a few entries.
    Friday, May 26, 2006 1:50 PM

All replies

  • There are a few problems in .NET 1.1 that were fixed in .NET 2.0 related to the items you've mentioned.  I would suggest updating.
    Thursday, May 25, 2006 2:47 PM
  • Thanks, I will try that
    Thursday, May 25, 2006 3:43 PM
  • Unfortunately, it still happens. Even worse, with c# dll compiled into debug version, the VB program crashes straightawy, sometime reporting an error message. In event log, the error message is:

    .NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3) (80131506)

    Does MS really have a solution for this type of problem.

    Friday, May 26, 2006 1:26 PM
  • It sounds like you may be running into Race conditions or possibly even deadlocks or possibly that the code is accessing class components that are not thread safe. Sometimes they work and sometimes they get stepped on and it begins to fail.

    I recommend that you pull the components out and create Nunit tests on them individually in their own sand box. You may find the problem when you run the items through tested stress tests. I know its not the answer you want....good luck.
    Friday, May 26, 2006 1:48 PM
  • I don't remember specifically what causes Fatal Execution Engine Errors.  I do remember there is a bit of chatter on that around the Web.  Try searching for "Fatal Execution Engine Error" in Google; as I recall there were a few entries.
    Friday, May 26, 2006 1:50 PM