Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Python crashes

claudieclaudie Posts: 11
edited March 20 in OpenSesame

Hi everyone,
I am facing an issue while running my 2 block experiment on OpenSesame, it crashed in between the two blocks and I get the following message:

Starting experiment as ExperimentProcess-1
Expyriment 0.8.1.opensesame2 (Python 2.7.12) 
openexp.sampler._legacy.init_sound(): sampling freq = 48000, buffer size = 1024
openexp.sampler._legacy.init_sound(): mixer already initialized, closing
experiment.run(): experiment started at Fri Mar 17 10:53:25 2017
experiment.run(): disabling garbage collection

Python seems to have crashed. This should not happen. If Python crashes often, please report it on the OpenSesame forum.

item-stack:
time: Fri Mar 17 11:03:28 2017

I have tried running the second block first and vice versa, the experiment keeps crashing between the blocks regardless.

It worked fine before and I have to start running participants next week so any help would be greatly appreciated !

Many many thanks,
Claudie

Comments

  • sebastiaansebastiaan Posts: 2,592

    Hi Claudie,

    The first thing to try (if you haven't already) is to restart your computer. If that doesn't fix it, could you please provide more information?

    • What kind of operating system are you using?
    • What version of OpenSesame?
    • Does this always happen at the exact same moment?

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • claudieclaudie Posts: 11

    Hi Sebastiaan,

    Thanks for your reply.

    I have indeed tried restarting my computer several times, and the problem is still there.

    I am using a Dell Intel Core desktop and windows 7.
    Version of OpenSesame is 3.1.4
    And yes- it does always happen in the transition between my two experimental blocks (no matter which one comes first)

    Thank you so much for your help,
    Claudie

  • sebastiaansebastiaan Posts: 2,592

    Hi Claudie,

    In that case, it would be best if you attach the script to this discussion, so I can see if there's an obvious explanation for why this might happen.

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • claudieclaudie Posts: 11

    Apologies for the long post, I wasn't sure which script you'd want to look at so I thought I'd paste the entire general script.

    Thanks for your precious help!

  • sebastiaansebastiaan Posts: 2,592

    Hi Claudie,

    You can attach the experiment file using the attachment icon on this forum. Could you attach your experiment file that way? That's a bit easier ;) (I deleted the posts with the script text.)

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • claudieclaudie Posts: 11

    Oops. Sorry about that, please find the experiment file attached :)

  • sebastiaansebastiaan Posts: 2,592

    Hi Claudie,

    This is really nothing more than a guess, but it might the videos. If you remove all media_player_mpy items from the experiment, is the crashing gone?

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • claudieclaudie Posts: 11

    Hi Sebastiaan,

    Yes , it works fine when all videos are removed. Problem is the videos are the core of my experiment.Do you think it has to do with the video format?

    Thanks!

  • sebastiaansebastiaan Posts: 2,592

    My first thought is that your system may run out of memory. Under Windows you can monitor usage through the Task Manager. If you open the Task Manager while your experiment is running (with videos), do you see memory filling up (and if so, how much)?

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • claudieclaudie Posts: 11

    Hi Sebastiaan,

    I just tried running the experiment with the Task Manager opened and I the CPU usage goes up to about 25% whereas the Memory doesn't seem to me moving up much. However when I look at the physical memory box, I see that the free amount of MG goes from 489 to under 100 when the experiment is running. Is that the problem?

  • sebastiaansebastiaan Posts: 2,592

    I see that the free amount of MG goes from 489 to under 100 when the experiment is running. Is that the problem?

    Possibly, yes. Does it go all the way to 0 Mb before crashing?

    @Daniel, do you have some ideas? This experiment is quite video heavy, and I suspect that it crashes because it runs out of memory.

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • DanielDaniel Posts: 364

    I don't really have a clue. I did my best to let the player clean up when it can. Playing videos is a heavy operation in the plugins current form, as the frame loading is not hardware accelerated (rendering of the video frames is is). Players like vlc have a way to decode and render frames all in video memory, but currently media_player_mpy decodes the videos in normal RAM and then passes them to the video memory. I have searched endlessly, but I didn't find a way to also perform the frame decoding in video memory.

    Considering this experiment heavily depends on videos according to Claudie, it may be that too many videos are loaded at the same time in the prepare phase? @claudie Maybe you can slowly increment the number of videos you have in your experiment and see after it crashes after a certain point? Then you know for sure the amount of videos is the problem.

  • claudieclaudie Posts: 11

    Hi Daniel and Sebastiaan,

    Thank you both for your help. I'll have a try at decreasing the number of videos, however the one thing I find a bit strange is that the experiment has worked just fine in the past with the same number of videos (and the videos were even longer than they are now), could it be that my desktop has now less free memory than before?

  • sebastiaansebastiaan Posts: 2,592

    however the one thing I find a bit strange is that the experiment has worked just fine in the past with the same number of videos (and the videos were even longer than they are now), could it be that my desktop has now less free memory than before?

    Were these videos of a different format? Or perhaps the same format but a lower resolution?

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • claudieclaudie Posts: 11

    No - my videos are all the same (created with Blender software)

Sign In or Register to comment.