Recursion Issues

Hi friends! I am having trouble figuring out this one. Hopefully you guys can help! :smiling_face_with_tear: My project keeps giving a recursion error message to only Firefox users. I think it has to do with my customization section but im not sure how to fix it while still keeping that part. Do you have any ideas or work-arounds?


Your code block appears to be empty?

Ty for replying! I wasn’t sure what to put in since its a big chunk of the game and the message is only popping up for Firefox users.

You can start by sharing the error message ipsis litteris, and the name of and link to your game.

1 Like

I use Firefox and have seen a recursion error on quite a few cogdemo games. It displays Error Too much Recursion or something similar. It seems to be entirely random when it happens since loading a save after reloading the web page fixes it.

1 Like

Now that you mention it, I seem to recall the back button possibly causing some recursion problems or the like, but I can’t find it for the life of me, so I may have dreamt it for all I know.

1 Like

I did a little testing of your game, which I assume is Last Date Standing judging from your profile picture. I attempted to recreate the error in Firefox, and lo and behold without too much effort, it was actually quite easy to do. I also attempted to do the same thing with a couple of other titles to get an idea of how common the problem is. All of my other tests on the other titles did not yield the same issue. Which would fit the reported pattern of it occurring.

Recreation steps
  1. navigate to the game page in firefox
  2. copy the address
  3. quickly open new browser tabs and paste in the address and enter (1 or 2 was usually enough to trigger the issue)
  4. wait for the dialogue box to pop-up

The only difference I could see from your startup.txt file and the others I tested was that you call a gosub_scene which looks like it runs an image processing function, which will take a lot longer to load than regular text or images. It seems that this delay was meaning the page had not loaded before I opened the next tab and tried to do the same again which somehow made the browser throw a ‘too much recursion’ error.

So my advice at this point should be to use a regular image and remove the gosub_scene from the startup.txt … However…. I doubt this is the only way to force this error, so I’m not sure how much good it will actually do, and realistically this is a uniquely Firefox issue under some ill-defined yet specific conditions, which is not something you can really ‘fix’. User behaviour (opening tabs, reloading pages, clicking too fast) and hardware (processing speed, internet connectivity) can only be mitigated for at the end of the day.

The only thing I can really think of is getting the devs to write some Firefox specific code into the Choicescript JS to handle it somehow. (which is probably beyond the scope of this forum!)

1 Like

If it’s related to displaying an image, it could relate to this issue?

2 Likes

Ditto, I was having this same error when I didn’t add “center” after my images

1 Like

Thank you, thank you! I’ll try to change it now.