Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

OpenSesame keeps crashing

Hi!

When running my experiment, Python keeps crashing. Sometimes it happens earlier in the experiment, sometimes later in the experiment. It is an EEG-ET experiment, so perhaps pretty demanding for the computer. Perhaps the RAM gets overloaded or something. Have you encountered this before, and do you perhaps have solutions?

I know it's a vague description, but since I'm not sure where the problem lies I don't know what information to add. What would help to better understand the problem?

Thanks a lot for thinking along.

Comments

  • Hi @JJT ,

    I assume that you get the message "Python seems to have crashed (...)"? This can occur for any number of reasons, and since there is generally no clear error message, it's really hard to debug.

    • First, I would take a look at the console to see if the Python crash is preceded by a more informative error message (i.e. an actual Traceback). This happens sometimes if a 'regular' Python error occurs first, and then causes Python to shut down completely later on.
    • If memory is full, this will indeed also cause Python to crash. To check this, you can have a task manager run in the background, and then check what happen to memory consumption prior to the crash.
    • If it's none of these things, then it's likely a bug in one of the underlying Python libraries, something very difficult to track down and solve. Using a different back-end might be a work-around, if possible.

    — Sebastiaan

  • Hi Sebastiaan. Thanks for helping! The issue seems to be resolved by using a different back-end. I've now switched from Expyriment to Psychopy.

    I now have another (more minor) problem after the switch: the response-mapping of the keypad numbers seems to be different between back-ends. One of the responses that participants have to give is KP6 (key-pad 6). However, that doesn't seem to work anymore. Do you know of any differences between the back-ends and the response-mapping of the keypad numbers? More specifically, how to define KP6 with the Psychopy backend?

  • Hi @JJT ,

    I'm not sure how the backends affect the registration of special keys like the keypad's, perhaps @sebastiaan will be able to tell you more about this, but just in case it helps, here's a pragmatic suggestion: Can you try just outputting the response to the screen or to the console? That way you'll be able to see what OpenSesame registers exactly. On my computer, when I press 6 on the keypad, I get "6" under xpyriment and legacy, and I get "num_6" under psycho and Psycho_legacy (PsychoPy). I do remember I got KP6 in some task on my previous computer. Not sure whether it can change based on your hardware (laptop vs desktop, keyboard numpad vs USB numpad device, etc.). But just displaying what is being registered in the response variable on the computer on which you're running your experiment should allow you to determine what is being registered when you press a key on your numerical pad.

    If you wanted to be able to identify when subjects are pressing, say numpad key 6, you could also use code to redefine the response as the last character on the right of the response variable. So, if the response variable contains "KP6", "6", or "num_6", by setting response to the last character on the right of response, you'd get "6" in all cases.

    Does that help?

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi! That indeed helped, I used your script to find out which key I needed to define. It turns out that with the psychopy backend, the keypad key is "num_6". With the experiment backend, it's "KP6".

    Thanks a lot :)

Sign In or Register to comment.