Skip to content
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

Fix multiple crashes #2029

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

leolost2605
Copy link
Member

Fixes two crashes that regularly appeared when opening multitasking view.

  1. the slot of a windowclone can be null as noted in documentation. Without checking it we could crash when opening two windows on the same workspace, move one to another workspace without ever opening multitaskingview. If you then open multitasking view it would crash since it runs a few handlers trying to select another window since in the view of the multitasking view one was "removed" and in the process it will try to access fields on the slot that is null because it's the first time we open so they haven't taken a slot yet.

  2. current_window could be unrefed twice if it was set to null in open which could cause the actor to be destroyed since current_window held the only ref on it. This in turn would cause the destroyed handler to run which would try to select another window as current and if that fails set the current_window to null again unrefing it a second time even though it was already disposing.

These are two independent crashes and I made them two commits so I'd say this can be rebase merged.

@leolost2605 leolost2605 force-pushed the leolost/fix-window-clone-container-select-next-crash branch from 22dcf9e to 30cb69d Compare August 16, 2024 22:05
@leolost2605 leolost2605 requested a review from a team August 16, 2024 22:11
@leolost2605 leolost2605 force-pushed the leolost/fix-window-clone-container-select-next-crash branch from 30cb69d to ae52c34 Compare August 19, 2024 15:13
@danirabbit danirabbit enabled auto-merge (rebase) August 22, 2024 16:28
@danirabbit danirabbit merged commit 738a1e9 into main Aug 22, 2024
2 of 4 checks passed
@danirabbit danirabbit deleted the leolost/fix-window-clone-container-select-next-crash branch August 22, 2024 16:30
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.

2 participants