GraalVM and SWT - How to analyse

65 Views Asked by At

Finally, I got my java app (plain java with SWT and some JNA calls) compiled with GraalVM

BUT: on startup I have an segmentation fault while clicking on a UI-Element...

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)

Has somebody experience how to analyse such kind of errors. I am looking for an approach how to handle this. Is there a general issue with SWT maybe?

1

There are 1 best solutions below

0
On

Got it, it was just a missing entry in the jni-config.json.

BUT STILL QUESTION: Is it correct, to get my native-image-agent collecting all required components I have to play tester and click through all menu-entries, do all user action that triggers the possible paths that needs to capture by the native-image-agent???

enter image description here