URGENT! Brush component randomly crushes the experiment

Hi all,

I am using the brush component in the experiment, in several routines. However, occasionally, it crashes the experiment. It is so random and can happen in any routine (including brush component). Here is the error after the crash:

File “C:\Users\hdedetas\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\visual\window.py”, line 1085, in flip
File “C:\Users\hdedetas\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\visual\brush.py”, line 139, in draw
File “C:\Users\hdedetas\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\visual\brush.py”, line 130, in onBrushDrag
IndexError: list index out of range

I could not understand why it happens. I already started data collection so it is urgent. I appreciate any ideas and guidance!


Can you please show us the way you are using the brush?
Including the experiment (or a minimal, reproducible example) with the same behavior will help a lot.


Thank you for your reply!

Here is how the brush is used during the experiment.

Here is the routine organization:

These are the component properties:

I also attached this routine:

error.psyexp (10.0 KB)


I had the same error on PsychoPy 2022.1.2. After updating to the newest version (2022.2.5) everything seems to be running just fine.
Which version are you using?

Did you successfully reproduce the error in the experiment you sent?
I tried running it a couple of times with the newer version, and it seems to be working fine.

Are there any other elements that are being saved/calculated in the background?


Actually, we are using the newest version (2022.2.5). The problem is, it occurs randomly. I cannot actually anticipate when and how it happens, and cannot reproduce it intentionally.

During this specific routine, nothing is saved/calculated in the background.