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

Handle restoring non-existent locations #2303

Merged
merged 6 commits into from
Sep 25, 2023
Merged

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Aug 30, 2023

Fixes #1753

  • Make the restoration process asynchronous
  • Check fileinfo before creating tab
  • Make consequential changes, checking whether adding tab succeeds where necessary
  • Make default_location and default_mode read-only properties for convenience

Because of the timing changes caused by async functions a regression was introduced where two tabs were added when the last tab in a window was removed. This was fixed by removing the unnecessary handler for the page-detached signal. All the necessary work is done in the close-page signal handler.

Marking as high priority since the OP reported a crash linked to restoring a location that no longer exists, although I have not been able to reproduce that on my system.

@jeremypw jeremypw marked this pull request as ready for review September 18, 2023 17:47
@jeremypw jeremypw added the Priority: High Significantly affecting majority of users' normal work label Sep 18, 2023
@jeremypw jeremypw mentioned this pull request Sep 20, 2023
1 task
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to fix some warnings but I can't confirm a crash in main 🤷‍♀️

@danirabbit danirabbit merged commit 830694e into main Sep 25, 2023
4 checks passed
@danirabbit danirabbit deleted the handle-restore-nonexistent branch September 25, 2023 17:21
@jeremypw
Copy link
Collaborator Author

@danirabbit Yes, same here (see #1753 (comment)). Presumably a timing issue only affecting some systems, but the code was flawed anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Significantly affecting majority of users' normal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files crashes immediately after opening
2 participants