Memory leak in SimConnect_Open function (SDK 1.4.5)

Version: FS2024 SDK 1.4.5

Frequency: Consistently

Severity: Blocker

Marketplace package name: Air Manager plugin

Context: Custom plugin

Similar MSFS 2024 issue: No

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 :slight_smile: )

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.

Attachments:

Private attachments:

1 Like

Hi,

For what it is worth, the latest non-leaking SDK version was 1.2.4. It does leak memory in 1.3.1 and above.
So I’m gonna go with 1.2.4 for now.

Can anybody maybe give me a pointer on what I can expect here? Do bugs like these get resolved quickly?

Sorry, I’m not very experienced with this forum,

Regards Corjan

2 Likes

Hello @Corjan

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.

Regards,
Sylvain

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.

Hi,

Any news on this topic?

Not really a thing yet, but this prevents me going to the latest Visual Studio 2026. Kinda stuck on 2022 now.

Regards Corjan

1 Like

I have the same issue my game keeps crashing because of this caused a memory leak. Is there any fix?

Hi,

With almost 5 months gone, this gets a bit rediculous :slight_smile:. Would appriciate a more concrete idea of when/if this will get fixed.

Is this even the official way to post bugs? of is there another channel where these kinds of reports should be posted?

Regards Corjan

Hi,

A custoimer noticed that besides the memory leak there also seems to be a handle leak (Event type).

This is also true for the older SDK versions.

Regards Corjan

Handle leak also seems present on the FS2020 SDK, if that helps.

Regards Corjan

Hello @Corjan

This is fixed in SU6 Beta 1.8.5.0 and SDK 1.7.2 wet to be released soon.

Regards,
Sylvain

This topic has been automatically closed after 60 days of inactivity since it was marked as fixed.

If there is important new information about this same report, you can use the “Request reopen” button below to ask the moderation team to review it again.
For other issues or broader discussion, please open a new topic in the appropriate category.