URL of experiment:
Description of the problem:
MovieStim appears to be frozen and TextStim, ImageStim & Rect disappear
MovieStim repeatedly shows a frozen version of a previous video in our trial loop, instead of playing the correct current video in the trial loop. Typically the audio for the correct video plays during display of the frozen frame of the previous video.
We initially thought it was because we had a problem with the URL and for some reason the program wasn’t able to track down the url. On debugging we found out the url is correct, and we can access it without any problem.
TextStim, ImageStim & Rect disappear:
These components disappear, and reappear if we change the size of the window.
And the text/polygon problem:
On further investigation think we don’t have any direct control over this problem of “CONTEXT_LOST”, as this is not an error to catch and handle. What we understood about this error is that it is related to the browser releasing resources to reduce load on GPU.
Things we tried:
- Changed video backend choices - moviepy, avbin, opencv. No difference, so all videos are currently set to use moviepy.
- Ran a version with fewer videos (only 4) and increased repetitions of the trial loop to run for longer periods of time to simulate the time used for a longer list of videos. This did not change the error, we encountered the same error at approximately the same experimental time as when running a single repetition of a longer list of unique videos.
- We tried to reinitialise MovieStim variable in the FrameRoutine, this kind of solved the problem but then we were left with the final frame of moviestim persisting on the on screen. For hiding this video frame we tried
a) setautoDraw(false) : Still resulted in WebGL problem
b) changing opacity or size : Still resulted in WebGL problem.
Things we wanted to try but couldn’t:
Creating an eventlistener to identify if WebGL context lost error has been thrown, if true we would reinitalise components such as MovieStim,ImageStim,TextStim and Rect and restore context.
How to reproduce:
Processor Intel(R) Core™ i9-9900X CPU @ 3.50GHz, 3504 Mhz, 10 Core(s), 20 Logical Processor(s) Installed Physical Memory (RAM) 64.0 GB
Running the experiment on chrome on the above mentioned machine never produced a glitch/error as it had no need to release resources.
A) MacBook Pro 2019 - 2.6 GHz 6-Core Intel Core i7, 32GB 2667 MHz DDR4, Intel UHD Graphics 630 1536 MB
B) MacBook Pro 2016 - 2.6 GHz Intel Core i7, 16 GB 2133 MHz LPDDR3, Intel Graphics 530 1536 MB
C) iMac 2018
It has run on A for about 9.5 minutes, B for 21 minutes, and C for about 9.5-10 minutes. Chrome as the web browser for A&B, unknown browser for C.
We released the task to 10 participants through mTurk (unknown hardware configurations) to see if some computers would be able to get through it. 0/10 were able to complete it, and some reported errors very early on, earlier than we have ever seen errors. The only saved data was from a participant who was able to get through 4 videos. According to the data file, that person was using a Mac computer.
- First of all is the code correctly set up? by this we mean, aren’t we breaking any syntactic / structural rule while using a component?
- Any suggestions for further ways to approach this problem?
- Does reinitialising work, if yes how to hide it on the frames where we don’t want it to be displayed?
- Is there a way to handle WebGL, that pavlovia endorses and that we should know and follow?