• 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.

simconnect DLL loading problem

Messages
45
Country
france
Hello !

I have designed an add-on, in the form of an in-process DLL, in visual C++, (standard win32), build using simconnect SP1 for compatibility reasons.
The DLL has grown bigger and is now about 120Ko in the release version.
I have the following problem : The DLL adds a menu item in the FS addon menu. When I launch a new version of my DLL which has just been compiled (meaning that this DLL is run for the first time on FS), I have the security message box at the beginning, I click accept, and when FS is loaded, I can find my item in the addon menu, but when I click it, nothing happens. I also find that my DLL is not running.
Now, if I restart FS, everything will run fine.

This is extremely reproducible. I also found that If I prevent the loading of other add-ons (from the DLL.xml file), like IVAP and FSUIPC, I don't have this problem. Looks a bit like a memory problem, no ?

Any hint on how to debug this ?

cheers

Oliver
 
When I launch a new version of my DLL which has just been compiled (meaning that this DLL is run for the first time on FS), I have the security message box at the beginning, I click accept, and when FS is loaded, I can find my item in the addon menu, but when I click it, nothing happens. I also find that my DLL is not running.
Now, if I restart FS, everything will run fine.

This is extremely reproducible. I also found that If I prevent the loading of other add-ons (from the DLL.xml file), like IVAP and FSUIPC, I don't have this problem. Looks a bit like a memory problem, no ?

No. This is a bug which was in both the base and SP1 updates for SimConnect, and reproduced by MS. I don't think they managed to actually FIX it (because part of the problem was in the WinTrust parts of Windows), but they built a work-around in the code in the SP2/Acceleration update for SimConnect.

Another benefit of moving to SP2/Accel is that it uses named pipes (shared memory) for data exchanges with SimConnect clients, whereas the base and SP1 versions use TCP/IP, far less efficient.

Regards
Pete
 
Hi Pete,

Thanks for the fast and informative answer. I feel relieved now to know that my own code is not involved.
The reason I still use SP1 is that I develop on my laptop, and I have a video card incompatibility problem with SP2. However, on my flying setup, I have SP2.

Have a nice day,

Best regards

Olivier
 
Hummm, looks like I'm having another problem now :

My DLL communicate with a distant application via TCPIP (using winsock2). At some point, after working perfectly well, it crashes silently.
The menu item corresponding to my DLL is removed from the FS addon menu, and I find the following lines corresponding to my DLL in the simconnect.log :

> 159.23368 [191, 2078]RequestDataOnSimObject:RequestID=0, DefineID=0, ObjectID=0, Period=1, Flags=3, origin=0, interval=0, limit=0
< 159.23381 [191] ObjectData: RequestID=0 DefineID=0
> 159.23381 [191, 2079]RequestDataOnSimObject:RequestID=1, DefineID=1, ObjectID=0, Period=1, Flags=3, origin=0, interval=0, limit=0< 159.23386 [191] ObjectData: RequestID=1 DefineID=1
< 159.33734 [191] Event: 4
159.43458 [191] I/O Error! (2, 80004004)

Does somebody can help me to interpret the last line with IO error ?

oliver
 
I have no idea on the error, but since the "Event:4" is the last SimConnect activity recorded, you might want to disable the code that is performed in response to that and see if that stops the error. Then at least you can narrow down your search.

Si
 
Thanks for your fast answer simon !

However, event 4 in my code corresponds to the 6Hz event, and everything in my code is performed on that event, i.e. 6 times per seconds.

Disabling the code there corresponds to disabling everything, so there's nothing more to debug. Thanks for the logical answer anyway !

Does Anyone knows what the 2, 80004004 in
159.43458 [191] I/O Error! (2, 80004004)
means ?
 
Does Anyone knows what the 2, 80004004 in
159.43458 [191] I/O Error! (2, 80004004)
means ?

Searching the MSDN reveals this rather unhelpful gem at http://msdn.microsoft.com/en-us/library/aa378137.aspx :

0x80004004 E_ABORT Operation aborted

Sorry I can't be more helpful. Before SP2 there were occasions, when SimConnect was busy servicing several clients, when odd errors like this would crop up.

They were so annoying that I wrote a lot of recovery code into FSUIPC -- to detect the loss of regular messages that I'm expecting (i.e. via time-outs), and to then close down the SimConnect link tidily and re-connect, re-initialising all my requests. That worked, but if it happened frequently it had noticeable impact on FSX and FSUIPC performance, of course.

The problems were reported to the SimConnect author and hopefully fixed. I've not seen any since I've been using SP2/Accel SimConnect, but whether that's because the bugs really are fixed or because by using SP2 explicitly I'm using pipes not TCP/IP for my SimConnect exchanges, I couldn't say.

Regards

Pete
 
Hi Pete !

Thanks for the very interesting comment. I am now building my DLL linked to the Simconnect SP1 library, even when I run it inside my SP2 FSX.
Your message light a little hope that I could maybe build it with the SP2 lib to see if the problem gets better ...

I'll report the result later.

best regards

Olivier
 
Back
Top