Jade ๐Ÿ”

Jade ๐Ÿ”

93M Downloads

Client Locks Up Trying to Draw a Progress Bar of Width=Infinity

shartte opened this issue ยท 4 comments

commented

Mod loader

NeoForge

Minecraft version

1.21

Mod version

Jade-1.21-NeoForge-15.1.3

Modloader version

21.0.112-beta

Modpack info

Custom

[IMPORTANT] If bug:

  • I have confirmed this bug is reproducible on a minimal setup, not a modpack with many other mods.

[IMPORTANT] If bug: The latest.log file, not the crash report

No response

Issue description

This happened when hovering over a "Cutting Machine" from Modern Industrialization. Their progress integration is here:
https://github.com/AztechMC/Modern-Industrialization/blob/1.21.x/src/main/java/aztech/modern_industrialization/compat/jade/server/MachineComponentProvider.java#L175

It's unclear to me whether this is caused by their progress value, or by the smoothing on the Jade side.

commented

When this was happening, I attached a debugger and here are a few screenshots of the state.
The progress=Infinity is obviously causing it to go into an infinite loop trying to draw this progress bar:
image

The progress on the class itself isn't infinity:
image

But the "smooth progress" has a speed of infinity & value of infinity:
image

commented

I have no idea how this occurred. But I can add a check to avoid crashing ๐Ÿค”

commented

Probably some division by zero (or near zero?) at some point in-between.
Hard to track down after it already flipped to infinity :-|

commented

yeah that is the check I have added