psychopy.org | Reference | Downloads | Github

Psychopy freezes - troubleshooting advice?


#1

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): OSX El Capitan 10.11.6 & OSX Sierra 10.12.6
PsychoPy version (e.g. 1.84.x): 1.84 & 1.85.6 & 1.85.4
Standard Standalone? (y/n) If not then what?: yes
What are you trying to achieve?: Looking for advice to debug an fMRI task - task freezes under certain conditions (on OSX El Capitan, 4 GB memory, psychopy v 1.85.6) and can’t figure out why. It will freeze (unresponsive to button presses, esc key, will not advance to next routine) at seemingly random points in the trial loop (sometimes 20 trials in, sometimes 100, etc.). Have to force-quit out of the task each time. When I do that, there is no error message, no csv of data, and a written, but completely empty log file. Since there doesn’t seem to be many clues upon force-quitting, I’m having trouble determining what might be causing this problem.

What did you try to make it work?: I’ve tried the task on a 2nd computer (OSX Sierra; 16GB memory; psychopy v 1.85.4) and I can’t recreate the freezing here, leading me to believe that maybe it’s a memory problem. That said, I can’t figure out what’s going wrong that it is requiring a TON of memory, if that’s the case. I also don’t know why I wouldn’t get a memory error message. I’ve also tried running in different versions (1.84), and the problem still occurs.

What specifically went wrong when you tried that?: No error message except the error messages I get all the time, even when the task works:

1.5902 |ERROR |Requested audio device ‘auto’ that is not available on this hardware. The ‘audioDevice’ preference should be one of [u’Built-in Output’]

13.8349 |WARNING |psychopy.parallel has been imported on a Mac (which doesn’t have a parallel port?)

Any advice for how to best troubleshoot this given no logging and/or known issues would be much appreciated. Thanks!


#2

I just want to add an update to this…

When I compile the script and run the task from the coder window, it works. However, it still freezes when I run the same task (same version/same computer) from the builder. Does anyone know what could possibly be causing this behavior?

Thanks for your help!


#3

I have absolutely the same problem.
on windows computer after 30 minutes experiment freezes (only ctrl+alt+del works to close the program), on mac computer after plus minus the same 30 minutes, experiment freezes (it steel works - RDK task, so dots are moving, but it does not allow any respond --> the only way is to escape the experiment).

I tried to do it with 1.85.2 and 1.90.3 versions for both mac and windows but the problem still the same. experiment crashes
I really hope on someone’s answer, because it is totally unclear how to deal with it


#4

I also have this problem! The program works perfectly about 7/10 times I run it. But the other times, it becomes unresponsive on the final screen. The program should quit once the participant presses the spacebar, but sometimes it does not respond. This is a problem because the .csv data file does not save if the program does not quit properly.

I’m using psychopy v 1.90.2 on MacOS High Sierra v 10.13.6. The program was built in and runs from the coder view.

Here’s the code where the problem sometimes arises. The program remains on that final screen (with text displayed) regardless of which keys are pressed. When this happens, the only way to get rid of the final screen is to force quit, but the .csv data file does not save in those cases.

if end == 1:
    win.clearBuffer() #make screen black
    endText = visual.TextStim(win, text='Thanks!  You have finished the experiment.\n\nPlease notify the experimenter.', color='white', height=40, wrapWidth=winWidth)
    endText.draw()
    win.flip()
    event.waitKeys()
    core.quit()

#5

I don’t know the answer to the first one from the information given. For the issues of @Asvarisch and @ZachB27 my guess is that PsychoPy isn’t “freezing” (if it’s still updating the RDK then it clearly hasn’t frozen) but just that you’re requiring a keypress to advance and the keypress isn’t being detected.

Various ways that can occur:

  • the keyboard component isn’t set correctly (e.g. the stimulus has infinite duration but the keyboard stops being read after 1 second)
  • the user has clicked on a different window (or screen) so the key presses are not being sent to PsychoPy (maybe the experimenter has a second screen and is typing into their notepad, but now the participant can’t respond)

Basically it’s hard to know what you’ve done, but I suspect they aren’t psychopy bugs as much as user errors