Crash on start-up (somewhere during font initialization?)
With a self-built cimgui and self-built inochi-creator 0.7.2 on Alpine Linux:
Assertion failed: !Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!" (/home/knuxify/aports/testing/cimgui/src/cimgui-261250f88f374e751b2de1501ba5c0c11e420b5a/imgui/imgui_draw.cpp: AddFontFromMemoryTTF: 2168)
Thread 1 "inochi-creator" received signal SIGABRT, Aborted.
__restore_sigs (set=set@entry=0x7fffffffdf30) at ./arch/x86_64/syscall_arch.h:40
40 ./arch/x86_64/syscall_arch.h: No such file or directory.
(gdb) bt full
#0 __restore_sigs (set=set@entry=0x7fffffffdf30) at ./arch/x86_64/syscall_arch.h:40
No locals.
#1 0x00007ffff7fad561 in raise (sig=sig@entry=6) at src/signal/raise.c:11
set = {__bits = {0, 206158430224, 140737488347152, 140737488346960, 1651781100, 16621972, 140737346342707,
140737346341698, 140737346343257, 2168, 140737488347328, 93824994692814, 1, 18446744073709551615, 43,
7956505279354333231}}
ret = 0
#2 0x00007ffff7f83f49 in abort () at src/exit/abort.c:11
No locals.
#3 0x00007ffff7f83ff8 in __assert_fail (expr=<optimized out>, file=<optimized out>, line=<optimized out>,
func=<optimized out>) at src/exit/assert.c:7
No locals.
#4 0x00007ffff784c836 in ImFontAtlas::AddFontFromMemoryTTF (this=<optimized out>, ttf_data=<optimized out>,
ttf_size=<optimized out>, size_pixels=<optimized out>, font_cfg_template=<optimized out>, glyph_ranges=<optimized out>)
at /home/knuxify/aports/testing/cimgui/src/cimgui-261250f88f374e751b2de1501ba5c0c11e420b5a/imgui/imgui_draw.cpp:2170
__func__ = "AddFontFromMemoryTTF"
font_cfg = {FontData = 0x25, FontDataSize = -136011536, FontDataOwnedByAtlas = 255, FontNo = 47, SizePixels = 0,
OversampleH = 5, OversampleV = 0, PixelSnapH = 182, GlyphExtraSpacing = {x = 3.0611365e-41, y = 5.60519386e-45},
GlyphOffset = {x = 0, y = 0}, GlyphRanges = 0x7ffff7e4a115, GlyphMinAdvanceX = 4.24593435e-43,
GlyphMaxAdvanceX = 0, MergeMode = false, FontBuilderFlags = 0, RasterizerMultiply = 2.79767354e+13,
EllipsisChar = 21845,
Name = "\000\000@\215\000\000\000\000\000\000\002\000\000\000\000\000\000\000\272\272\370\367\377\177\000\000\004\000\000\000\000\000\000\000P\341\377\377\377\177", DstFont = 0x7fffffffe590}
#5 0x00005555557a4383 in creator.core.font._incAddFontData(immutable(char)[], ref ubyte[], float, const(ushort*), bindbc.imgui.bind.imgui.ImVec2) ()
No symbol table info available.
#6 0x00005555557a4606 in creator.core.font.incInitFonts() ()
No symbol table info available.
#7 0x00005555557a628a in creator.core.incCreateContext() ()
No symbol table info available.
#8 0x00005555557a60ca in creator.core.incOpenWindow() ()
No symbol table info available.
#9 0x0000555555762203 in D main ()
No symbol table info available.
Alpine Linux ships with musl libc, would it be possible for you to test with glibc? As well, could you provide the steps you used to build cimgui, Inochi2D and Inochi Creator?
would it be possible for you to test with glibc?
there's no glibc in alpine, so not really
could you provide the steps you used to build cimgui, Inochi2D and Inochi Creator?
cimgui:
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr/lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=None \
-DCIMGUI_TEST=yes \
-DIMGUI_FREETYPE=yes \
$CMAKE_CROSSOPTS .
cmake --build build
cmake --install build
inochi-creator:
export DFLAGS="-O"
dub add gitver
dub build inochi-creator
i didn't build inochi2d myself, just used what was pulled automatically by dub.
Dependency versions pulled by inochi-creator:
Adding dependency gitver ~>1.0.0
...
bindbc-loader 0.3.2: target for configuration "noBC" is up to date.
bindbc-opengl 0.13.0: target for configuration "dynamic" is up to date.
bindbc-sdl 0.21.4: target for configuration "dynamic" is up to date.
bindbc-imgui 0.6.1: target for configuration "dynamic" is up to date.
mir-core 1.1.106: target for configuration "library" is up to date.
mir-algorithm 3.12.36: target for configuration "default" is up to date.
fghj 1.0.0: target for configuration "library" is up to date.
gl3n 1.4.1: target for configuration "library" is up to date.
vmc-d 1.1.1: target for configuration "library" is up to date.
facetrack-d 0.6.1: target for configuration "library" is up to date.
semver 0.3.4: target for configuration "library" is up to date.
i18n-d 1.0.0: target for configuration "library" is up to date.
imagefmt 2.1.2: target for configuration "library" is up to date.
inochi2d 0.7.1: target for configuration "library" is up to date.
psd-d 0.6.1: target for configuration "library" is up to date.
tinyfiledialogs 0.10.1: target for configuration "default" is up to date.
inochi-creator ~master: building configuration "barebones"...
...i now realized that i forgot to mention that i had to edit the dub.sdl file to change the bindbc-imgui version to 0.6.1 (which also seems to match the version here?), since 1.0.0 was seemingly unavailable - i could be missing something
Currently since everything is developing rapidly we clone inochi2d, bindbc-imgui, etc. from git, then run dub add-local . "1.0.0" in those folders to allow for that rapid iteration.
Library versions will be more stable closer to 1.0
Would it be possible for you to install the Flatpak package from flathub and see if the issue persists there? We've changed how font handling works so you can also try compiling Inochi Creator again.
Flatpak works fine. The Alpine compilation attempt was more of an experiment; I currently don't have the time to work on re-compiling it (tried a while back and got some compilation errors I couldn't solve), but I'll treat this issue as fixed.