InfinityLib

InfinityLib

16M Downloads

Crash with JEI

Tamaized opened this issue ยท 27 comments

commented

Version 0.7.0
Here's all the stacktraces related, popped up one after the other causing MC to hang for a good while before closing.
https://gist.github.com/Tamaized/57aa511e2373e86f4a15af87481a9a90

My guess here is the Tessellator is being messed with in a strange way causing every other block after in JEI to spit out issues with it.

commented

This is what happens: our rendering throws an exception, which should normally crash the client, but apparently JEI catches the exception so the game doesnt crash.
Because of this our rendering doesnt finalize the calls to the VertexBuffer, causing every next thing to be rendered to throw exceptions as well (in easier words: "the vertexbuffer still thinks its drawing our tank, so it refuses to draw anything else").

The point is finding out why our tessellator is throwing this exception, it can only tessellate one set of quads at a time, but each thread has its own tessellator, so something weird is going on....

commented

Referencing this as it's most likely related.
https://github.com/InfinityRaider/AgriCraft/issues/777

commented

Any exception I catch should be logged. If you find JEI is hiding an exception somewhere, let me know so I can improve the logging.

commented

We are having the same issue with clients crashing when they are in creative mode and browse JEI or the Creative GUI

browsing with JEI causes this crash.. https://pastebin.com/RsB8RgiB

browsing the creative menu, misc tab .. https://pastebin.com/7zqjEWwC

commented

Any exception I catch should be logged. If you find JEI is hiding an exception somewhere, let me know so I can improve the logging.

I'm not saying JEI hides stacktraces, im saying i dont know why this exception is happening.

commented

I looked into this a bit more and confirmed what you were saying.

Technical details:
JEI catches and logs the first crash, but the Tessellator's VertexBuffer is left in a bad state (it is left with isDrawing == true) because the crash happens before it finishes.
I should be able to clear the VertexBuffer's drawing state when I catch a crash. It will not fix the underlying render issue here but it should keep the game from crashing on an unrelated Tessellator error.
Alternatively I could stop catching the crashes, but that would likely break most packs so I'd have to do it on 1.12 or something.

@Tamaized and @Scratchman, is there a pack I can download that has this issue? Unfortunately I'm not able to reproduce the crash in this report to confirm my fix yet. I tried with just JEI, InfinityLib, and Agricraft but I was unable to reproduce this crash.

commented

We were using a test version of Pure Pack but have removed InfinityLib and Agricraft since. Can find the pack on curse forge and add the two mods and it would be the same as the test version. crashing would happen on searching for "water" or just @AgriCraft. Should be noted that it crashing was totally random, didn't always do it. No idea why.

Sorry I'd get you the link but it's kinda late here and am on mobile :P

commented

Thanks, I'll give that a try.

commented

It looks like the root cause of this issue is extremely similar to the JEI problem and is happening between AE2 and InfinityLib/Agricraft:

[23:54:22] [Client thread/WARN] [AE2:C]: Unable to get facade sprite for blockstate agricraft:water_pad_normal. Supressing further warnings for this block.
[23:54:22] [Client thread/ERROR] [JEI]: Rendering ingredient crashed: 1xtile.agricraft:water_tank@0 agricraft:water_tank nbt:{agri_material_meta:12,agri_material:"forestry:planks.fireproof.1"}
java.lang.RuntimeException: ALREADY CONSTRUCTING VERTICES
	at com.infinityraider.infinitylib.render.tessellation.TessellatorBakedQuad.startDrawing(TessellatorBakedQuad.java:103) ~[TessellatorBakedQuad.class:?]

Based on the log, my best guess is that AE2 catches a crash while trying to get a facade sprite for an agricraft:water_pad_normal which leaves the InfinityLib TessellatorBakedQuad in a bad state. You'll have to look at AE2 to see why it crashed so you can prevent the crash from happening. You could also make TessellatorBakedQuad less strict, so if it's already constructing it just wipes out what was there and starts again.

commented

Since it's impossible to catch render errors and fix the state of everything (VertexBuffer, TessellatorBakedQuad, etc) I'm just going to have JEI crash immediately instead of catching and logging the error. This will give more useful error messages and prevent getting the game into a strange state.

commented

Thanks for the digging @mezz

commented

I'm currently putting together a new modpack for a 1.10 server, it's only a test pack at the moment, but you can download the pack here, TestPack, but you'll need to add the lantern mod back in, that was the mod that was causing the crashes for us.

commented

I'm not using Journeymap and have this crash. I do have Voxelmap (and thus Liteloader) in my setup though...

crashlog

This occurred while using JEI's Search function in an unfamiliar modpack.

commented

I am also having reports of this crash too - https://github.com/AshenGaming/potentia-reborn/issues/25

commented

@AshenGaming in your case, since you're using journeymap, have you tried the solution written above my post?

commented

@Geethebluesky As in downgrading/removing Journeymap? I can try a downgrade.

commented

Has this never been fixed? I'm getting this crash when trying to scroll through agricraft pages on JEI.

https://gist.github.com/xAlicatt/53e090fadbb040356861f45b31c84bc5

commented

I also heave this crash when I scroll through JEI or the Creative Tabs!
Please fix!

commented

Does any of you have Optifine installed?

commented

Just to add, I'm having this exact issue as well, and do not have optifine installed. I also ran into a possibly related issue where the world flickers rapidly. That issue is also associated with optifine, but again, I do not have it installed. That issue is not reproducible to my knowledge.

commented

Having this crash issue
https://pastebin.com/sJbdXLWZ
seems related to this thread.
Edit:
thought i would post my crashlog here so you guys have another instance of what is happening. might help narrow it down, hopefully.

commented

I'm also having this issue. I crash while scrolling through the items list (to the right) while in my inventory (survival mode). Hopefully this can help you track down the issue, since I know you are aware of it, but more data is good right? :)

https://pastebin.com/yMrvVB1p

commented

IT IS NOT JEI
It is also not InfinityLib or any of it's relatives.

I looked at all of the reports and every pack that crashed was using Journey Map.
So, I isolated Agricraft, InfinityLib, and Journey Map.
The crash still occurs if you try to view the Agricraft page of the Creative Mode GUI.
Get the whole story here:
https://pastebin.com/cx3UdmJ6

I assume everyone was using the latest Beta version, like me. Based on how recently this has come up and when the JM Beta was released.
Went back a to the last recommended build of Journey Map and there is no problem so far.
I have submitted a report to TechBrew.
Anyone else feel free to do the same. The more reports the better.
Good Luck, everyone.

commented

It's not agricraft. When i had the crash i had Infinitylib and the BoatLantern mod installed. Agricraft for 1.10.2 hadn;t been released yet when i experienced the crash, and it any of the alpha versions of agricraft weren't installed in the pack, The crash stopped when i removed Infinutylib and the boatlantern mod.

I still think it's something between infinitylib and JEI.

commented

@DrMeteorite117 Thank you! I downgraded Journey Map and I am no longer crashing while trying to scroll through recipes.

commented

i'm getting crashes with this message in my pack as well.

https://www.curseforge.com/minecraft/modpacks/immersiverocketrywithmillenaire

i'm not entirely sure whats causing it. I personally add optifine after i pull the modpack from curseforge, but other people report the crash occurring as well who aren't using it.

I'm making some changes to use base agricraft instead of the patched one to see if that fixes anything

commented

Closing since I am moving to 1.16 where this is no longer relevant.