Access violation error when playing movie files

Hi,
I am currently setting up a very simple study where participant watch a video and subsequently give a rating response. The videos are 20 s long, so to facilitate testing, I cut them short to just 1 sec using the stop duration parameter.
This works fine when playing just a single video (i.e directly providing the video filename in the movie properties). However, when I put a loop around the the routine to play a different movie on each repeat, I get the error shown at the bottom.

I have a work around (by leaving the ‘stop’ property empy), but thought I’d share this here in the hope that it is helpful for others.

Exception ignored in: <bound method MovieStim3.del of <psychopy.visual.movie3.MovieStim3 object at 0x0000017FDBBD9AC8>>
Traceback (most recent call last):
File “C:\Program Files\psychopy\lib\site-packages\psychopy\visual\movie3.py”, line 568, in del
self._unload()
File “C:\Program Files\psychopy\lib\site-packages\psychopy\visual\movie3.py”, line 545, in _unload
self.clearTextures()
File “C:\Program Files\psychopy\lib\site-packages\psychopy\visual\basevisual.py”, line 1270, in clearTextures
GL.glDeleteTextures(1, self._texID)
OSError: exception: access violation reading 0x0000000000000000
Exception ignored in: <bound method MovieStim3.del of <psychopy.visual.movie3.MovieStim3 object at 0x0000017FDF8DB080>>
Traceback (most recent call last):
File “C:\Program Files\psychopy\lib\site-packages\psychopy\visual\movie3.py”, line 568, in del
self._unload()
File “C:\Program Files\psychopy\lib\site-packages\psychopy\visual\movie3.py”, line 545, in _unload
self.clearTextures()
File “C:\Program Files\psychopy\lib\site-packages\psychopy\visual\basevisual.py”, line 1270, in clearTextures
GL.glDeleteTextures(1, self._texID)
OSError: exception: access violation reading 0x0000000000000000

Experiment ended.

Does this post help?

Hi,
no, I don’t think the filenames are the problem here. The videos do play in a loop when I leave the duration field empty, it is only when I try to restrict the duration to 1 s that the access violation error occurs

Instead of setting the duration of the video component to 1 second, try leaving it blank and putting the following in the Each Frame tab of a code component in the same routine.

if t > 1:
     continueRoutine = False

Hi @Henning_Holle I am curious if this suggestion solved the problem? What version of PychoPy are you in?

Thanks,
Becca

Sorry for my late reply, just to confirm that this got rid of the error and videos now also play online for just the specified duration. Many thanks!

Do you think that the full second is seen or is some lost due to the time the video takes to load? I’m not 100% sure when the Routine timer starts.

I am afraid I don’t know how to check for that, but have just shared the project with you

I’ve just done a screen recording and had times of 4.04-5.03; 5.03-6.04 and 6.04-7.05 which I think is probably within the limits of my measurement accuracy.