scelts / gees

Landing rate calculation for the Microsoft Flight Simulator 2020
GNU General Public License v3.0
123 stars 20 forks source link

Reconnect button #15

Open mixMugz opened 3 years ago

mixMugz commented 3 years ago

If MSFS going to CTD - gees keep connected state. Next run of MSFS cause not working gees. It's staying connected, but no any report.

Every time after CTD i need to restart gees.

scelts commented 3 years ago

likely the MSFS crash to desktop is not sending a connection termination to the simconnect client, and therefore the app still sees it as connected and doesn't reconnect later.

I believe that this is an issue for this library: https://github.com/c-true/FsConnect, or maybe even a level below (MSFS base simconnect dll, which is not open source)

Cannot do anything from the app besides hacking the connection termination (listening if the values don't change or something) which is not something I'd do, as this would bring other bugs.

mixMugz commented 3 years ago

How STKP work with simconnect and know about disconnection? Pushback Express?

scelts commented 3 years ago

I don't know. The underlying library I use is one abstraction layer above the simconnect.dll which is handling the connections and similar things. For what I see it uses ConnectionChanged event from the underlying library (simconnect base) to detect the change in the connection. So, either the FsConnect is not handling this well, and doesn't update the connection status, or even the underlying library, provided by Microsoft does not handle this well during the CTD, which is not a surprise to me. If it's the first one, maybe one can fork and update the github project - maybe I do it at some point, but I don't have time for this, if it's the second, you are left to submit a bug report to Microsoft. It's a nice bug to fix, but not a part of this project.

mixMugz commented 3 years ago

Can you contact with author of library to resolve issue?

mixMugz commented 3 years ago

May be you add disconnect button. Or reconnect. Or something. It's annoying restart application every time after CTD

scelts commented 3 years ago

dude, how often your game crashes? :) will do the reconnect button

mixMugz commented 3 years ago

It's every day 1-2 time always. This is microsoft style. When you fly alot - you have gamecrash a lot. My friend told me, what simconnect already have state of game. SimConnect_RequestSystemState() and 'SIMCONNECT_RECV_ID_QUIT'