This is a heap allocation / deallocation crash bug that occurs in Coherent DLLs - some debugging and digging into Coherent DLLs shows that the problem occurs in various Coherent DLL locations but always related to heap allocation pointers that are corrupted so the DLL crashes when trying to free locally allocated memory.
We could reproduce using the freeware FBW A320 Neo and replacing the panel.cfg with ours to load up our wasm file instead (which is a stub doing mostly nothing, to facilitate showcasing this problem).
Repro steps:
For Asobo devs: Install the FBW A320 Neo. Drop the attached (sent to @PrivateContent) files in the Simobjects\Airplanes\FBW\panel folder. Regenerate the layout.json file with a layout generator (we used MSFSLayoutGenerator.exe from here. Then load the FBW 320 Neo - the crash occurs before the wasm is compiled into a DLL, usually. It takes 20-25 loads before it happens - we clean the compiled wasm DLL folder each time, to increase the chances the crash will occur.
Just for the sake of others reading this thread, Asobo was able to see the crash and consider it a memory corruption issue which they are tracking. They will let us know when it’s fixed.
@FlyingRaccoon Sylvain, just another piece of info from our testers: Using the utility called YourControls (from here ) the mem corruption issue occurs a lot more frequently, possibly helping you track it down easier?
Just a polite bump on this, as the CTD occurs very frequently on some of our testers, without any rhyme or reason and we are quite concerned that as soon as our product is released, this will become a real issue for a lot of our customers.
coming back to this topic - it seems that MSFS 2024 is using the same version of the Coherent DLLs (2.9.5.0) which are known to have the crash bugs that most likely cause the crashes reported.
Given that our testers are getting CoherentGT.dll crashes frequently and assuming that when we release our product, there are going to be a LOT more customers reporting those (given the samples we provided you that allowed you to reproduce the issue) would you kindly share some more information on what’s going on and how we can deal with the issue once our customers start reporting this as if it’s our product’s fault?
Are you exploring potential solutions to this issue? Is there a work around? Some suggestions on what to offer? At the moment, we’re at a loss as to what the answer is or even what the cause might be, other than “something in the older Coherent DLLs that are known to crash the sim”.
We have been making extensive changes in CoherentGT for Flight Sim 2024 - don’t trust the DLL version which I think we have never bumped.
That being said I don’t think we have tried booting the FBW A320 Neo on MSFS 2024 yet, so I can’t tell you yet if the changes we made fixed the issues you are having.
We hope to have more time for support starting next week with the DevAlpha being available to all Marketplace developers.
Thank you for confirming the fix and also that the DLL version number does not reflect the CoherentGT.dll not having gotten an update.
Hopefully, 2024 fixes the issue once and for all, but it’d be great if you guys could back-fix it into 2020, as there’s going to be quite a few customers there still.
I think our idea with the changes made to the DLL was to backport to MSFS2020 on its next (Sim) update indeed. That being said I cannot commit to this right now because I am unsure if some of the changes & fixes we made could create some incompatibilities with 2020 (hopefully not!).
Anyway, I’ll try to get the information that this is still the plan.
For the record, as far as we can tell the Coherent DLL is not the cause of the crash. It occurs because the memory allocated by Coherent is likely corrupted by another process in the sim and we have not been able to trace its origin so far.
Doing extensive tests with your aircraft when the DevAlpha is available is worth it any feedback you can provide will be useful to us.
did the package I uploaded for you which provides repro material not help with that? It showcases exactly the problem, inside the FBW A320 as a shell, so you can see the crash occurring there.
I am thinking something in panel.cfg is causing this to happen in Coherent as largely the only difference in the package provided is the altered panel.cfg file (the wasm dll has not been loaded at that stage yet, so I am assuming that’s not the cause).
The devAlpha will definitely tell us if your fix worked or not, so you’re very right that we can give more feedback then.
I am just confused however - how were you able to fix it in 2024 if the origin could not be traced? Did you protect around the memory allocation instead? (worth a workaround solution for sure!)
that’s reassuring to know it’s more widespread than we previously thought! A fix will be so very welcome (it’s been eating into our productivity a lot lately).
If there was a leaderboard with the number of restarts after a crash, I’d be around the top for sure. I keep my Community folder to a minimum and I installed the sim on 2 RAID0’d SSDs to reduce load times. It happens way too often and most of the time it traces back to Coherent.
at this point, I am so confused as to why it’s happening, as there’s no rhyme or reason for it - I could go 10 times reloading and nothing, and then all of a sudden, it will start happening and will need a reboot or I’ll be getting continuous coherent crashes until the end of time.
This is the exact same behavior we have seen in FS2020 as well. We have also seen different Coherent DLLs crashing at any time, it isn’t consistent or replicable in any way
I have the same issue with an aircraft on MFS20. I have nearly 100% crash rate on my PC during load. I assume the low end PC mixed with a heavy aircraft is part of it. The crash is always during the flight loading phase.