Skip to content

fix(settings): reset AppBrowserPopup model on close to avoid crash#2925

Open
feng-yifan wants to merge 1 commit into
AvengeMedia:masterfrom
feng-yifan:fix/appbrowser-popup-incubator-crash
Open

fix(settings): reset AppBrowserPopup model on close to avoid crash#2925
feng-yifan wants to merge 1 commit into
AvengeMedia:masterfrom
feng-yifan:fix/appbrowser-popup-incubator-crash

Conversation

@feng-yifan

Copy link
Copy Markdown

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.

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.
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.

1 participant