Closed msparkles closed 6 months ago
I have no idea how to fix this. I'm hoping Cam can figure out what might be going on since he's been studying LWJGL and OpenGL stuff.
I'm sure there are plenty of problems that could cause this, the least of which being our models with broken normals or our homebrew obj renderer...
It looks like somebody destroyed the OpenGL context too early. I'm going to point my finger at lwjgl3ify since I can't find anything in ELN's codebase that does any kind of management of contexts; we just use the one Minecraft has already loaded. We could put a check into every cleanup function to make sure there is actually an OpenGL context to try to clean, but this really should be considered a bug in lwjgl3ify, not ELN.
You're welcome to put out a PR for the fix if you identify one, I do plan to make some changes to our render code at some point (basically, kotlinizing it), but I don't see any point in supporting lwjgl3 on it's own. Is there a particular end to using it with that?
@jrddunbr @Caeleron It seems that there's a similar bug where a crash would cause the same error in an earlier version of lwjgl3ify.
This is their fix: https://github.com/GTNewHorizons/lwjgl3ify/commit/869f8b39ae973547a0b830d1833db147cdd474c0
It seems that this is just a lwjgl3 thing, that you should add extra checks, and their patch is for mods which they can't fix/fork ('cause GTNH does have all the forks in the world...).
Will try to implement something similar and report back if it fixes the issue.
.......? It seems that that isn't the issue, it's that somehow, the event listener is on the netty thread? We're unfamiliar with forge...
The context exists and returns a Capability...
Thank you @asiekierka for finding the method we were missing and then stealing the 2 hours of our life that we spent on researching for a solution and invalidating my feelings /j /coping
Crashes the game, sometimes, especially on disconnect.