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: selection export dialog failing silently, code cleanup, #1227

Merged
merged 2 commits into from
Sep 28, 2024

Conversation

flxzt
Copy link
Owner

@flxzt flxzt commented Sep 20, 2024

upon pressing the selection export confirm button, the callback responsible
for exporting only took a weak ref to the selected file.
This in turn caused a race condition where the task executing the export raced
against the dialog callback being finished, where the selected file is dropped,
causing the weak ref upgrade to fail.

fixes #1199, closes #1201

upon pressing the selection export confirm button, the callback responsible
for exporting only took a weak ref to the selected file.
This in turn caused a race condition where the task executing the export raced
against the dialog callback being finished, where the selected file is dropped,
causing the weak ref upgrade to fail.
Copy link
Collaborator

@Doublonmousse Doublonmousse left a comment

Choose a reason for hiding this comment

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

I didn't realize that the selected_file was not going through the weak reference once more for the selection export whilst it wasn't part of the #[weak] variables for the other modes.

Hence with this the three modes are indeed identical (whereas I stopped midway).

Lgtm

@flxzt flxzt merged commit bbf5417 into main Sep 28, 2024
2 checks passed
@flxzt flxzt deleted the fz/fix-selection-export-silent-fail branch September 28, 2024 04:41
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.

exporting selection doesn't work
2 participants