Memory leak - refreshing every frame vs every repeat (or as a constant)

I had a similar problem in PsychoPy2 v1.85.3. I was checking for keyboard responses every frame and creating a TextStim component (with the same name every time) to display a brief message every time a response was made. The program crashed after a while, reporting:

WindowsError: exception: access violation reading 0x00000010

I tried updating the text property of an existing TextStim component each time there was a response, instead of creating a new TextStim component each time, but the problem was the same, as Michael stated above. I also tried changing the opacity of the TextStim component, but opacity could not be adjusted dynamically. And I tried a solution, suggested at https://discourse.psychopy.org/t/changing-the-opacity-of-text-mid-routine/8574, which involved overlaying the TextStim with a polygon and changing the opacity of the polygon, but the same crash occurred. Finally, I tried using a TextBox component instead of a TextStim component, but the TextBox component was not displayed at all (problems with TextBox components have also been reported here: : https://discourse.psychopy.org/t/using-textbox-instead-of-textstim/4818.

In the end, what worked was updating to PsychoPy3 v3.2.4!