fix: do not panic when encountering unkown enum values in gsx integration#10831
Open
Saschl wants to merge 3 commits into
Open
fix: do not panic when encountering unkown enum values in gsx integration#10831Saschl wants to merge 3 commits into
Saschl wants to merge 3 commits into
Conversation
Saschl
commented
Jul 12, 2026
| // The default panic output is lost when the WASM instance aborts, so print the | ||
| // panic message and location to the MSFS console before the trap happens. | ||
| std::panic::set_hook(Box::new(|panic_info| { | ||
| println!("A32NX_SYSTEMS PANIC: {panic_info}"); |
Contributor
Author
There was a problem hiding this comment.
I'd also like to print to stderr but the formatting in the console is off then as it prints multiple lines. Like this the offending line is printed in the same log line which makes search easier
Member
|
How about we change to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #[issue_no]
Summary of Changes
For some LVARs, GSX seems to set an unkown value when using the "Complete Now" functionality. Instead of panicking and crashing the whole wasm gauge, we now log a warning and return a fallback value.
Also adds a custom hook for panics to print the error message. The default behaviour does not print the backtrace anymore, which makes troubleshooting harder as we get not much information in the logs besides the info that the gauge crashed.
Screenshots (if necessary)
New log when the wasm panics
References
Additional context
Discord username (if different from GitHub):
Testing instructions
GSX needed:
How to download the PR for QA
Every new commit to this PR will cause new A32NX and A380X artifacts to be created, built, and uploaded.