Thread 1 "LumosEditor" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
1 0x00007ffff780e859 in __GI_abort () at abort.c:79
2 0x00007ffff787926e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff79a3298 "%s\n")
at ../sysdeps/posix/libc_fatal.c:155
3 0x00007ffff78812fc in malloc_printerr (str=str@entry=0x7ffff79a1569 "malloc(): corrupted top size") at malloc.c:5347
4 0x00007ffff78846ba in _int_malloc (av=av@entry=0x7ffff79d8b80 , bytes=bytes@entry=33554432) at malloc.c:4107
5 0x00007ffff7886299 in __GI___libc_malloc (bytes=33554432) at malloc.c:3066
6 0x00005555563c91a3 in MallocWrapper (size=33554432, user_data=0x0) at ../Lumos/External/imgui/imgui.cpp:1077
7 0x00005555563d3552 in ImGui::MemAlloc (size=33554432) at ../Lumos/External/imgui/imgui.cpp:3800
8 0x000055555645d769 in ImFontAtlasBuildWithStbTruetype (atlas=0x555558e9b420) at ../Lumos/External/imgui/imgui_draw.cpp:2531
9 0x000055555645c51d in ImFontAtlas::Build (this=0x555558e9b420) at ../Lumos/External/imgui/imgui_draw.cpp:2295
10 0x000055555645b051 in ImFontAtlas::GetTexDataAsAlpha8 (this=0x555558e9b420, out_pixels=0x7fffffffcbc0, out_width=0x0,
out_height=0x0, out_bytes_per_pixel=0x0) at ../Lumos/External/imgui/imgui_draw.cpp:2051
11 0x000055555645b104 in ImFontAtlas::GetTexDataAsRGBA32 (this=0x555558e9b420, out_pixels=0x7fffffffcc68, out_width=0x7fffffffcc10,
out_height=0x7fffffffcc14, out_bytes_per_pixel=0x0) at ../Lumos/External/imgui/imgui_draw.cpp:2066
12 0x0000555555fb7472 in Lumos::Graphics::VKIMGUIRenderer::Init (this=0x555558c3c9a0)
at ../Lumos/Source/Lumos/Platform/Vulkan/VKIMGUIRenderer.cpp:200
13 0x00005555558fe26a in Lumos::ImGuiManager::OnInit (this=0x5555596dec90) at ../Lumos/Source/Lumos/ImGui/ImGuiManager.cpp:95
14 0x00005555556ebf86 in Lumos::Application::Init (this=0x5555570df8c0) at ../Lumos/Source/Lumos/Core/Application.cpp:258
15 0x00005555555bff0a in Lumos::Editor::Init (this=0x5555570df8c0) at ../Editor/Source/Editor.cpp:150
16 0x0000555555faf090 in Lumos::UnixOS::Run (this=0x5555570df8a0) at ../Lumos/Source/Lumos/Platform/Unix/UnixOS.cpp:17
17 0x00005555556c01a4 in main (argc=1, argv=0x7fffffffd908) at ../Lumos/Source/Lumos/Core/EntryPoint.h:60
**Desktop:**
- OS: Ubuntu20.04
****
The old version of Lumos(0ef5f58f069550f8b609ad265916e2ee299ee26d) doesn't has this issue.
Describe the bug
Lumos engine(commit ca484fca8ce5cf00c3c73db9bff17aa38290984b) will crash when calling ImFontAtlas::GetTexDataAsRGBA32.
To Reproduce
git clone https://github.com/jmorton06/Lumos.git && cd Lumos
Tools/linux/premake5 gmake2 && cd build
make -j6
cd ../bin/Debug-linux-x86_64
gdb ./LumosEditor
See error
Thread 1 "LumosEditor" received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt
0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
1 0x00007ffff780e859 in __GI_abort () at abort.c:79
2 0x00007ffff787926e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff79a3298 "%s\n")
3 0x00007ffff78812fc in malloc_printerr (str=str@entry=0x7ffff79a1569 "malloc(): corrupted top size") at malloc.c:5347
4 0x00007ffff78846ba in _int_malloc (av=av@entry=0x7ffff79d8b80, bytes=bytes@entry=33554432) at malloc.c:4107
5 0x00007ffff7886299 in __GI___libc_malloc (bytes=33554432) at malloc.c:3066
6 0x00005555563c91a3 in MallocWrapper (size=33554432, user_data=0x0) at ../Lumos/External/imgui/imgui.cpp:1077
7 0x00005555563d3552 in ImGui::MemAlloc (size=33554432) at ../Lumos/External/imgui/imgui.cpp:3800
8 0x000055555645d769 in ImFontAtlasBuildWithStbTruetype (atlas=0x555558e9b420) at ../Lumos/External/imgui/imgui_draw.cpp:2531
9 0x000055555645c51d in ImFontAtlas::Build (this=0x555558e9b420) at ../Lumos/External/imgui/imgui_draw.cpp:2295
10 0x000055555645b051 in ImFontAtlas::GetTexDataAsAlpha8 (this=0x555558e9b420, out_pixels=0x7fffffffcbc0, out_width=0x0,
11 0x000055555645b104 in ImFontAtlas::GetTexDataAsRGBA32 (this=0x555558e9b420, out_pixels=0x7fffffffcc68, out_width=0x7fffffffcc10,
12 0x0000555555fb7472 in Lumos::Graphics::VKIMGUIRenderer::Init (this=0x555558c3c9a0)
13 0x00005555558fe26a in Lumos::ImGuiManager::OnInit (this=0x5555596dec90) at ../Lumos/Source/Lumos/ImGui/ImGuiManager.cpp:95
14 0x00005555556ebf86 in Lumos::Application::Init (this=0x5555570df8c0) at ../Lumos/Source/Lumos/Core/Application.cpp:258
15 0x00005555555bff0a in Lumos::Editor::Init (this=0x5555570df8c0) at ../Editor/Source/Editor.cpp:150
16 0x0000555555faf090 in Lumos::UnixOS::Run (this=0x5555570df8a0) at ../Lumos/Source/Lumos/Platform/Unix/UnixOS.cpp:17
17 0x00005555556c01a4 in main (argc=1, argv=0x7fffffffd908) at ../Lumos/Source/Lumos/Core/EntryPoint.h:60