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: crash when debugging with JDK 21 #201

Closed
phraktle opened this issue Sep 21, 2023 · 1 comment · Fixed by #205
Closed

Bug: crash when debugging with JDK 21 #201

phraktle opened this issue Sep 21, 2023 · 1 comment · Fixed by #205
Labels
bug Something isn't working

Comments

@phraktle
Copy link

phraktle commented Sep 21, 2023

Version

1.86.10

What happened?

segfault when running in debug mode.

Note that normal mode works, with the following warning (can't say I have not been warned :)

[LWJGL] [ThreadLocalUtil] Unsupported JNI version detected, this may result in a crash. Please inform LWJGL developers.

Reproduction

Launch imgui in debug mode with JDK 21 (under Eclipse).

Relevant log output

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ff824bfabf7, pid=59056, tid=259
#
# JRE version: OpenJDK Runtime Environment Zulu21.28+85-CA (21.0+35) (build 21+35)
# Java VM: OpenJDK 64-Bit Server VM Zulu21.28+85-CA (21+35, mixed mode, sharing, tiered, compressed class ptrs, z gc, bsd-amd64)
# Problematic frame:
# C  0x00007ff824bfabf7
#

---------------  S U M M A R Y ------------

Command Line: -XX:+ShowCodeDetailsInExceptionMessages -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:52847 -XX:+UseZGC -javaagent:/Applications/Eclipse Java.app/Contents/Eclipse/configuration/org.eclipse.osgi/2112/0/.cp/lib/javaagent-shaded.jar -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 simlis.arbert.gui.AccountGui /Users/phraktle/dev/arbert/etc/phtest-credentials.json

Host: "MacBookPro13,3" x86_64 2700 MHz, 8 cores, 16G, Darwin 21.6.0, macOS 12.6.9 (21G726)
Time: Thu Sep 21 15:57:11 2023 CEST elapsed time: 3.489185 seconds (0d 0h 0m 3s)

---------------  T H R E A D  ---------------

Current thread (0x00007fcc9200b000):  JavaThread "main"             [_thread_in_native, id=259, stack(0x00007ff7b3e91000,0x00007ff7b4691000) (8192K)]

Stack: [0x00007ff7b3e91000,0x00007ff7b4691000],  sp=0x00007ff7b4689798,  free space=8161k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x00007ff824bfabf7
C  [libjdwp.dylib+0x1828a]  cbClassPrepare+0xba
V  [libjvm.dylib+0x78ae80]  JvmtiExport::post_class_prepare(JavaThread*, Klass*)+0x360
V  [libjvm.dylib+0x58a674]  InstanceKlass::link_class_impl(JavaThread*)+0x474
V  [libjvm.dylib+0x58974a]  InstanceKlass::initialize_impl(JavaThread*)+0x4a
V  [libjvm.dylib+0x7efb51]  LinkResolver::resolve_static_call(CallInfo&, LinkInfo const&, bool, JavaThread*)+0x71
V  [libjvm.dylib+0x7f2159]  LinkResolver::resolve_invoke(CallInfo&, Handle, constantPoolHandle const&, int, Bytecodes::Code, JavaThread*)+0xf9
V  [libjvm.dylib+0x5ac026]  InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)+0x3e6
V  [libjvm.dylib+0x5ac869]  InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0x59
j  imgui.app.Window.clearBuffer()V+28
j  imgui.app.Window.initWindow(Limgui/app/Configuration;)V+272
j  imgui.app.Window.init(Limgui/app/Configuration;)V+2
j  imgui.app.Application.initialize(Limgui/app/Application;)V+15
j  imgui.app.Application.launch(Limgui/app/Application;)V+1
@phraktle phraktle added the bug Something isn't working label Sep 21, 2023
@phraktle
Copy link
Author

Upgrading the LWJGL dependency to 3.3.3 seems to resolve this

    implementation(platform("org.lwjgl:lwjgl-bom:3.3.3"))

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

Successfully merging a pull request may close this issue.

1 participant