| Reference | Downloads | Github

WindowsError: exception: access violation writing 0x00000004

OS: Win10
PsychoPy version: 1.85.0
Standard Standalone?: yes, from github, release Feb 27 (I’m limited to 2 links, gotta prioritise)
What are you trying to achieve?: Participants hear sound clips and orthographically transcribe what they hear. The experiment is 180 trials, with each transcribed sentence averaging 30 characters. I’m using the inputText code provided here. The experiment crashes after 144 trials with the following error:

Running: C:\Users\path\
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File “C:\Users\path\”, line 1931, in
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\visual\”, line 621, in flip
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\visual\”, line 739, in draw
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\font_init
.py", line 565, in draw
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\text\”, line 852, in draw
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\graphics_init
.py", line 554, in draw
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\”, line 486, in
(lambda d, m: lambda: d.draw(m))(domain, mode))
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\pyglet\graphics\”, line 313, in draw
glDrawArrays(mode, starts[0], sizes[0])
WindowsError: exception: access violation writing 0x00000004
Exception TypeError: “‘NoneType’ object is not callable” in <bound method Server.del of <pyolib.server.Server object at 0x196A5A90>> ignored

What did you try to make it work?: Starting a few weeks ago, using v1.84.2, the experiment was crashing after 144 trials, throwing the same error as above. I cut the experiment in two parts, one with 75 trials, one with 105, and that seemed to work fine for several runs. On the last run (yesterday), part 2 (105 trials) crashed after 75 trials, same error. I updated to 1.85.0 and it successfully ran through both parts of the experiment (after I added “import sys” to my local file), but when I tried running the full 180-trial experiment it crashed after 144 trials again. Having the experiment cut in two is fine, but I’m concerned it’ll start crashing after 75 trials again, since that happened before using 1.84.2 without any changes to the experiment.

I was going to try switching out visual.TextStim for visual.TextBox as once suggested, but can’t get the demo for TextBox to work. It opens a blank grey box for about a second and then closes, no error reported.

Thanks for any help/advice/suggestions!


To get to version 1.85 did you install the whole package or just update an existing standalone installation using the zip file?
The reason I ask is that there used to be a problem with pyglet text but I think the latest Standalone package should have provided a newer version of pyglet with that memory leak fixed. Because that isn’t a PsychoPy problem per se it wouldn’t be solved by updating with the zip file if that makes sense.