Lua crashes silently at GIMP start time (probably related to UCRT library)
Environment/Versions
- GIMP version: 2.99.19
- Package: CI msix or CI native .zip
- Operating System: Windows 11
Description of the bug
At every first startup of GIMP, Lua will crash silently regarding goat-exercises-lua. This doesn't affect the running of goat-exercise-lua (it works fine) but something is wrong. @Wormnest was able to reproduce this too when testing the Store (aka MSIX) version of GIMP, at least the warning.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Enable Windows User-mode dumps: https://planet.kde.org/harald-sitter-2023-09-04-debugging-app-crashes-on-windows/
- Start GIMP cleanly from msix install or from CI native .zip bundle
- At goat-exercise-lua text in the splash screen, notice Windows cursor's blue spinning circle
- Open
%LOCALAPPDATA%/CrashDumps
and see luajit*.dmp
If someone could build GIMP locally in MINGW64 (not CLANG*64 or UCRT64) shell and follow these reproduction steps this would be of immense help.
…
Expected result: GIMP starts without silent crash
Actual result: Lua crashes silently
Additional information
Crash dump generated by Windows: luajit.exe.24436.dmp
Warning (not always happens):
Plugin signal handler: C:\Program Files\GIANT_PATH_OMITTED\goat-exercise-lua.lua: fatal error
DrMingw Stacktrace (not always happens): luajit.exe-crash-1716547120.txt
luajit.exe caused an Access Violation at location 00007FFDCBB91EC0 in module libglib-2.0-0.dll Reading from location FFFFFFFFFFFFFFFF.
AddrPC Params
00007FFDCBB91EC0 00000000FFFFFFFF 0000021800000000 00007FFE23673470 libglib-2.0-0.dll!g_slice_free_chain_with_offset+0x20
00007FFE23674DC9 00000218CB9603E0 00007FFDAA31BED3 0000000000000002 corelgilua51.dll!luaopen_lgi_corelgilua51+0x569
00007FFDAA3130C0 FFFFFFFF00000001 00000218CB960380 00000218CB960380 lua51.dll!lj_BC_FUNCC+0x42
00007FFDAA315926 00000218CB960380 0000000000000008 0000000000000000 lua51.dll!lj_gc_finalize_cdata+0x176
00007FFDAA315628 00000218CB960380 00007FF790E41530 00000218CB960550 lua51.dll!lj_gc_finalize_udata+0x28
00007FFDAA320185 00000218CBA0EE90 0000000000000008 0000003E970FF840 lua51.dll!lua_close+0xf5
00007FFDAA313492 00000000FFFFFFF0 00000218CB960380 00000218CB960380 lua51.dll!lj_vm_cpcall+0x4b
00007FFDAA320133 83A87E1900000002 00007FF700000002 00000218CBA145F0 lua51.dll!lua_close+0xa3
00007FF790E41453 0000000000000002 00007FF790E48130 00007FF790E48128 luajit.exe!main+0xb3
00007FF790E41311 0000000000000000 0000000000000000 0000000000000000 luajit.exe!WinMainCRTStartup+0x1d1
00007FF790E41366 0000000000000000 0000000000000000 0000000000000000 luajit.exe!mainCRTStartup+0x16
00007FFE3A49257D 0000000000000000 0000000000000000 0000000000000000 KERNEL32.DLL!BaseThreadInitThunk+0x1d
00007FFE3B72AA48 0000000000000000 0000000000000000 0000000000000000 ntdll.dll!RtlUserThreadStart+0x28