Add error reporting for SITL child process failures#2562
Open
sensei-hacker wants to merge 2 commits intoiNavFlight:maintenance-9.xfrom
Open
Add error reporting for SITL child process failures#2562sensei-hacker wants to merge 2 commits intoiNavFlight:maintenance-9.xfrom
sensei-hacker wants to merge 2 commits intoiNavFlight:maintenance-9.xfrom
Conversation
Contributor
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan PR Compliance Guide 🔍All compliance sections have been disabled in the configurations. |
Comment on lines
74
to
80
| message_buffer: null, | ||
| message_buffer_uint8_view: null, | ||
| message_checksum: 0, | ||
| message_flag: 0, | ||
| callbacks: [], | ||
| packet_error: 0, | ||
| unsupported: 0, |
Contributor
There was a problem hiding this comment.
Suggestion: Reset the message_flag property in the finally block of _dispatch_message to ensure the MSP state machine is always in a consistent state. [general, importance: 7]
New proposed code:
-var MSP = {
- message_buffer: null,
- message_buffer_uint8_view: null,
- message_checksum: 0,
- message_flag: 0,
- callbacks: [],
- packet_error: 0,
- unsupported: 0,
+Previously, SITL spawn errors and unexpected exits were completely silent - the renderer never subscribed to child process error/exit events. Now errors are logged to both console and the GUI log so users can see why Demo mode or SITL connections fail. Also removes the ineffective useShell option (not a valid Node.js spawn property, was silently ignored).
d6a55a0 to
828d257
Compare
Store handler references and remove old listeners before re-registering to prevent accumulation on repeated start/stop cycles.
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.
User description
SITL spawn errors and unexpected exits were silently swallowed — the renderer never subscribed to child process error/exit events. Users saw only "ECONNREFUSED" with no indication of the actual cause.
useShelloption (not a valid Node.js spawn property)