-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix crash on usb disconnect, fix hiding of main window #12864
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
Conversation
DonLakeFlyer
commented
May 16, 2025
•
edited
Loading
edited
- Fix QGC crashes after disconnecting USB [Release V5.0] #12858
- Fixes crash on usb cable disconnect
- Fixes main window disappearing on active vehicle going away
- Fixes link errors showing message in title and title in message area
- Stops popping link error dialog on usb cable pull
- Replacement for QML: Fix Accidental Hiding of Main Window #12860
* This was causing main window to close when activeVehicle went away * They are not needed since there are already correct activeVehicle checks which cause map items to hide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR resolves multiple issues including crashes on USB cable disconnect, unexpected main window disappearance when the active vehicle changes, and incorrect link error dialogs.
- Fallback to an offline editing vehicle when activeVehicle is null
- Removal of redundant activeVehicle change connections in QML
- Updates to SerialLink error handling for USB disconnects and a dedicated communication error handler in LinkManager
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/QmlControls/FactValueGrid.cc | Adds a fallback for activeVehicle to use offlineEditingVehicle |
src/FlightDisplay/FlyViewMap.qml | Removes Connections blocks handling activeVehicle changes |
src/Comms/SerialLink.cc | Handles ResourceError with fallthrough to PermissionError logic |
src/Comms/LinkManager.h & LinkManager.cc | Introduces a dedicated _communicationError handler and connection |
Comments suppressed due to low confidence (1)
src/Comms/LinkManager.h:127
- [nitpick] Consider clarifying the parameter names to better reflect their usage (e.g., swapping or renaming them) to match the order of arguments in the showAppMessage() call.
void _communicationError(const QString &title, const QString &error);
@rubenp02 I could see why those two Connections blocks were needed. There was already activeVehicle checking in other places on the goto location item. I also tested the vehicle going away while a goto location was displayed and it correctly went away. |
@HTRamsey This didn't happen in pre-5.0 builds. It's kinda annoying. Not sure what you think about this change. |
@DonLakeFlyer yeah that's fine. I kinda wish we had a separate notification message that just kinda pops up and fades out after a few seconds, particularly for things like this that the user should notice but doesn't require actual input to dismiss it. |
The second one. But not GuidedActionsController I'm going to merge this because without it the main window close thing makes testing really hard! |