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 crash on opening folders just pasted into empty folder. #2504

Merged
merged 7 commits into from
Oct 22, 2024

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Oct 10, 2024

Fixes #2495

  • Ensure not using invalid TreeRowReference
  • Add extra null checks
  • DRY getting path from model

To reproduce crash in main:

  • Create an empty folder and navigate into it
  • In another tab, open a folder containing copyable subfolders
  • Copy a folder
  • Paste the copy into the empty folder
  • Immediately click on the (unselected) pasted folder
  • Files crashes with a segfault.

@jeremypw jeremypw added the Priority: Critical Causes Files to crash, hang or otherwise become unusable label Oct 10, 2024
@jeremypw jeremypw marked this pull request as ready for review October 10, 2024 17:27
@jeremypw jeremypw requested a review from a team October 10, 2024 17:27
@jeremypw
Copy link
Collaborator Author

Not sure exactly what causes the crash but have improved the code around where the crash occurs (from the backtrace) to avoid derefencing null or using an invalid TreeRowReference.

Copy link
Contributor

@zeebok zeebok left a comment

Choose a reason for hiding this comment

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

Code seems reasonable and it does seem to fix the issue!

@jeremypw jeremypw merged commit 156092c into main Oct 22, 2024
4 checks passed
@jeremypw jeremypw deleted the jeremypw/fix-crash-openfolder branch October 22, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Critical Causes Files to crash, hang or otherwise become unusable
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Segfault when opening folders that have just been pasted into an empty folder.
3 participants