[solved] "unusual" runtime error
Hello,
My name is Kevin and I am trying to run an experiment in which every trial presents a sequence of videos to the screen. Trials are organized into blocks, which are organized into phases. There are 3 phases, each with 4 blocks, each with 8 trials for a total of 96 trials. I am looping through each phase, each phase, and each trial.
The experiment runs great for a while, but every time I run into one of two runtime errors: either an error that says it cannot load a video file and that I should make sure the file type is supported and that it's in the file pool, or the following:
"Runtime Error!
Program: C:\Program Files\OpenSesame\opensesame.exe
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information."
Every time I run the experiment the error (one of the two) comes up at the same trial. (I tried running it on a different machine, and I still got an error but two trials earlier than I usually do, whatever that means.)
Here is what makes it really weird: every time I receive this error, all of the videos in that error-producing trial have been presented with no problems before the error appeared (in fact, it's really just a few videos that repeat in different combinations over and over). In addition, the error comes up in the middle of a block in the middle of a phase, so it's not an issue of changing loops. In fact, there is nothing different between the trials that come before that particular trial, and the ones that come after. I have the dictionary for each trial printed out as the experiment progresses, so I can see exactly what OpenSesame is trying to present for each trial, and there is nothing wrong or different from all the other trials in the trial where I get the error.
I should also point out that every time I get an error message like that, OpenSesame crashes.
I have no idea what the problem could be, or how to troubleshoot (other than print out exactly what videos it's trying to present for each trial, which I'm already doing).
I would greatly appreciate any insight or suggestions as to how to figure out what's going on and fix the problem.
Thanks so much!
Kevin
Comments
Hi Kevin,
I see, that's unfortunate. This type of hard crash points towards a crash somewhere in the underlying libraries. Like you, I suspect that the problem lies with the media_player plug-in, which uses a set of libraries that are not always as stable as they ideally would be. The fact that the videos appear to have been played without any apparent crash doesn't necessarily mean that they are not nevertheless the source of the crash.
You mention that the crash always occurs at/ after the same trial. Does that mean that it appears to be triggered by a particular video file? If so, is there something different about the video format of the file? (Even if they have the same extension (.avi, say) the video format might still be different.)
I'll also pass this on to Daniel, the developer of the media_player plug-in. Finally, if the problem is really a show stopper for you, you could consider using the psycho back-end and scripting the video playback (not as easy though): http://www.psychopy.org/api/visual/moviestim.html
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
As to whether it's a particular video, I have different conditions (with different videos in different conditions), and the error always comes up at the same spot, even though it's completely different videos. Also, the sequences of the videos are randomized each time, so even in the same condition it's a different assortment of videos for each particular trial every time the experiment is run. So, I don't see how it could be a particular file. Now that you mention video formats, though, I could try converting all the videos to a different format (now they are in .mov, but I could change them to .avi or something similar)--maybe the media player just has problems with .mov's? Otherwise I may have to try the psycho back-end unless Daniel has any ideas.
Thanks!
Kevin
Just as an update I tried converting the videos to a different format (.avi's), and still received a runtime error, although in a slightly different place in the experiment. I guess it's on to psychopy!
Thanks,
Kevin
I see, that's a shame.
You may want to take a look at this discussion, which has a bit of code and info on playing videos using PsychoPy: http://forum.cogsci.nl/index.php?p=/discussion/137/open-simultaneous-image-video-and-sound-presentation#Item_4
Cheers!
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi both, sorry for my late response, but I have been caught up in other work. Kevin, could you send me your experiment? I assume it will be a large file, so you can use megatransfer or wetransfer.nl to send it. I remember having had the same issue with one of my own experiments, but I had trouble reproducing it. If your experiment consistently crashes at the same point, I can go bug-hunting more efficiently.
My hunch is that the problem lies with releasing the handles to the video. As Sebastiaan said the media_player plugin depends on third-party libraries that are not always well maintained and can be buggy. I think this library does not always let go of the video file whenever I tell it to in media_player and the video file is seen as "in used" next time the plug-in tries to access it. This is just my assumption however and I have not been able to verify this. Your experiment might assist with this.
Have you resolved your issue in another way in the meantime?
Alas, it has yet to be resolved.
I'd be happy to send it to you--is there an e-mail address I can send it to?
Thanks!
Kevin
Hi Kevin,
I took a look at it and encountered the same problem as you did. I have yet to find out what the cause is, as this is especially difficult because it involves a 'hard crash'. I don't get a stacktrace or indication of where in the code the problem lies. I thus need more time to get to the bottom of this. There is another version of the media player which uses VLC as a backend, but this is plug-in is highly experimental as well. On windows 7 and Linux it seems to run with few problems, but with XP I often get black screens as the plug-in fails to obtain the window handle in which it should display the video. As you can see it is quite difficult at the moment to obtain reliable video playback in python.
I'll keep you posted about my findings of a solution to your problem.