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

FSX:SE Sharing DLL dev experience

Messages
531
Country
france
Let me tell you the story about what happened to me, hoping it may be useful to some of you.
I was developing a DLL for FSX Steam Edition, a module that is loaded when FSX starts. I was in a development process : write code, generate DLL, launch FSX to test, stop FSX, update code, re-run FSX, and so on… At a certain time, I wrote a new piece of code, ran FSX to test and it crashed before starting. No problem, I reviewed the code and saw my error, fixed it, and ran FSX again. Crash again. The traces were showing the DLL was not even loaded. Strange… To get rid of any doubt, I removed all my new piece of code to roll back to the exact same version as before the crash. I re-generated and ran FSX, crash again before loading the DLL. Very strange.

It was so strange that I thought FSX might be “remembering” this faulty DLL to refuse it and crash. In order to verify this, I changed the name of my DLL (the file name and the name referenced in dll.xml) and ran FSX again, it worked, which proved I was right. I now had to find where this trace was located.
I removed all references of my DLL in fsx.cfg and deleted dxdiag.txt (just in case), it was still crashing. So I checked the registry and found a reference to my DLL in:
HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\10.0\Launch
There was a list of DLL references similar to fsx.cfg (with a hash code for each version.) What I understand is that FSX uses this to prevent some DLLs from loading, thus crashing FSX. I removed all the entries where my DLL was referenced (several versions) and voilà… everything was working fine. I fixed my code and re-ran FSX, everything was running fine.

I still wonder what was this designed for. Why does FSX keep a trace of DLL versions that were crashing? Does it mean that if your DLL causes a “big” crash, it should be forbidden forever? I don’t know.
Did you ever experience a similar problem? If you have any other explanation, please let me know.

Eric
 
I wrote my share of FSX DLLs (which at some point of development failed miserably), but I never had this happen to me. Good to know, thanks for sharing!
 
Thanks for your feedback.
I also made a lot of them, at a time FS2004 was still used. The modules were (easily) developed with fs9 in a way to be compatible with FSX.
These problems I now experience are on FSX only.
 
There was an earlier thread about this, but a search doesn't turn it up. So much for my leet google-fu skilzz. Yes, I've had it too. In theory it could also happen in P3D, but I've avoided it so far.
 
Back
Top