Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Android experiment - [Errno 24] Too many open files

PadPad Posts: 26
edited January 31 in OpenSesame


I have a loop with 24 trials. My droid experiment keeps crashing after something like 20 trials. Here is the error :
IOError: [Errno 24] Too many open files: u'/data/data/nl.cogsci.opensesame/files/tmpK_9ATe.opensesame_pool/ta_14.png'

I found these related topics : topic 1 topic 2 but i counldn't find a solution.

In my experiment i have many audio and image files. I'm strictly using inline_scripts (canvas.image() and sampler() functions) to display the images and play the sound files.

Is there a way to close an image after using it with canvas.image() ?


  • sebastiaansebastiaan Posts: 2,947

    Hi Pad,

    I suspect that this may have to do with automatic garbage collection, which is disabled by default. Instead, garbage (i.e. unused objects) is collected forcibly after every sequence. But if you do everything in one long inline_script, this may result in memory not being freed at all (and perhaps files not being closed, I'm not sure).

    What happens if you untick the 'Disable garbage collection' box in the General Properties tab?


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

Sign In or Register to comment.