Numeric.py memory error

OS (e.g. Win10): Win7
PsychoPy version (e.g. 1.84.x): 1.83.01
Standard Standalone? (y/n) y

Hello,

I have an experiment with four conditions, each cycling several trials with each time the presentation of four slides (priming, fix.cross, image, message slide).
Conditions are appearing semi-randomized. My experiment has 10 blocks total.

At the fourth block (and no matter the condition), some of the slides are not appearing anymore (whereas the exact same slide could have been called in block 1-3 without problem).

After some time of disfunctionning presentation, experiment stops and last call is:

File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\numpy\core\numeric.py”, line 183, in ones
a = empty(shape, dtype, order)
MemoryError

Can’t find anywhere what this files is supposed to do and why it crashes.

We had tested the experiment with shorter presentation times of the slides (to faster get to the end of experiment to check for all image appearing, and correct semirandomization of condition) and experiment runs smooth until the end. Means Routine lasting 1-2 seconds don’t crash, and exact same experiment with Routine lasting 14 seconds do.

If anyone could help me with this, I would be extremely grateful.

I am using the builder and embedding code stretches.

Thank you very much in advance

Elise

My guess is that this is coming from a known memory leak in one of the dependent libararies (pyglet when rendering text). Options:

  • minimise changes to text (certainly make sure it isn’t updating “every frame”)
  • try installing the latest version of PsychoPy (a test release of 1.85.0) is available right now and it should have fixed versions of the broken pyglet libraries installed
  • move to a different computer (ideally a mac) because a) this was mostly an issue on windows and b) I think this depends on graphics car memory. Some machines last a lot longer before crashing.

Dear Jon,

Thank you so much for your rapid answer.

Regarding the proposed options:

There is no update every frame.

Version: The program involves also scripts allowing participants to choose stimuli and which remembers choices to propose other stimuli later on. This code, which is rather complex, runs fine on version 1.83 but not on later version. Since I don’t want to reprogram this complex part, I would like to stick on the current version I use if I can avoid changing version.

We have just tested on another machine and program runs smooth so your input about graphic card memory being into play is probably the good option. We can’t change computer in the lab at this time because we need a machine with a parallel port, which is becoming rare… Will see if I can change the graphic card.

Was also thinking about splitting the experiment in several independent chuncks.

Thanks again for your input and I will update if I find a solution for this problem.

Best

Elise