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

Don't kill the WebView on aboutToQuit #4174

Merged
merged 2 commits into from
Jul 9, 2021

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Jun 4, 2021

I screwed up. A while back, I connected PyQt5's QApplication.aboutToQuit signal to the deleteLater() slot of the WebView, intending it to clean up just before shutdown.

Turns out, PyQt5's implementation of QApplication emits that signal every time the user types anything on the input line, when running Python interactively, making the interactive shell essentially useless.

Merging this might bring back some crash-on-quit issues that the signal's destruction of the Timeline was preventing, but we should be able to find another solution. (Maybe connecting QApplication.quit to the slot, instead of aboutToQuit.)

I also added a debug log in OpenShotApp.cleanup(). It's connected to OpenShotApp.aboutToQuit as well, and I'm concerned the same issue could be causing excessive calls to that method, even though we can't see them.

Turns out, PyQt5's implementation of QApplication emits that signal
every time the user types anything on the input line, when running
Python interactively.
@ferdnyc ferdnyc added the interface GUI / user interface issues (i.e. windows, buttons, scrolling, pop-ups, etc...) label Jun 4, 2021
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jul 9, 2021

It should be safe to use app.lastWindowClosed() as our trigger to deleteLater() the Webview, so I've added that in to replace the aboutToQuit connection.

@ferdnyc
Copy link
Contributor Author

ferdnyc commented Jul 9, 2021

That passes, so I'm going to merge this to get the code out there. Hopefully we won't see any uptick in crash-on-exit reports, but if we do we can always revert.

@ferdnyc ferdnyc merged commit dd25437 into OpenShot:develop Jul 9, 2021
@ferdnyc ferdnyc deleted the fix-timeline-interactive branch July 9, 2021 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface GUI / user interface issues (i.e. windows, buttons, scrolling, pop-ups, etc...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant