Pavlovia Experiment - Stuck on loading

Thanks so much, @jon.

I see! If that’s the case, it looks like my own index.html file also has an extra “./” in front of the references to my .js : Sign in · GitLab

Should I correct this in the way that @jeffbye did above? (Even if most runs are working fine?)

Hm, thanks for thinking this through with me. So the AudioContext bit was actually only a warning message. The error itself is the “Failed to load resource: the server responded with a status of 404 ()” thing that led me to this thread :slight_smile: Here’s the screenshot my piloter sent me.

In fact, they were able to get through a few routines with sound playing normally in all those items. This includes other routines where sound plays before any keyboard input. Once they got maybe 4 or 5 items into a new routine, then the screen froze and went back to the ‘initialising the experiment’ page shown here.

This makes it seem like it isn’t an across-the-board issue with sounds being played upon start of a routine. Any thoughts? Thank you again!!

The favicon error is a red herring, not really related to the problem at all. What it does suggest is that the page has been refreshed or reloaded, which is why it lands back on initializing the experiment, and that I’m rather confused by.

I agree with Jon about the warning being primarily a security issue of some kind. I discovered recently that Chrome has a security feature where auto-playing videos are halted if the user has not clicked on the page prior to that point or the videos are muted. However, this shouldn’t affect Pavlovia as they have to click “OK” to start the experiment, which should count.

The fact that it freezes after some number of items, and that it’s not consistent, could suggest either a memory issue or an issue with a specific audio file. Does this problem arise on a specific trial or when a specific sound is supposed to play?

I see - yeah, I was wondering how we got sent back to the ‘experiment initializing’ page and why favicon was involved.

As for the AudioContext warnings, the user had already pressed a number of keys on the keyboard (to advance through items) by the point this happened, in addition to clicking ‘Ok’ to start! Mysterious.

No, it doesn’t arise on a specific trial or a specific sound - rather, I think you’re right about this being related to memory, specifically, due to how I’m presenting image stims in various routines. I described my issue in more detail, including the fixes I’ve tried, here (Online frame refresh rate? frame-based coordinate updates for images are jittery online), but basically I think image stims that are being updated for position and size on every frame in some routines are too memory intensive. I made some changes (moving trials that didn’t need those animations to new routines with constant positions and sizes for those image stims, resizing the pixel resolution of my image files), which helped stop memory-based crashes for a different piloter (using a different laptop/browser combo).
However, these don’t seem to have done much except slightly delay the point at which these errors show up for the original piloter.

Do you think it is mostly a memory issue, or might there be a specific browser security issue interacting with it? (If it’s the latter, I’m wondering whether there’s a specific security setting on Chrome (for Windows) that I can direct participants to change.)

Thanks again.

The kind of security warning you’re getting can’t be changed in settings as far as I know. Memory is the most likely culprit. Every frame code can put a lot of load on memory, see this thread: Update every frame doesnt work

It may simply be that older computers don’t have the memory for it. You could advise people to close as many background programs as possible, but unless you can find a way to optimize memory usage further, this may not be readily fixable. @jon or @dvbridges might have further optimization advice, but as far as I can see you’ve done most of the obvious things (reduce file sizes etc.).

1 Like

Dear experts/programmers,

I just came across a similar issue of stucking on “initialising the experiment” for my master thesis… I’ve read all the posts of relevant questions but the answer seems to be different to mine and not easy to apply for a green hand of programming…Would you please have a look at the document of the experiment? I’ve made the code public. Thanks in advance!
The code: https://gitlab.pavlovia.org/s8yuzhao/homer00ps_b
The link to experiment: https://run.pavlovia.org/s8yuzhao/homer00ps_b/html/