Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: addFontFromFileTTF broken on Linux #304

Open
Desoroxxx opened this issue Dec 18, 2024 · 0 comments
Open

Bug: addFontFromFileTTF broken on Linux #304

Desoroxxx opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Desoroxxx
Copy link

Version

1.87.7

What happened?

Using font.addFontFromFileTTF(fontPath, 12); crashes on Linux while being fine on Windows

Reproduction

        final ImFontAtlas font = ImGui.getIO().getFonts();
        font.setFreeTypeRenderer(true);
        font.addFontFromFileTTF(fontPath, 12);

Relevant log output

[LWJGL] Version: 3.3.5-snapshot+5
	 OS: Linux v5.15.0-125-generic
	JRE: Linux amd64 23.0.1
	JVM: OpenJDK 64-Bit Server VM v23.0.1+11 by Eclipse Adoptium
[LWJGL] Loading JNI library: lwjgl
	Module: org.lwjgl
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_llage/3.3.5-snapshot+5/x64/liblwjgl.so
[LWJGL] Loading library: glfw
	Module: org.lwjgl.glfw
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_llage/3.3.5-snapshot+5/x64/libglfw.so
[LWJGL] Java 11 check intrinsics enabled
[LWJGL] Closure Registry: ConcurrentHashMap
[LWJGL] Warning: Failed to instantiate memory allocator: org.lwjgl.system.jemalloc.JEmallocAllocator. Using the system default.
[LWJGL] MemoryUtil allocator: StdlibAllocator
[LWJGL] Loading JNI library: lwjgl_opengl
	Module: org.lwjgl.opengl
	Loaded from org.lwjgl.librarypath: /tmp/lwjgl_llage/3.3.5-snapshot+5/x64/liblwjgl_opengl.so
[LWJGL] Loading library: libGLX.so.0
	Module: org.lwjgl.opengl
	libGLX.so.0 not found in org.lwjgl.librarypath=/tmp/lwjgl_llage/3.3.5-snapshot+5/x64
[LWJGL] Java 11 text decoding enabled
	Loaded from system paths: /usr/lib/x86_64-linux-gnu/libGLX.so.0
[LWJGL] Java 11 multiplyHigh enabled
[LWJGL] Java 17 divideUnsigned/remainderUnsigned enabled
[LWJGL] Java 21 unsignedMultiplyHigh enabled
[LWJGL] [GL] Using OpenGL 4.3 for error logging.
Dear ImGui Assertion Failed: (0) && "Could not load font file!"
Assertion Located At: /tmp/imgui/jni/imgui_draw.cpp:2159
java.lang.Exception: Stack trace
	at java.base/java.lang.Thread.dumpStack(Thread.java:2148)
	at imgui.ImGui$1.imAssertCallback(ImGui.java:65)
	at imgui.assertion.ImAssertCallback.imAssert(ImAssertCallback.java:21)
	at imgui.ImFontAtlas.nAddFontFromFileTTF(Native Method)
	at imgui.ImFontAtlas.addFontFromFileTTF(ImFontAtlas.java:88)
	at dev.redstudio.mh.rendering.renderers.ImGuiRenderer.style(ImGuiRenderer.java:89)
	at dev.redstudio.mh.rendering.renderers.ImGuiRenderer.init(ImGuiRenderer.java:47)
	at dev.redstudio.mh.rendering.renderers.GlobalRenderer.init(GlobalRenderer.java:46)
	at dev.redstudio.mh.MH.init(MH.java:110)
	at dev.redstudio.mh.MH.main(MH.java:75)
@Desoroxxx Desoroxxx added the bug Something isn't working label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant