I’m running PsychoPy v2024.1.5 on a Windows PC.
If I compile any Builder program (including the Stroop demo program) to generate Python code and then run the Python code in Coder, the program attempts to restart a few seconds after starting the trials loop.
The attempt to restart is evident from the appearance of a second ‘expinfo’ dialog window. If I click ‘OK’ in the dialog, the program restarts, then again displays an ‘expinfo’ dialog window a few seconds after starting the trials loop (and so on, ad infinitum, if I keep clicking ‘OK’); if I click ‘Cancel’ (or do nothing, leaving the dialog alone), the program continues as normal. If I comment out the line in the program that calls the ‘showExpInfoDlg’ function (and provide my own value in the code for the ‘expInfo.participant’ variable to prevent the program from crashing), the program skips the ‘expinfo’ dialog window and simply restarts a few seconds after starting the trials loop, then restarts again a few seconds after starting the trials loop, and so on.
Interestingly, if I click the display with the mouse while on the instructions page (i.e. before starting the trials loop), the program no longer attempts to restart a few seconds after starting the trials loop. I thought at first that clicking the display with the mouse might simply be bringing the display to the front and thereby hiding the second ‘expinfo’ dialog window, but I can see that this is not the case, for several reasons. First, if I wait for the second ‘expinfo’ dialog window to appear before clicking the main display with the mouse, the ‘expinfo’ dialog window is hidden, but becomes visible after the program ends, whereas if I click the display with the mouse while on the instructions page there is not an ‘expinfo’ dialog window visible after the program ends. Moreover, if I comment out the line in the program that calls the ‘showExpInfoDlg’ function, clicking the display with the mouse while on the instructions page prevents the program from restarting a few seconds after the start of the trials loop, and this clearly has nothing to do with putting the restart on hold by hiding the ‘expinfo’ dialog window. So, clicking the display with the mouse while on the instructions page actually prevents the program from attempting to restart.
I have also tried clicking the display with the mouse after the onset of the trials loop but before the second ‘expinfo’ dialog window appears (since there is always a delay of a few seconds before it appears). With the unmodified version of the program that calls the ‘showExpInfoDlg’ function, this prevents the second ‘expinfo’ dialog window from appearing but it is in fact present and hidden behind the main display, since it becomes visible after the program ends. With the modified version of the program that does not call the ‘showExpInfoDlg’ function, clicking the display with the mouse after the onset of the trials loop but before the second ‘expinfo’ dialog window prevents the program from restarting, which does not seem consistent with the behaviour of the unmodified program.