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

Closing simconnect

Messages
46
Country
israel
Is there a need to unsubscribe from events and cancel requests with intervals when shutting down my client, or is it enough to call dispose()?
 
I've never found a need/crash/issue with just Dispose() or SimConnect_Close(), w/out removing anything. And I've done it personally certainly dozens if not hundreds of times during a sim session while testing code, including from WASMs, nor have any of hundreds of users reported anything.

I am always "polite" and explicitly Dispose()/Close(), and I'm a stickler for having my apps exit cleanly so they have a chance to do so (which goes for any type of connection/file/handle/etc). But even when my apps crash or exit unexpectedly (only in dev! ;-) ) I've not really had any issue that I can recall.

The documentation suggests as much also:
When a SimConnect client is closed, the server will remove all objects, menu items, group definitions and so on, defined or requested by that client, so there is no need to remove them explicitly in the client code.

Of course, as they say, YMMV... :)
But if one has crashes on exit, or other strangeness on restarting a session, I'd guess there's some other more likely issue at hand.

Cheers,
-Max
 
Thanks, that's good enough for me!
I explicitly closed it too, I just don't want to leave loose ends.
 
I've never found a need/crash/issue with just Dispose() or SimConnect_Close(), w/out removing anything. And I've done it personally certainly dozens if not hundreds of times during a sim session while testing code, including from WASMs, nor have any of hundreds of users reported anything.

I am always "polite" and explicitly Dispose()/Close(), and I'm a stickler for having my apps exit cleanly so they have a chance to do so (which goes for any type of connection/file/handle/etc). But even when my apps crash or exit unexpectedly (only in dev! ;-) ) I've not really had any issue that I can recall.

The documentation suggests as much also:


Of course, as they say, YMMV... :)
But if one has crashes on exit, or other strangeness on restarting a session, I'd guess there's some other more likely issue at hand.

Cheers,
-Max
A year later... :)

The problem is not with calling SimConnect_Close().

The problem is with calling SimConnect_Open(), especially from executables outside the sim, at exe.xml startup, and then when that call fails because the sim is not yet ready, spamming every 500 milliseconds or second with further SimConnect_Open() requests.

There is a recognized issue with SimConnect_Open() whereby any failed attempt does not release its slot from the 64 available slots (per SimConnect.xml), thus not only causing congestion (other requests coming in get blocked) but also permanent damage as the sim will run out of slots right away.

I think this has been reported to Asobo but nobody's done anything about it and we're now finding ourselves in a position to have to alert customers to the fact that they have applications and/or utilities flooding the Simconnect queues, that they have to uninstall. Of course, it's a nightmare to have to explain why these apps are at fault and not the (newly released) product, as they always claim "but it worked fine before I installed your product!"
 
Back
Top