FatalExecutionEngineError with SimConnect C#

Kaiii3
Posts: 64
Joined: Tue Feb 10, 2015 1:14 pm

FatalExecutionEngineError with SimConnect C#

Postby Kaiii3 » Sun May 03, 2020 11:47 am

Hey,

I got from time to time CTDs with my C# Application using the v45HF3 SimConnect DLL:

Exception:

Code: Select all

FatalExecutionEngineError
Stacktrace:

Code: Select all

bei System.Runtime.InteropServices.Marshal.PtrToStructureHelper(IntPtr ptr, Object structure, Boolean allowValueClasses) bei System.Runtime.InteropServices.Marshal.PtrToStructure(IntPtr ptr, Type structureType) bei LockheedMartin.Prepar3D.SimConnect.SimConnect.MarshalRECVPtrToObject(UInt32 dwID, Void* pData) bei LockheedMartin.Prepar3D.SimConnect.CSignalProcDelegateMarshaler.CallSignalProc(SIMCONNECT_RECV* pData, UInt32 cbData, Void* pContext) bei SimConnect_CallDispatch(Void* , IntPtr , Void* ) bei LockheedMartin.Prepar3D.SimConnect.SimConnect.ReceiveDispatch(SignalProcDelegate pfcnSignal) bei AIGTech.TrafficController.Controller.SimConnectController.HandleSimConnectEvents(IntPtr hWnd, Int32 message, IntPtr wParam, IntPtr lParam, Boolean& isHandled) in D:\Eigene Datein\Eigene Dokumente\Visual Studio 2013\AIGTech\AIGTech - Traffic Controller\Controller\SimConnectController.cs:Zeile 50.
this is my code:

Code: Select all

private IntPtr HandleSimConnectEvents(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam, ref bool isHandled) { isHandled = false; switch (message) { case WM_USER_SIMCONNECT: { if (this.SimConnect != null) { try { this.SimConnect.ReceiveMessage(); } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine(e.StackTrace); } isHandled = true; } } break; default: break; } return IntPtr.Zero; }
Anyone an idea how to handle that, or what could cause this?
Image

Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 11 guests