Race condition/deadlock between Natron::SplashScreen and PyModalDialog created in onProjectCreated callback #487
Labels
difficulty:easy
Easy-to-solve bug
func:gui
prio:normal
status:confirmed
status:fix-commited
type:bug
Something isn't working
ver:2.x
Problem
I've written an
onProjectCreated
callback that prompts for certain information needed when setting up a new project in our environment (you can always click 'cancel' if you want a bare Natron project instead). It prompts for this information using aPyModalDialog
.However, there seems to be a race-condition/deadlock between
PyModalDialog
andNatron::SplashScreen
. When my callbackexec_()
s the modal dialog, all other processing stops until the dialog completes, as expected. Unfortunately, this happens while the Natron splash screen is still displayed, showing the "Checking if updates are available" message. The modal dialog is behind the splash screen, and can't be interacted with; the splash screen, meanwhile, will not proceed past 'Checking if updates are available' while the modal dialog is open. The deadlock can be broken by pressing the Escape key to cancel the dialog, but then you don't get to actually use the dialog.Expected behavior: Any one of the following:
onProjectCreated
callback should not be processed until after splash screen (and related background processing) is completed.It's worth noting that the "An auto-saved project was found with no associated project file" modal dialog waits patiently for the splash-screen to close before it is displayed; this is probably a good model to follow for the
onProjectCreated
callback as well.Actual behavior: Modal dialog appears behind splash screen, preventing the splash screen from closing.
Steps to Reproduce
initGui.py
:Versions
The text was updated successfully, but these errors were encountered: