Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect possible sim crash #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Detect possible sim crash #12

wants to merge 2 commits into from

Conversation

RAZERZ
Copy link

@RAZERZ RAZERZ commented Jan 10, 2024

Currently there does not seem to be a way to detect sim crashes purely from the exceptions raised (there is no exception in the Ibroker for this, I have raised this in the vatsim forums: https://forum.vatsim.net/t/vpilot-plugin-simulator-crash-detected/4453).

What one could do instead is send a notification upon a dropped connection using the event handler NetworkDisconnected. This is opposed to RequestDisconnect, which is called when pressing the disconnect button in vPilot.

What might be considered is adding this as an option in the .ini file

Tested on Prepar3D v5 with vPilot version 3.7.0, no issues found

@blt950
Copy link
Owner

blt950 commented Jan 20, 2024

Hi @RAZERZ, thanks for the PR. This would be an interesting feature indeed.

I had a test on vPilot v3.7.0 on MSFS and it's unfortunately sending the "possible sim crash" message when clicking disconnect in vPilot.

I see you earlier tested reading the crash message to push a notification based on that. Did that work out? It's a bit hacky, but at least the closest we get with the plugin interface provided.

So sad vPilot is also closed source so it's impossible to PR in some useful functionalities there as well...

@RAZERZ
Copy link
Author

RAZERZ commented Jan 20, 2024

Yeah I realized that it triggers even after clicking disconnect. I misunderstood the difference between RequestDisconnect and NetworkDisconnected

Unfortunately from the initial testing, there did not seem to be some way to read the raw text outputted which is a shame. I tried a combination of the RadioMessage sections but they did not seem to send the welcome text you get on initial log on.
Maybe a SimNotReadyException is thrown when the sim crashes, I could do some further testing on that and see if I end up somewhere.

Ross Carlsson is apparently not working on the plugin part of vPilot anymore and this exception may or may not be added in the future.

@blt950
Copy link
Owner

blt950 commented Jan 20, 2024

Alright, worth to checj if maybe SimNotReadyException could do the trick.

Depending on how it works, but perhaps SimNotReadyException with an active plugin (callsign var is set) could indicate a crash.

@RAZERZ
Copy link
Author

RAZERZ commented Jan 29, 2024

Good point, I'll delve into this and see what I find

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants