• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Managed client samples crash, won't debug

Messages
5
Country
unitedstates
hi all. i'm new to simconnect, but have been programing dot net for a while. i'm running FSX SP2 and SDK SP2 (installed SP1a first) on Windows XP SP2 with VS2005 SP1.

i can't get any of the managed code samples to debug. they build fine, but i get this in the output window when trying to debug by pressing F5:

Code:
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Core Utilities Kit\SimConnect SDK\Samples\Managed System Event\Managed System Event\bin\x86\Debug\Managed System Event.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\Microsoft.FlightSimulator.SimConnect\10.0.61259.0__31bf3856ad364e35\Microsoft.FlightSimulator.SimConnect.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x3c8 has exited with code 0 (0x0).
The thread 0xc14 has exited with code 0 (0x0).
'Managed System Event.vshost.exe' (Managed): Loaded 'C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Core Utilities Kit\SimConnect SDK\Samples\Managed System Event\Managed System Event\bin\x86\Debug\Managed System Event.exe', Symbols loaded.
The program '[2548] Managed System Event.vshost.exe: Managed' has exited with code -1073741784 (0xc0000028).

i can run the release builds of these samples, but they are very unstable. i can start FSX, run the release build, and the samples will connect to FSX and do what they're supposed to do. however, if i click on the window of the sample app after it's started receiving data, it immediately crashes without an error message. has anyone seen this before? any advice?

thanks,
ben
 
I haven't tried the samples directly, but I've build my own class wrapper into which I pasted the basic managed code, and I'm calling it from WPF (in VS2008 Pro) with no trouble at all. The only real difference between WPF and plain DotNet is that WPF needs a bit of faffing to get the hWnd and WndProc for the message pump.
 
i started a new C# project and pasted the sample code into the new project. now it runs. thanks for the tip!
 
Hey Tim A,

<<
The only real difference between WPF and plain DotNet is that WPF needs a bit of faffing to get the hWnd and WndProc for the message pump.
>>

See my blog post on this issue, there's an easy solution that doesn't require the use of an hWnd or a WndProc, and it will work for WinForm based apps as well.
 
Last edited:
Tim,

Your links add an extra http:

http: //http //beatlesblog.spaces.live.com/blog/cns!B48B0194C5456F5!172.entry

;)
 
Back
Top