#ImGUI Assertion crash when minimizing with a block list menu open

1 messages · Page 1 of 1 (latest)

thick egretBOT
#

@kindred shoal uploaded a log, Axiom version: 4.7.1 - 1.20.1
Environment: Windows 10, MC 1.20.1 Fabric, MC in Fullscreen mode
Mode: Unknown at exact time of crash

Description:
Game crashed due to an ImGui assertion, possibly at the same time I alt-tabbed, possibly not, I don't recall clearly. Other than that there were no clear events or conditions that could have caused the crash.

Can you recreate the bug: Not reliably, no. But I believe I had this at least once before? I originally assumed it was distant horizons around that time.

Error from log attached.

humble sedge
#

send the entire log

kindred shoal
#

one moment while i go look for it

humble sedge
#

as a log file or txt

thick egretBOT
#

@kindred shoal uploaded a log,

  • Fabric 0.16.10 on 1.20.1 using 14 mods

Possible Solutions:

  • Update Fabric from 0.16.10 to 0.16.14
humble sedge
#

try removing trinkets

kindred shoal
#

i have my doubts but alright, I'll see if i get any more crashes then

kindred shoal
#

Update: I've managed to get reproduction on this. Open a world, select something, ctrl + r to quick replace (get the menu open), alt-tab out. The game will crash

#

testing if fullscreen and any other mods matter

#

other mods do not matter (confirmed with only axiom + fabric api)

#

fullscreen is not strictly required. When in window mode, alt tab is fine, but minimizing the game will crash it.

#

hopefully that's enough to figure out what's going on

kindred shoal
#

I believe I've found the source of the bug and the fix: Should take 2 minutes to fix (verified seems to work by patching the axiom jar file myself)
ImGuiHelper.blockScrollList(...) calls ImGui.endChild() at the end of the if statement corresponding to the beginChild(), but according to the Dear ImGui docs:

Always call a matching EndChild() for each BeginChild() call, regardless of its return value.
Moving the endChild() outside of the if statement fixes this crash in the scenario that the screen is minimized, so the child fails to be created, and doesn't call endChild. There is also a return statement so I just wrapped the entire thing in try { ... } finally { ImGui.endChild(); }.

#

ImGUI Assertion crash when minimizing with a block list menu open

swift dust