Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Massive Campaign getting "Possible infinite loop detected, shutting down" no matter what script is installed

Hello everyone first of all I must apologize if I am making a thread in the wrong place or if this has been asked many times I am not very familiar with the forum but I did spend many days searching online if anyone had answers that could help me and none of them did. I run a D&D 5e game using the OGL D&D 5e sheet and no matter what script I have (The two that I would really like to have would be the 5th edition OGL companion for the ammo tracking and the Aura/Tints healthcolors to allow my players to see how beat up enemies are)  I have tried making a copy of the game then only installing the one single script and it still only gives me: detected currently running sandbox... restarting "Loading character sheet data..." "Starting webworker script..." "Loading 1095 translation strings to worker..." "Starting webworker script..." "Loading 1095 translation strings to worker..." "Starting webworker script..." "Loading 1095 translation strings to worker..." "%cRoll20 Kingmaker Module log| kScaffold Loaded" "Roll20 Environment: Web" Possible infinite loop detected, shutting down. I completely understand that my game might have way too many maps and tokens on each of those maps to load. I have over 200+ maps and one of those maps (the "World Map") has maybe over 1000 tokens in the gm layer.. so I am not surprised that I would get an API crash every so often and that is how it started but now I cannot even get any API to start. I would love any information that could help me determine what I should do. Do I need to remove maps?, remove tokens?, maybe both? or maybe I should archive my maps? I have tried Archiving a large amount and I didn't see any change so I didn't continue. Any tips on how I could get the API to launch even if it would be with only the OGL companion would be greatly appreciated as my players have gotten used to it and asking to keep track of ammo by themselves would suck.
What scripts do you have loaded in the game?  Does the game load at all? Or is it just scripts that don’t work?  If you create a copy of the game with no scripts, is it able to load?  The possible infinite loop can be caused either by Mod scripts or by a corruption in the character sheet (which also uses JavaScript for the sheetworkers). 
I have seen posts about game size potentially impacting the API sandbox. In addition to the steps Jarren posted,  Here is a post from The Aaron about a troubleshooting step. Also if you create a new game and add the Mods you use, presumably it loads. You could then try to Transmogrify pages and characters over. Have that huge game be your archive and transmog as needed to keep the game moving. I have seen other posts that suggest Archiving doesn't do much and that makes sense because the object is still present, it's just a different property to keep it from being shown in the UI.
Jarren said: What scripts do you have loaded in the game?  Does the game load at all? Or is it just scripts that don’t work?  If you create a copy of the game with no scripts, is it able to load?  The possible infinite loop can be caused either by Mod scripts or by a corruption in the character sheet (which also uses JavaScript for the sheetworkers).  Above is a picture of the two scripts I'm trying to load. The game itself (apart from being sometimes very slow to load) doesn't have problems loading.  Joshua N. said: I have seen posts about game size potentially impacting the API sandbox. In addition to the steps Jarren posted,  Here is a post from The Aaron about a troubleshooting step. Also if you create a new game and add the Mods you use, presumably it loads. You could then try to Transmogrify pages and characters over. Have that huge game be your archive and transmog as needed to keep the game moving. I have seen other posts that suggest Archiving doesn't do much and that makes sense because the object is still present, it's just a different property to keep it from being shown in the UI. Below is a picture of that troubleshooting method. I imagine that the fact that its giving me this error with such a simple script means that the problem is with one or more of my character sheets being corrupted like Jarren mentioned could happen. I have made a new game and this time like you suggested I did not bring over all my character sheets and the API is working! I will use this method of only transmogrifying pages and characters that I need for the sheets I strictly need for my game tonight (Thanks to the compendium many of the monsters I need can just be drag and dropped back in) and I will continue to search for maybe a method of trouble shooting which sheet on my original game is corrupted. Since such a simple script failed to run I imagine there is no single script I could add which could identify the corrupted sheet but if there is please do let me know. In the meantime Il maybe try to delete some of the sheets that I know I can get back from the compendium or I don't need. Anyways thanks a lot for the help! me and my players owe you both big time they hate having to count their ammo manually and I have a problem of adding way too many monsters to encounters so having to describe all their health status makes fights way too long so these two scripts are must have for me.  
1711918814
GiGs
Pro
Sheet Author
API Scripter
Hrre's a very time consuming bit of fault-finding, so only do this if you really want to get to the bottom of the error: If you transmogrify bunches of characters, and get the error, delete half the ones you just added and see if the error recurrs. Keep deleting characters till the error vanishes, and you know which one is causing it. Using trial and error, you'll find out which character is causing the error, and then it;ll be possible to figure out why that error is causing an issue. it might be corrupted, but there might be another reason.
GiGs said: Hrre's a very time consuming bit of fault-finding, so only do this if you really want to get to the bottom of the error: If you transmogrify bunches of characters, and get the error, delete half the ones you just added and see if the error recurrs. Keep deleting characters till the error vanishes, and you know which one is causing it. Using trial and error, you'll find out which character is causing the error, and then it;ll be possible to figure out why that error is causing an issue. it might be corrupted, but there might be another reason. Thanks a lot I will start by adding the minimum needed for my game tonight then I will start on this fault-finding journey. Finally at least knowing that its no fault of the scripts and the error is from a sheet already is a nice big step towards fixing this but I was also wondering as I am currently adding in the many many handouts in my game. I just want to know before I add in all these handouts could there be a possibility of a handout causing this issue? I imagine that handouts shouldn't cause anything like this but I'd rather just check before I add in these hundreds of handouts.
1711921117
GiGs
Pro
Sheet Author
API Scripter
Handouts are probably just as likely if your scripts scan the contents of handouts (some scripts won't). It's impossible to say for sure without knowing what is causing it.
GiGs said: Handouts are probably just as likely if your scripts scan the contents of handouts (some scripts won't). It's impossible to say for sure without knowing what is causing it. I see. I use just two scripts that I think just really touch character sheets and tokens but I will be careful with my handouts also by adding just the ones that I need. I like to add all the things given for free to pro users into the game so that I can use their maps/monsters/items for my own game but doing this added so many unnecessary handouts so I wont add those. Thank you.
1712025757
The Aaron
Roll20 Production Team
API Scripter
If you're getting Possible Infinite Loop Detected with just that one line script I posted, it may just be that your game is taking too long to load.  On the bright side, I have made some allowances for that in the update to the API Server coming later this month, though I've not been able to test them with a truly massive game yet.  The current API Sandbox sends a Heartbeat after all the game objects are loaded, which means they all must load in a single timeout.  My update intersperses Heartbeats between object loads, so that the load shouldn't cause a timeout.  Additionally, it will report some basic stats about the game at Sandbox restart: "SANDBOX: Ready fired after 4.59s, 475 objects."
1712188185
Victor B.
Pro
Sheet Author
API Scripter
I run both of those APIs and do not have infinite loop.  I do see the loop sometimes in between games.  I simply restart the server and it goes away.  In other words, it's a harmless error that rebooting fixes.     If this is happening after you do a restart, I'd recommend disabling all of your APIs, get into game first, then activate the APIs.  Perhaps you are on a page with a massive number of tokens and the server is timing out.  
1712196408
Andrew R.
Pro
Sheet Author
The solution then is to setup a Start page and leave the Ribbon there and the GM there before leaving the game. Then you’re starting the game on a relatively empty Map page.  All my games have a Start page that just has a background image and the Player’s tokens, so they can access them in between sessions.