There have been two instances in running our study when OpenSesame will exit out of the experiment and display the "finished" screen before the code should be finished running. We are using OpenSesame 3.1.2 with Python 2.7.12. This older version of OpenSesame is being used because we are also running PupilCapture (from PupilLabs) 1.18 at the same time.
The task we are using is a modified version of the SART, a number task with 324 trials and a break near the halfway point. The first time this error occurred, OpenSesame quit and displayed the "finished" screen after the 168th trial, which is the trial before the break. The data for the 168 trials was logged correctly, but the port to the eye tracker was not closed. This would mean that it executed some of the closing code, but not all of it?
The second time this error occurred was 2 months later using all of the same equipment. This time, it quit and displayed the "finished" screen after the 149 trial, which is well before the break. Again, the pupil recording was still going, so that code was not executed. I recognized the error this time and was able to check for errors. There was no errors of any kind in the debug window of OpenSesame or in the similar window in PupilCapture. In both cases, the participants claimed to have only pressed the target keys.
I'm afraid I don't have much more information about the problem, as it has been impossible to recreate so far. There is seemingly nothing in the code that is causing it. We've used this exact task successfully many more times than unsuccessfully. Is this something that has been observed before? Is there any way to fix it?