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
This post has been closed. You can still view previous posts, but you can't post any new replies.

[BUG][API][Character Sheet] Possible to crash the API with the deletion of large numbers of objects

1496370466
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I've been working on a companion script for the Pathfinder sheet, and while working on some features for it, I've had to delete and remake characters repeatedly to test features. I thought that I had some bad code somewhere because anytime I deleted a character, my sandbox would shortly crash with a possible infinite loop. However, I just disabled all scripts except for a "destroylog" script I whipped up to just log destroy events of attributes and characters: on('destroy:attribute',(obj)=>{log('DESTROYED ATTR: '+JSON.stringify(obj))}); on('destroy:character',(obj)=>{log('DESTROYED CHAR: '+JSON.stringify(obj))}); Deleting the characters still caused a crash. My next thought was that it was a problem with the sheetworkers (since the script is using setwithworker, maybe they were affecting the sandbox). I disabled the sheet, reloaded my API and game pages and tried to delete again. Once again the script crashed shortly after deleting the character. I'm not sure if there is a way to fix this, but thought it should be reported. -Scott
1497226984
Gid
Roll20 Team
My apologies on the wait on this, Scott. It's been busy over here onboarding new staff. What's the name of the game that you're testing out these API scripts out on?
1497233791

Edited 1497233827
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
No worries, I figured you'd get to it at some point :) My current test environment is  The Scriptorium , but I can replicate this behavior in a fresh game as well using the Pathfinder (beta or live version), the 5e OGL, or the 5e Shaped sheet (haven't tested any others).
Thank you for pointing this issue out, I have gone ahead and escalated this to the devs.