EssentialGG/Elementa

[Craftify (based on Elementa)] Elementa crashes after a while of leaving the game open, killing the Craftify GUI.

TheoCGaming opened this issue · 12 comments

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run minecraft with Craftify (a music control mod)
  2. Join a world and set up Craftify using /craftify (Documentation here)
  3. Leave the game open and idle for who knows how long
  4. You'll get a message in chat and a ton of spam in the logs, and the "now playing" area will stop rendering.

Expected behavior
Leaving the game open doesn't cause any errors

Additional context

System: Arch Linux (6.4.4-zen1-1-zen)
Java version: 17
Minecraft: 1.20.1
Elementa version: integrated as a child mod, unknown

Log:

[13:14:36] [Render thread/INFO]: Game entered main loop!   <-- Game officially started

...    over 4 hours later of various logs from other mods and the main game...

[17:35:23] [Render thread/INFO]: [STDOUT]: Elementa: Cyclic constraint structure detected!
[17:35:23] [Render thread/INFO]: [STDOUT]: If you are a developer, set the environment variable "elementa.dev=true" to assist in debugging the issue.
[17:35:23] [Render thread/INFO]: [STDOUT]: Gui name: class_433
[17:35:23] [Render thread/INFO]: [STDERR]: java.lang.StackOverflowError
[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.RelativeConstraint.getWidthImpl(RelativeConstraint.kt:38)
[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.WidthConstraint.getWidth(Constraint.kt:138)
[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163)
[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.WidthConstraint.getWidth(Constraint.kt:138)
[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163)

...    Continues for thousands of lines

[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163)
[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.WidthConstraint.getWidth(Constraint.kt:138)
[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163)
[17:35:23] [Render thread/INFO]: [STDERR]: 	at gg.essential.elementa.constraints.WidthConstraint.getWidth(Constraint.kt:138)
[17:35:23] [Render thread/INFO]: [CHAT] §cElementa encountered an error while drawing a GUI. Check your logs for more information.
[17:35:23] [DefaultDispatcher-worker-6/ERROR]: Uncaught exception in thread "DefaultDispatcher-worker-6"
java.lang.StackOverflowError: null
	at gg.essential.elementa.constraints.WidthConstraint.getWidth(Constraint.kt:138) ~[elementa-590-c4250c8341948a4b.jar:?]
	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163) ~[elementa-590-c4250c8341948a4b.jar:?]
	at gg.essential.elementa.constraints.WidthConstraint.getWidth(Constraint.kt:138) ~[elementa-590-c4250c8341948a4b.jar:?]
	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163) ~[elementa-590-c4250c8341948a4b.jar:?]

...    more log spam

	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163) ~[elementa-590-c4250c8341948a4b.jar:?]
	at gg.essential.elementa.constraints.WidthConstraint.getWidth(Constraint.kt:138) ~[elementa-590-c4250c8341948a4b.jar:?]
	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163) ~[elementa-590-c4250c8341948a4b.jar:?]
	at gg.essential.elementa.constraints.WidthConstraint.getWidth(Constraint.kt:138) ~[elementa-590-c4250c8341948a4b.jar:?]
	at gg.essential.elementa.constraints.animation.WidthAnimationComponent.getWidthImpl(AnimationComponent.kt:163) ~[elementa-590-c4250c8341948a4b.jar:?]
[17:37:48] [Render thread/INFO]: [CHAT] [Rank]Multiplayerplayer1: Ill give someone a stack of emeralds for feather falling 4
[17:37:59] [Render thread/INFO]: [CHAT] [Rank]Multiplayerplayer2: ive got one
[17:38:21] [Render thread/INFO]: [CHAT] [Rank]Multiplayerplayer1: Bet
Sychic commented

Could you attach a full log? Missing parts of the stacktrace makes this much harder to diagnose.

I'll see if I can reproduce this in singleplayer so I can get a cleaner log.

Sychic commented

Shouldn't matter, just give me the full log.

https://mclo.gs/QuviAs0
the log is about 1 mb in size

Sychic commented

Hm, just from the logs I can't really see any apparent issues. Which part of the player exactly breaks? Can you attach a screenshot?

The music controller stops rendering
image
to...
image
(simulated)

Hm, just from the logs I can't really see any apparent issues. Which part of the player exactly breaks? Can you attach a screenshot?

also don't forget the log spam in the middle

This is not a place to report issues with individual mods that use Elementa, this should be reported to Craftify. If this was caused by a bug/regression in Elementa, then that can be reported here in a new issue.

hooray this back-and-forth again

ThatGravyBoat/Craftify#69

image

why must this be so common

i take the bug to the mod dev
"solely an elementa issue"
i take the bug to elementa devs
"report it to craftify"
this is honestly annoying

If you want to avoid back and forth, explain why you created this issue here rather than just making what is seemingly a support request. Regardless, this is a technical issue tracker and we generally do not have the capacity to evaluate an issue without a simple reproducer.

Sychic commented

Additionally, this is likely some kind of implementation issue on their end due to how it doesn't occur with other uses of elementa.