Pavlovia error: 'Maximum call stack size exceeded'

Description of the problem: Error half way through experiment before text-based trials.

Hello!

When piloting my experiment on Pavlovia it returns the error message: RangeError: Maximum call stack size exceeded

The first part of the experiment is a series of images which runs fine, however the error occurs once it reaches a point where a series of words are supposed to be presented. The experiment works with no issues on psychopy.

This is the first experiment I’ve programmed and very new to this, so apologies if I am missing any important information!

Thank you!

Was there any more detail on the error message? Copy/paste helps to provide all the information.

Other things to debug:

  • do you have code components or anything else unusual? Inspect them more deeply
  • are there part of the study that when you remove them the problem goes away? They’re to focus on
  • ultimately, if you can provide a minimal working example (MEW) of the problem occurring (ie. if the first part of your study isn’t relevant then a MWE should not include that first part) then people are more likely to be able to help you

Hi Jon, thanks for your response!

There are no code components or anything unusual.

The exact error reads as:
Unfortunately we encountered the following error:
RangeError: Maximum call stack size exceeded
Try to run the experiment again. If the error persists, contact the experiment designer.

Here is a link to the problematic section of the study:
https://run.pavlovia.org/kaitclark/gs_mem

Thanks :slight_smile:

OK, that was interesting. I stripped down the components (remember I said about minimal working example of the error) and ended up just with your text components called left_ and right_. By then the script was small enough that I could view what was going on in the script. Weirdly, left_ and right_ did not exist there!

So, it turns out that when the JS code is being generated the final underscore was being removed when the code is generated! That meant there was a clash between the variable left and the text object left which recursively tried to set itself to itself!

So, I need to work out why your underscore was being removed but the workaround at your end is to call the text Component something like left_txt rather than left_

Apologies for the massively delayed reply, thank you very much that did the trick!