Bug description:
When calling SimConnect_Open without the simulator running, it leaks memory internally.
The output HANDLE remains NULL after the call, so there is no way to clean-up (as far as I know).
See attachement for the memory analysis and call stack. (about 9.5GB usage after 30m or so )
Repro steps:
Create a native application, linking agains the static SimConnect libs:
*C:\MSFS 2024 SDK\SimConnect SDK\lib\static
*
Call SimConnect_Open multiple times, and see memory usage accumulate.
If the bug is client side only, which seems to be the case, we can usually quickly deploy a SDK revision.
Now this is a matter of triage: judging how critical this issue compared to other reported issues and how much bandwidth we have for bug fixes.
I’ll update this thread as soon as I know more.
I can confirm the problem, we came out with a different fix in our app, because in our case it only happened when closing, so it was enough to stop trying to call open again if the sim was already closed but the process was still running in the task manager ( another unrelated problem, possibly caused by some add-on), so we were looping trying to reconnect.
We fixed it by detecting that situation (failure to connect for minutes, with the flightsimulator2024.exe process active but its main Window not processing messages) and give up on reconnecting after some time if that happens.
We even tried to send a simconnect close after a failure to open, but it doesn’t clean up the allocated memory.