Larkinabout / fvtt-token-action-hud-pf2e

Token Action HUD is a repositionable HUD of actions for a selected token.
10 stars 15 forks source link

InternalError: too much recursion #145

Closed bLanark closed 3 weeks ago

bLanark commented 3 months ago

Was updating a token attack, then when I clicked save on this, the entire game crashed and had to be restarted. Anytime we clicked the token broke the game again.

Log: 19:14:10.310 Uncaught (in promise) InternalError: too much recursion [Detected 3 packages: system:pf2e, token-action-hud-pf2e, token-action-hud-core] _replaceTextContent foundry.js:66063 _applyCustomEnrichers foundry.js:65959 enrich foundry.js:65886 updateTextArray foundry.js:65890 promise callback*enrichHTML foundry.js:65890 enrichHTML pf2e.mjs:1357

prepareDescription pf2e.mjs:1354

process pf2e.mjs:1350
processChatData pf2e.mjs:1621
getChatData pf2e.mjs:1648
#H token-action-hud-pf2e.min.js:1
o token-action-hud-pf2e.min.js:1
#o token-action-hud-pf2e.min.js:1
#t token-action-hud-pf2e.min.js:1
buildSystemActions token-action-hud-pf2e.min.js:1
#h action-handler.js:209
buildHud action-handler.js:100
#It token-action-hud.js:1157
update token-action-hud.js:1095
handleHookEvent init.js:174
<anonymous> init.js:132
#call foundry.js:730
callAll foundry.js:687
control foundry.js:28654
_onClickLeft foundry.js:29042
_onClickLeft foundry.js:56254
callback foundry.js:31766
#handleClickLeft foundry.js:31954
#handleMouseDown foundry.js:31939
notifyListeners earcut.js:128
notifyTarget earcut.js:128

foundry.js:66063:32

Silvertower commented 3 months ago

Thank you for the report. Please post steps to reproduce the issue.

bLanark commented 3 months ago

Erm, turns out I missed a ] on a item which crashed the entire system whenever the item was loaded, and since it would be loaded by pf2e token hud whenever you click the token it caused the recurssion error. I've pasted the broken code under this, its missing an ending bracket ]. Maybe a try/except would fix this, but it seems more user error with copying something incorrectly coded.

Your eidolon exhales a blast of destructive energy. Your eidolon deals @Damage[ceil(@actor.level/2)d6[force] damage to all creatures in the area, with a basic Reflex save against your spell DC. The area and damage type of the Breath Weapon are chosen when the eidolon gains this ability. Your eidolon then can't use their Breath Weapon again for the next [[/r 1d4 #Breath Weapon Cooldown]]{1d4 rounds}

At 3rd level and every 2 levels thereafter, the damage increases by 1d6.
@Template[type:cone|distance:30]

@Check[type:reflex|dc:resolve(@actor.attributes.classOrSpellDC.value)|basic:true]