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

Theme Manager refactor (prevent freezing on Windows) #5573

Merged
merged 3 commits into from
Jul 7, 2024

Conversation

jonoomph
Copy link
Member

@jonoomph jonoomph commented Jul 7, 2024

This is a refactor of the ThemeManager, making it more thread-safe and less likely to freeze certain versions of Windows. This limits the # of times ThemeManager is imported, and maintains a single reference to the manager instance. It also removes ThemeManager access from the video widget paint method, which was directly responsible for the crash / freeze in certain versions of Windows.

The freeze would manifest itself as an issue with oleaut32.dll in a debugger, which was the last line logged when the freeze would occur. While I never fully found the root cause of the freeze, removing ThemeManager from the video preview widget paint method seems to resolved the issue for testers.

Closes #5549

- Improve thread safety with lock
- Keep 1 reference to manager
- Remove all imports the manager (except 1)
- Added logging if manager is not available, or themes are not found
- This fixes a freeze in Windows on some systems during the launch of OpenShot, related to oleaut32.dll.
@jonoomph
Copy link
Member Author

jonoomph commented Jul 7, 2024

@jonoomph jonoomph merged commit db38836 into develop Jul 7, 2024
8 checks passed
@jonoomph jonoomph deleted the theme-manager-refactor branch July 7, 2024 20:48
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.

App won't load
1 participant