最后,我得到了用 GraalVM 编译的 java 应用程序(带有 SWT 和一些 JNA 调用的纯 java)
但是:启动时,我在单击 UI 元素时出现分段错误...
Stacktrace for the failing thread 0x000002778121f100 (A=AOT compiled, J=JIT compiled, D=deoptimized, i=inlined):
A SP 0x000000c6917fe110 IP 0x00007ff6c2f88281 size=64 com.oracle.svm.core.jni.JNIGeneratedMethodSupport.setPrimitiveArrayRegion(JNIGeneratedMethodSupport.java)
A SP 0x000000c6917fe150 IP 0x00007ff6c2fc58d5 size=448 com.oracle.svm.core.jni.functions.JNIFunctions.SetCharArrayRegion(JNIFunctions.java:0)
A SP 0x000000c6917fe480 IP 0x00007ff6c515a1d8 size=112 org.eclipse.swt.internal.win32.OS.MoveMemory(Native Method)
A SP 0x000000c6917fe4f0 IP 0x00007ff6c51c1415 size=96 org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1912)
A SP 0x000000c6917fe550 IP 0x00007ff6c5269a7a size=144 org.eclipse.swt.widgets.Table.wmNotifyToolTip(Table.java:7161)
A SP 0x000000c6917fe5e0 IP 0x00007ff6c5261ff5 size=48 org.eclipse.swt.widgets.Table.wmNotify(Table.java:6505)
A SP 0x000000c6917fe610 IP 0x00007ff6c51c978b size=64 org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5366)
A SP 0x000000c6917fe650 IP 0x00007ff6c51d9c3f size=80 org.eclipse.swt.widgets.Control.windowProc(Control.java:4800)
A SP 0x000000c6917fe6a0 IP 0x00007ff6c52611fc size=176 org.eclipse.swt.widgets.Table.windowProc(Table.java:5815)
A SP 0x000000c6917fe750 IP 0x00007ff6c520dbbe size=80 org.eclipse.swt.widgets.Display.windowProc(Display.java:5040)
A SP 0x000000c6917fe7a0 IP 0x00007ff6c2fa3ab5 size=64 com.oracle.svm.core.jni.JNIJavaCallWrapperHolder.invoke_JJJJ_J(JNIJavaCallWrapperHolder.java:0)
A SP 0x000000c6917fe7e0 IP 0x00007ff6c2f97014 size=480 com.oracle.svm.core.jni.JNIJavaCallVariantWrapperHolder.invokeJJIJJJJ_J_VA_LIST(JNIJavaCallVariantWrapperHolder.java:0)
A SP 0x000000c6917ff600 IP 0x00007ff6c514da8b size=96 org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
A SP 0x000000c6917ff660 IP 0x00007ff6c5207b4f size=32 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3658)
有人有如何分析此类错误的经验吗?我正在寻找一种方法来处理这个问题。 SWT 可能存在普遍问题吗?