10 second delay with with GST_STATE_CHANGE_ASYNC

Hello,

PTB: 3.0.16 - Flavor: - Corresponds to SVN Revision
Matlab: 9.7.0.1319299 (R2019b) Update 5
System Details:

Memory 5.7 GiB
Processor: AMD Ryzen 7 3700u with radeon vega mobile gfx x 8
Graphics: AMD Radeon™ vega 10 graphics
Disk Capacity: 256.1 GB
OS Name: Ubuntu 20.04.1 LTS
OS Type: 64-bit
GNOME Version: 3.36.3
Windowing System: X11

We have been running an fMRI experiment in which we show people videos and then have them make ratings. The experiment has run perfectly fine for 23 of 25 participants so far. Recently (with no changes to our code at all), we noticed that for 2 participants the experiment was running 10 seconds too long. When looking at the matlab output, we found:

INFO: Statechange in progress with GST_STATE_CHANGE_ASYNC

Immediately following this in our experiment log, no videos were played for 10 seconds. Then the experiment resumed as expected (ending 10 seconds later than expected).

Based on this .c file, It seems to me like this statechange is causing a set delay of 10 seconds while waiting for the previous state to finish. But I am not sure how to prevent such an overlap in the first place.

Any help on how to prevent/mitigate this issue in the future would be much appreciated.

Thanks!
Luke

Unless you used the optional async flag 4 in Screen('OpenMovie', win, moviename [, async]), in which case there can be other reasons, the most likely cause for a 10 second delay would be a ten second pause of GStreamer in stopping the playback pipeline in the stop call.

Why that would happen, or if it is reliably preventable (could also have been a temporary glitch of your system, e.g., due to some overload like running low on memory, some compute intense process starting in the background like software updates etc.), i don’t know without deeper investigation. If you need further assistance, help PsychPaidSupportAndServices will tell you how to get an hour of my work time for that.

Btw. PTB 3.0.16 is no longer supported. You’d need to upgrade to the latest 3.0.17 beta before trying any further diagnostic.

-mario