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(gui): remove ExtraMouseButtonEventFilter when closing (#1095) #1768

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

DerekVeit
Copy link
Contributor

Fix #1095

Copy link
Member

@buhtz buhtz left a comment

Choose a reason for hiding this comment

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

Hello Derek,
On behalf of the team, thank you for your contribution and taking
the time to improve Back In Time. We appreciate it.

Your PR will be merged in some days.

See What happens after you opened a Pull Request (PR)? in our FAQ about our usual policy.

Best,
Christian

@buhtz buhtz added the PR: Merge after creative-break Merge after creative-break (min. 1 week) label Jun 23, 2024
@buhtz
Copy link
Member

buhtz commented Jun 23, 2024

Forget it myself. Please add a line to the CHANGES file. Something like this:

fix(gui): Fix Qt segmentation fault with uninstall ExtraMouseButtonEventFilter when closing main window (#1095)

@DerekVeit
Copy link
Contributor Author

Thanks, Christian. I hope I understood correctly. I amended that to the previous commit. Feel free to point out anything I do not quite right. I'll be happy to revise again. I hope to be making more contributions.

@buhtz
Copy link
Member

buhtz commented Jun 26, 2024

I used your script and confirm it might work. With your fix I can start-stop BIT 1000 times without seg fault. But without the fix I do have ~50% of seg faults.

@DerekVeit
Copy link
Contributor Author

I tried it with and without the fix on a few different versions, with Python 3.8, 3.10, 3.12 and BIT 1.2.1, 1.3.2, 1.4.3, 1.4.4-dev (not every combination). I didn't keep statistics, but without the fix, I got segfaults roughly half the time except with 1.4.4-dev and Qt6. With the Qt6 build, the segfaults were much less frequent but did still happen.

It seems there must be some race in the QApplication destruction that determines whether it will have the segfault, and that timing is a bit different with my Qt6 build. Little things, like whether files are in cache, seem to affect it.

But with the fix, I never got a segfault on any version.

@buhtz buhtz added this to the Upcoming release (1.5.0) milestone Jun 27, 2024
@buhtz buhtz merged commit 071fb4b into bit-team:dev Jun 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Merge after creative-break Merge after creative-break (min. 1 week)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault on Exit (Qt)
2 participants