• 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 Gauge doesn't unload...

Messages
531
Country
france
Hello,

I am running into a problem that is driving me crazy... After so many years in FS development, I never saw this.
I was fixing a small bug in my Airbus Series that I now use with FSX. The series is compsed of 7 aircraft (A318, A319CFM, A319IAE, A320CFM, A320IAE, A321CFM and A321IAE). With the bug fixed, I recompiled all the aircraft, and had a problem with only 1 of them: the A319IAE. They all share approx 95% of the code, so this was surprising.
But more surprising was when I tried to understand why, doing some changes in the code, I couldn't regenerate the gauge DLL as if the A319IAE was still loaded in FSX. What I usually do is load another aircraft, let's say the stock 737, compile and link to generate my aircraft gauges, then load my aircraft again in FSX, which loads all the gauges. I did this, but it didn't work and I had to stop FSX to generate the gauge. My understanding is that the A319IAE gauge is not unloaded as it should when I select the 737 in FSX, it is only unloaded when I quit FSX.

Isn't it strange? It is the first time I see this... Did you see this already?
If someone has an explanation, I would be glad to understand why the gauge is still "held" by FSX when the aircraft is unloaded.
Needless to say, this gauge is used by no other aircraft and it is located in its panel folder.

Thanks for any help,
Eric
 
If you've hooked the message queue for FS and not unhooked it, the dll with the hook function will not be unloaded.
 
I will carefully look into this. Nevertheless, the probability is low because this aircraft uses the same code as the 6 other ones regarding that aspect, so I don't understand why it is the only one that fails.
 
Eric: if you're using Windows 10, it introduced that particular intermittant bug some updates ago. It frustrated and annoyed me enough that I switched my main development platform to P3D, only running a 32-bit compile when I need to check compatibility with FSX.
 
I think you are right and this is the reason.
I think this because I noticed the following:
1) when the gauge DLL is loaded in FSX, you can rename it !! I did this for testing only, to see if the DLL was locked or not, and it worked. On Windows 10 you can change the name of a DLL that is being used, but if you try to delete or overwrite it, Windows will not let you do this, fortunately... I am sure this was impossible with Windows 7.
2) I checked my (old) code and it appears the A319IAE uses the EXACT SAME code as the A319CFM, the only difference is made in external configuration files. So there is no logical reason to explain why one works and not the other. I must say this aircraft uses only 1 gauge DLL that contains everything.
I even thought this may come from the aircraft.cfg wrongly configured, but I checked it and it is OK. I wonder if it may come from the model, I don't think so... But I will do additional tests using the same aircraft with another gauge DLL and we will see.

Anyway, if you are right and the reason comes from this Windows 10 "bug", is there something I can do to fix it? Or a workaround?

Thanks,
Eric
 
Eric: I'm not aware of a workaround, which is why I switched to developing on P3D when I found that platform didn't exhibit the same behaviour. I say 'I found' but the subject came up in another thread (can't find it :() and that was the solution proposed within the thread.

Doug: OUCH!!!! So that's the reason.
 
Doug, you are a genius !!
Indeed, I found an entry in the registry, whcih name is "D:\Games\Steam\steamapps\common\FSX\fsx.exe" (the location of my FSX SE) and value is "$ IgnoreFreeLibrary<A319IAE_FeelThere.dll>", which is the name of my library that was not unloaded.
I searched everywhere in the FSX config files, cleaned the [Trusted] section of fsx.cfg to no avail, I would never have the idea to search into the registry.

I couldn't find the reason why this entry was created in the registry, but I removed it and everything works fine now.
I don't know how to thank you, this problem was really driving me mad :)

Eric
 
I caught this problem on P3D v3.4 too!

Spent 4 hours for analyze and debugging to understand what's problem. When i found that global gauge flag not reset after changing aircraft, for reason my gauge not unloading - i thought go crazing.
Without hope tried to search "prepar3d do not unload gauge" and found this topic!

OMG, never faced this strange DLL behavior before.

Thanks @ddawson!
 
Back
Top