Memory leaks in OSweb 1.4 (sketchpad/feedback/sampler)
While running an experiment with OSWeb 1.4, several participants reported the task crashing or sound stimuli getting distorted or stopping playing towards the end of the experiment. In that experiment (with just over 1200 trials, with 2 sketchpads, a feedback object and one sampler used in every trial), it affected about a third of the participants.
I noticed the problem on a couple of computers myself. While I initially thought it had to do with my experiment or the participants' computer, after some investigating, I realized that the problems appears to be memory leaks in OSWeb.
With basic sequences running just a single sketchpad, there is no problem (no leak). However, as soon as a sequence contains more than one sketchpad, a feedback object in addition to a sketchpad, or a sampler, every execution of the sequence leaves memory leaks. When many trials are used, this can result in the experiment malfunctioning or crashing.
Here's a screenshot taken using the browser's developer's tools to track memory usage. This is the result of 50 trials with a sequence involving two sketchpads, a feedback object and a sampler.
I've done tests with very basic tasks, on different computers. Here's a comparison for different sequences involving more or less objects:
I noticed that memory leaks for images was an issue in an earlier version of OSWeb that seemed to have been addressed (https://osdoc.cogsci.nl/3.3/notes/336/), but it looks as if memory leaks remain present in OSWeb 1.4 (for sketchpads/feedback objects, but also for the sampler).
Just thought I'd flag that out as something to look into for the next update.