fix(settings): reset AppBrowserPopup model on close to avoid crash#2925
Open
feng-yifan wants to merge 1 commit into
Open
fix(settings): reset AppBrowserPopup model on close to avoid crash#2925feng-yifan wants to merge 1 commit into
feng-yifan wants to merge 1 commit into
Conversation
Reopening the autostart "Browse" picker crashed in QQmlIncubatorPrivate::incubate. Drop the ListView model on hide() and rebind it on show() so each open starts with a fresh QQmlDelegateModel instead of reusing a stale incubation queue.
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.
What went wrong
Reopening the autostart "Browse" app picker (Settings -> Applications -> Autostart) crashed DMS with a segfault. Open the picker, close it, open it again -> crash (intermittent, but reproducible enough to hit three times in one session).
Fix
The picker's list view reused its internal model across open/close. When reopening while the app list was being refreshed in the background, the view was reading data that had just been replaced - leading to the crash.
Now the list model is dropped on close and rebuilt fresh on each open, so there's no stale state to collide with a background refresh.
Verified
Tested by running a local dev build against the edited file and repeating the original open/close/reopen flow (with app rescans and Bluetooth activity happening in the background). No crash.