crash1115 / 5e-training

A module for Foundry VTT that allows users to keep track of downtime activities, quest progress and... Well, pretty much anything you can track with a loading bar and a %.
MIT License
13 stars 12 forks source link

V9 log spam killing instance #79

Closed KonteiKeisei closed 2 years ago

KonteiKeisei commented 2 years ago

This error message is killing my game when i open a spell to edit in an actor.

image

crash1115 commented 2 years ago

The game.data.version definitely isn't me, but I'm removing almost all the logs in a patch that's going out... within half an hour whenever we have a better idea of what's actually happening here. Keep an eye out for v0.6.8, and thanks for letting me know.

crash1115 commented 2 years ago

I'm... actually really curious about what else is going on here, though. The log message you're seeing from T&T should only be displaying when the actor sheet gets rendered, which shouldn't be happening on repeat like this just from opening something up to make an edit.

Does this still happen when you disable all other modules except T&T?

Ikabodo commented 2 years ago

I think this happens when certain modules are combined, and I've had it happen before. The way I understand it is that certain modules call actor.sheet render a lot, which causes modules like yours and ethks that add things to the sheet on render to sort of loop a lot of times.

I know for a fact that variant encumbrance does this for example, as well as any module that loops through updates instead of updating many things in one go.

KonteiKeisei commented 2 years ago

Have not had a chance to properly check, but i will attempt to replicate. But IKABODO i think has the right idea. and you are correct, its not just yours, i will be putting issues in all around as i identify stuff, i have 111 modules live.

Ikabodo commented 2 years ago

I've removed variant for just this reason by the way, as well as removed some settings on modules that caused a lot of updates (such as Argon's "auto equip"). This helps.

I also unload this modules and ethks at times when we don't use them. But I prefer having them on.

In these cases it might just be about choosing. :) Unless someone comes up with a way to add things to the sheet in a better way, or stop looping renders.

One thing I did to test:

  1. Have console open, clean it.
  2. Change something on the sheet, and see how many times it "loops".
  3. See if you can figure out in the log what is looping, if not. Use Find the Culprit until the log-loops are gone.
  4. ....
  5. Profit. (This is how I found out that variant encumbrance re-renders the sheet like a whole bunch of times. It works ok in itself but with crash it makes the crash tab to reload like 10+ times)
crash1115 commented 2 years ago

One thing I did to test:

  1. Have console open, clean it.
  2. Change something on the sheet, and see how many times it "loops".
  3. See if you can figure out in the log what is looping, if not. Use Find the Culprit until the log-loops are gone.
  4. ....
  5. Profit.

Yeah this is what I'd recommend to figure out what's doing it. Any module that's gonna add a tab to the actor sheet is gonna have stuff running any time that gets rendered; there's not really a lot someone like me or Ethck can really do to resolve that, since it's just basic functionality for us. We're not causing the render loop, we're just slamming you when you get hit by it.

I'd say do your best to track down whatever is causing the looping and get back to me if you can. so I can at least be aware of the conflict and make it known to others.

In the meantime I've pushed a patch to remove the log spam. This in no way actually solves the problem - that code is still gonna be running anyway - but at least people don't have to look at my crappy debug logs that I never attached to a debug setting 😓

KonteiKeisei commented 2 years ago

thats huge, because anyone with basic console skills was going to eyeball you when it was not your problem! (talking about me)

crash1115 commented 2 years ago

thats huge, because anyone with basic console skills was going to eyeball you when it was not your problem! (talking about me)

I mean that can be a good and a bad thing. If the log spam weren't a thing, you'd have much less of an idea of why stuff was breaking so badly probably. At least someone here was able to give some guidance on how to track down the actual issue. Which is the important thing!