Effective/Veil causing crash when joining a server
WxAaRoNxW opened this issue · 2 comments
It's quite difficult to pin this down as I have to rejoin multiple times usually 1-2 times, for the crash to occur, and the server address has to be valid, and that there's no mismatch in mods, so I can't easily turn on and off mods on my client. Disabling effective fixes this issue.
Found the issue I guess joining a world is unnecessary, cause joining in a singleplayer world is viable in figuring it out, on a bare minimum setup. It's Seamless Loading Screen and Effective.
To reproduce 100% of the time:
- run mc
- join a world, singleplayer or multiplayer
- quit to main menu
- rejoin a world again, or type a single character in an input box on the main menu, direct connection, add server, etc.
but the crash can happen randomly when a UI renders.
Confirmed that this issue is happening on the latest fabric loader version for 1.21.1. Seems to be an issue with ImGui embedded in the Veil Library. Removing Effective fixed all my issues.
This suggests that the Veil-powered ImGui context used by effective is not being properly reset or reinitialized when the client disconnects and reconnects to a server.
Steps to Reproduce
- Launch game with
effectiveinstalled (version2.4.8-1.21.1) - Join a multiplayer server
- Leave the server
- Rejoin the same server
- Crash occurs immediately (sometimes during loading, sometimes on spawn) with the following error:
Dear ImGui Assertion Failed: GImGui != NULL && "No current context. Did you call ImGui::CreateContext() and ImGui::SetCurrentContext() ?"
The stack trace points to veil and afaik this is the only mod in my modpack which uses this library.
Expected Behavior
The client should cleanly reconnect to the server without triggering ImGui crashes.
Environment
- Minecraft: 1.21.1
- Fabric Loader: 0.16.13
- Effective: 2.4.8-1.21.1
- Veil: 1.0.0.85
- OS: Windows 11
- Graphics: NVIDIA GeForce RTX 4070 Ti (with Sodium)
Additional Context
This crash does not occur when effective is removed, confirming the source. Other mods using Veil or ImGui don’t cause this behavior in the same environment. Veil should either reinitialize the ImGui context on reconnect or safely dispose of it on disconnect.