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 double item deletion crash #1955

Merged
merged 2 commits into from Jul 7, 2020
Merged

Fix double item deletion crash #1955

merged 2 commits into from Jul 7, 2020

Conversation

pfaion
Copy link
Contributor

@pfaion pfaion commented Jul 6, 2020

Fixes part of the issue described in #1918:

When hitting the Delete button multiple times when the UI is blocked, Player would crash on resume.
On current develop it will not crash anymore, but display Error: Cannot delete calibrations from other recordings!, which is also wrong.

This happens on Windows (maybe on macOS, too?), but not on Linux.
The reason is that spawning processes on Windows takes so long that the UI freezes for a second, which is enough time to double-click the delete button.

I caught the case in the base UI for completeness but needed to handle it also in the calibration UI because this is where the wrong error message would be thrown.

If the UI thread blocks for a brief period of time and you press the
delete button multiple times, the callback will all be run sequentially.
So we need to ensure this function does not crash.
Deleting without an item would show the error message for deleting
calibrations from other recordings.
@pfaion pfaion requested review from papr and romanroibu July 6, 2020 16:10
@papr papr merged commit 9f0de9f into develop Jul 7, 2020
@papr papr deleted the fix-double-delete-crash branch July 7, 2020 10:14
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.

None yet

3 participants