Berstanio / gdx-graalhelper

Experimental helper for libGDX to build GraalVM native-image.
Apache License 2.0
12 stars 2 forks source link

Latest libGDX snapshot broken #4

Closed Berstanio closed 1 year ago

Berstanio commented 1 year ago

@ACGNnsj

Error: Classes that should be initialized at run time got initialized during image building:
 com.badlogic.gdx.utils.SharedLibraryLoader was unintentionally initialized at build time. com.badlogic.gdx.scenes.scene2d.utils.UIUtils caused initialization of this class with the following trace:
        at com.badlogic.gdx.utils.SharedLibraryLoader.<clinit>(SharedLibraryLoader.java:39)
        at com.badlogic.gdx.scenes.scene2d.utils.UIUtils.<clinit>(UIUtils.java:13)

com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
 com.badlogic.gdx.utils.SharedLibraryLoader was unintentionally initialized at build time. com.badlogic.gdx.scenes.scene2d.utils.UIUtils caused initialization of this class with the following trace:
        at com.badlogic.gdx.utils.SharedLibraryLoader.<clinit>(SharedLibraryLoader.java:39)
        at com.badlogic.gdx.scenes.scene2d.utils.UIUtils.<clinit>(UIUtils.java:13)

        at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:73)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ProvenSafeClassInitializationSupport.checkDelayedInitialization(ProvenSafeClassInitializationSupport.java:273)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:164)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:748)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:85)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:748)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:162)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:745)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:578)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:535)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:580)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
Berstanio commented 1 year ago

Should be fixed on master

ACGNnsj commented 1 year ago

Many thanks. I'm able to build the image now. Sadly, however, I would still get a segfault when running the native executable. Could it fail for some other reasons?

[ [ SubstrateSegfaultHandler caught a segfault in thread 0x0000024528f55200 ] ]
siginfo: ExceptionCode: -1073741819, writing address 0x00007ff7dca5dbcc
Current timestamp: 1687016050174

General purpose register values:
  RAX 0x00007ffc11200000 is an unknown value
  RBX 0x000002453e95dce8 points into the image heap (read-only huge)
    is an object of type [Ljava.lang.String;
  RCX 0x32a0bf19d0730000 is an unknown value
  RDX 0x00007ff7dca5dbb0 points into AOT compiled code
  RBP 0x0000000000000000
  RSI 0x000002453f035ee8 points into an aligned TLAB chunk of thread 0x0000024528f55200
    is an object of type com.oracle.svm.core.c.CCharPointerHolderImpl
  RDI 0x00000000000007db is an unknown value
  RSP 0x000000fa740fec40 points into the stack for thread 0x0000024528f55200
  R8  0x00007ffc5fc669a8 is an unknown value
  R9  0x0000000000000004 is an unknown value
  R10 0x000000000000004c is an unknown value
  R11 0x000000fa740feba0 points into the stack for thread 0x0000024528f55200
  R12 0x00007ff7dea58872 points into AOT compiled code org.lwjgl.system.windows.WinBase.nGetModuleHandle(WinBase.java)
  R13 0x000000fa740fec98 points into the stack for thread 0x0000024528f55200
  R14 0x000000000000007f is an unknown value
  R15 0x0000024528f55200 is a thread
  EFL 0x0000000000010202 is an unknown value
  RIP 0x00007ffc11221d29 is an unknown value

Printing Instructions (ip=0x00007ffc11221d29):
  0x00007ffc11221d09: 0x8b 0xc5 0x48 0x8b 0x6c 0x24 0x40 0x48 0x8b 0x74 0x24 0x48 0x48 0x83 0xc4 0x20
  0x00007ffc11221d19: 0x41 0x5e 0xc3 0x48 0x8b 0x74 0x24 0x48 0x48 0x8b 0xc5 0x48 0x8b 0x6c 0x24 0x40
  0x00007ffc11221d29: 0x44 0x89 0x72 0x1c 0x48 0x83 0xc4 0x20 0x41 0x5e 0xc3 0xcc 0xcc 0xcc 0xcc 0xcc
  0x00007ffc11221d39: 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0x48 0x89 0x6c 0x24 0x18 0x48 0x89 0x74 0x24

Top of stack (sp=0x000000fa740fec40):
  0x000000fa740fec40: 0x00007ffc11200000 0x0000000000000000
  0x000000fa740fec50: 0x00000245396397f8 0x000002453f034ce8
  0x000000fa740fec60: 0x0000024529300000 0x00007ff7dea58885
  0x000000fa740fec70: 0x0000000000000000 0x0000000000000000
  0x000000fa740fec80: 0x0000000000000000 0x000002453f035ee8
  0x000000fa740fec90: 0x000002453f034b20 0x00007ff7dea58872
  0x000000fa740feca0: 0x000000fa740fec70 0x0000000000000000
  0x000000fa740fecb0: 0x00007ffc11221c80 0x000000010000000a
  0x000000fa740fecc0: 0x0000024501f41f60 0x00007ff7dea57ced
  0x000000fa740fecd0: 0x00000245395bb860 0x0000000000000000
  0x000000fa740fece0: 0x000002453f034b80 0x00007ff7dea59124
  0x000000fa740fecf0: 0x000002453f034b70 0x0000024538ed70f8
  0x000000fa740fed00: 0x02051ecf38dcf620 0x000002453eeeb238
  0x000000fa740fed10: 0x00007ff7dea2d880 0x00007ff7dc7d5ffd
  0x000000fa740fed20: 0x0000000000000000 0x00007ff7dc7d51e5
  0x000000fa740fed30: 0x0000024500000003 0x0000024500000080
  0x000000fa740fed40: 0x000000000000009a 0x000002453ea01120
  0x000000fa740fed50: 0x000002453f0347d8 0x020828addda8c3f6
  0x000000fa740fed60: 0x01fcd37f02142085 0x0000024539169bf8
  0x000000fa740fed70: 0x0000024538dcf620 0x00000245395c56d0
  0x000000fa740fed80: 0x02b7855680000000 0x0000000000000000
  0x000000fa740fed90: 0x0000000000000000 0x0000000000000000
  0x000000fa740feda0: 0x0000000000000000 0x0000000000000000
  0x000000fa740fedb0: 0x0000000000000000 0x0000000000000000
  0x000000fa740fedc0: 0x0000000000000000 0x0000000000000000
  0x000000fa740fedd0: 0x0000000000000000 0x0000000000000000
  0x000000fa740fede0: 0x0000000000000000 0x0000000000000000
  0x000000fa740fedf0: 0x0000000000000000 0x0000000000000000
  0x000000fa740fee00: 0x0000000000000000 0x0000000000000000
  0x000000fa740fee10: 0x0000000000000000 0x0000000000000000
  0x000000fa740fee20: 0x0000000000000000 0x0000000000000000
  0x000000fa740fee30: 0x0000000000000000 0x0000000000000000

Top frame info:
  Does not look like a Java Frame. Use JavaFrameAnchors to find LastJavaSP:
  Found matching Anchor:0x000000fa740fec98
  LastJavaSP 0x000000fa740fec70
  LastJavaIP 0x00007ff7dea58872

Threads:
  0x000002452900e240 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Discord" - 0x000002453eea00e8, daemon, stack(0x000000fa74800000,0x000000fa74900000)
  0x0000024528f7ab00 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "AWT-Windows" - 0x000002453ea5d808, daemon, stack(0x000000fa74700000,0x000000fa74800000)
  0x0000024528f7cec0 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Java2D Disposer" - 0x000002453ea5c2f0, daemon, stack(0x000000fa74500000,0x000000fa74600000)
  0x0000024528f61840 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x0000024539169c70, daemon, stack(0x000000fa74400000,0x000000fa74500000)
  0x0000024528f55200 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "main" - 0x0000024539169bf8, stack(0x000000fa74000000,0x000000fa74100000)

VM thread locals for the failing thread 0x0000024528f55200:
  0 (8 bytes): JNIThreadLocalEnvironment.jniFunctions = (bytes)
    0x0000024528f55200: 0x0000024538d1cf50
  8 (8 bytes): StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 (0x0000000000000001)
  16 (4 bytes): Safepoint.safepointRequested = (int) 2147124194 (0x7ffa83e2)
  20 (4 bytes): StatusSupport.statusTL = (int) 1 (0x00000001)
  24 (32 bytes): ThreadLocalAllocation.regularTLAB = (bytes)
    0x0000024528f55218: 0x000002453f000000 0x000002453f100000
    0x0000024528f55228: 0x000002453f0360f0 0x0000000000000000
  56 (8 bytes): JavaFrameAnchors.lastAnchor = (Word) 1075689024664 (0x000000fa740fec98)
  64 (4 bytes): PlatformThreads.currentThread = (Object) java.lang.Thread (0x0000024539169bf8)
  68 (4 bytes): PlatformThreads.lockHelper = (Object) com.oracle.svm.enterprise.core.monitor.a (0x000002453ea01028)
  72 (8 bytes): SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
    0x0000024528f55248: 0x0000000000000000
  80 (8 bytes): ThreadLocalAllocation.allocatedBytes = (Word) 2088872 (0x00000000001fdfa8)
  88 (8 bytes): VMThreads.IsolateTL = (Word) 2496067010560 (0x0000024529300000)
  96 (8 bytes): VMThreads.OSThreadHandleTL = (Word) 248 (0x00000000000000f8)
  104 (8 bytes): VMThreads.OSThreadIdTL = (Word) 21660 (0x000000000000549c)
  112 (8 bytes): VMThreads.StackBase = (Word) 1075689029632 (0x000000fa74100000)
  120 (8 bytes): VMThreads.StackEnd = (Word) 1075687981056 (0x000000fa74000000)
  128 (8 bytes): VMThreads.StartedByCurrentIsolate = (bytes)
    0x0000024528f55280: 0x0000000000000000
  136 (8 bytes): VMThreads.nextTL = (Word) 0 (0x0000000000000000)
  144 (8 bytes): VMThreads.unalignedIsolateThreadMemoryTL = (Word) 2496063164928 (0x0000024528f55200)
  152 (4 bytes): AccessControlContextStack = (Object) java.util.ArrayDeque (0x000002453ea09b18)
  156 (4 bytes): ExceptionUnwind.currentException = (Object) null
  160 (4 bytes): IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom (0x000002453ea40de8)
  164 (4 bytes): IsolatedCompileClient.currentClient = (Object) null
  168 (4 bytes): IsolatedCompileContext.currentContext = (Object) null
  172 (4 bytes): JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles (0x000002453ea01120)  176 (4 bytes): JNIThreadLocalPendingException.pendingException = (Object) null
  180 (4 bytes): JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
  184 (4 bytes): JNIThreadOwnedMonitors.ownedMonitors = (Object) null
  188 (4 bytes): NoAllocationVerifier.openVerifiers = (Object) null
  192 (4 bytes): ThreadingSupportImpl.activeTimer = (Object) null
  196 (4 bytes): ActionOnExitSafepointSupport.actionTL = (int) 0 (0x00000000)
  200 (4 bytes): ActionOnTransitionToJavaSupport.actionTL = (int) 0 (0x00000000)
  204 (4 bytes): ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 (0x00000000)
  208 (4 bytes): StackOverflowCheckImpl.yellowZoneStateTL = (int) 2130640638 (0x7efefefe)
  212 (4 bytes): StatusSupport.safepointBehaviorTL = (int) 1 (0x00000001)
  216 (4 bytes): ThreadingSupportImpl.currentPauseDepth = (int) 0 (0x00000000)

No VMOperation in progress

The 15 most recent VM operation status changes (oldest first):

Counters:

Java frame anchors for the failing thread 0x0000024528f55200:
  Anchor 0x000000fa740fec98 LastJavaSP 0x000000fa740fec70 LastJavaIP 0x00007ff7dea58872

Stacktrace for the failing thread 0x0000024528f55200:
  SP 0x000000fa740fec40 IP 0x00007ffc11221d29  IP is not within Java code. Trying frame anchor of last Java frame instead.
  SP 0x000000fa740fec70 IP 0x00007ff7dea58872  [image code] org.lwjgl.system.windows.WinBase.nGetModuleHandle(WinBase.java)
  SP 0x000000fa740fecd0 IP 0x00007ff7dea57ced  [image code] org.lwjgl.system.windows.WinBase.GetModuleHandle(WinBase.java:98)
  SP 0x000000fa740fecf0 IP 0x00007ff7dea59124  [image code] org.lwjgl.system.windows.WindowsLibrary.<clinit>(WindowsLibrary.java:25)
  SP 0x000000fa740fed20 IP 0x00007ff7dc7d5ffd  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:361)
  SP 0x000000fa740fed30 IP 0x00007ff7dc7d51e5  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:277)
  SP 0x000000fa740feef0 IP 0x00007ff7dea0dde3  [image code] org.lwjgl.system.APIUtil.apiCreateLibrary(APIUtil.java:126)
  SP 0x000000fa740fef00 IP 0x00007ff7dea233d8  [image code] org.lwjgl.system.Library.loadNative(Library.java:382)
  SP 0x000000fa740fef50 IP 0x00007ff7dea2355c  [image code] org.lwjgl.system.Library.loadNativeFromLibraryPath(Library.java:371)
  SP 0x000000fa740fef60 IP 0x00007ff7dea223b9  [image code] org.lwjgl.system.Library.loadNative(Library.java:285)
  SP 0x000000fa740fefe0 IP 0x00007ff7dea43a62  [image code] org.lwjgl.system.Library.loadNative(Library.java:236)
  SP 0x000000fa740fefe0 IP 0x00007ff7dea43a62  [image code] org.lwjgl.system.jemalloc.JEmalloc.<clinit>(JEmalloc.java:34)
  SP 0x000000fa740ff010 IP 0x00007ff7dc7d5ffd  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:361)
  SP 0x000000fa740ff020 IP 0x00007ff7dc7d51e5  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:277)
  SP 0x000000fa740ff1e0 IP 0x00007ff7dea43d16  [image code] org.lwjgl.system.jemalloc.JEmallocAllocator.<clinit>(JEmallocAllocator.java:17)
  SP 0x000000fa740ff1f0 IP 0x00007ff7dc7d5ffd  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:361)
  SP 0x000000fa740ff200 IP 0x00007ff7dc7d51e5  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:277)
  SP 0x000000fa740ff3c0 IP 0x00007ff7ddb08cca  [image code] java.lang.Class.ensureInitialized(DynamicHub.java:528)
  SP 0x000000fa740ff3c0 IP 0x00007ff7ddb08cca  [image code] java.lang.Class.forName(DynamicHub.java:1135)
  SP 0x000000fa740ff3f0 IP 0x00007ff7dea2b5be  [image code] java.lang.Class.forName(DynamicHub.java:1105)
  SP 0x000000fa740ff3f0 IP 0x00007ff7dea2b5be  [image code] org.lwjgl.system.MemoryManage.getInstance(MemoryManage.java:44)
  SP 0x000000fa740ff430 IP 0x00007ff7dea30566  [image code] org.lwjgl.system.MemoryUtil$LazyInit.<clinit>(MemoryUtil.java:148)
  SP 0x000000fa740ff470 IP 0x00007ff7dc7d5ffd  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:361)
  SP 0x000000fa740ff480 IP 0x00007ff7dc7d51e5  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:277)
  SP 0x000000fa740ff640 IP 0x00007ff7dea10354  [image code] org.lwjgl.system.MemoryUtil.getAllocator(MemoryUtil.java:224)
  SP 0x000000fa740ff640 IP 0x00007ff7dea10354  [image code] org.lwjgl.system.MemoryUtil.getAllocator(MemoryUtil.java:213)
  SP 0x000000fa740ff640 IP 0x00007ff7dea10354  [image code] org.lwjgl.system.Callback.<clinit>(Callback.java:102)
  SP 0x000000fa740ff690 IP 0x00007ff7dc7d5ffd  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:361)
  SP 0x000000fa740ff6a0 IP 0x00007ff7dc7d51e5  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:277)
  SP 0x000000fa740ff860 IP 0x00007ff7dc7d57e5  [image code] java.lang.Class.ensureInitialized(DynamicHub.java:528)
  SP 0x000000fa740ff860 IP 0x00007ff7dc7d57e5  [image code] com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:242)
  SP 0x000000fa740ffa20 IP 0x00007ff7dc549134  [image code] com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.initializeGlfw(Lwjgl3Application.java:84)
  SP 0x000000fa740ffa40 IP 0x00007ff7dc545863  [image code] com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:138)
  SP 0x000000fa740ffab0 IP 0x00007ff7dc910a22  [image code] com.oracle.svm.core.code.FactoryMethodHolder.Lwjgl3Application_constructor_2eb555e67dc995fa23bc2da478c4592ffd96bee1(FactoryMethodHolder.java:0)
  SP 0x000000fa740ffae0 IP 0x00007ff7dcec1a21  [image code] com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:80)
  SP 0x000000fa740ffb30 IP 0x00007ff7dc7b2f7d  [image code] com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:180)
  SP 0x000000fa740ffb50 IP 0x00007ff7dca705db  [image code] com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:137)
  SP 0x000000fa740ffb50 IP 0x00007ff7dca705db  [image code] com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:237)
  SP 0x000000fa740ffb50 IP 0x00007ff7dca705db  [image code] com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:223)
  SP 0x000000fa740ffb50 IP 0x00007ff7dca705db  [image code] com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_3148eece06270530b6e0d4d60311411342c82698(IsolateEnterStub.java:0)

VM mutexes:
  mutex "mainVMOperationControlWorkQueue" is unlocked.
  mutex "thread" is unlocked.
  mutex "freeList" is unlocked.
  mutex "referencePendingList" is unlocked.

AOT compiled code is mapped at 0x00007ff7dc531000 - 0x00007ff7df14d0cf

Heap settings and statistics:
  Supports isolates: true
  Heap base: 0x0000024529300000
  Object reference size: 4
  Aligned chunk size: 1048576
  Incremental collections: 0
  Complete collections: 0

Native image heap boundaries:
  ReadOnly Primitives: 0x0000024529401028 - 0x000002453878ba98
  ReadOnly References: 0x000002453878ba98 - 0x0000024538cd9820
  ReadOnly Relocatables: 0x0000024538cda000 - 0x0000024538f85560
  Writable Primitives: 0x0000024538f86000 - 0x000002453910cf80
  Writable References: 0x000002453910cf80 - 0x0000024539d1dda8
  Writable Huge: 0x0000024539e00030 - 0x000002453a059d60
  ReadOnly Huge: 0x000002453a05a030 - 0x000002453e98b380

Heap:
  Young generation:
    Eden:
      edenSpace:
        aligned: 1048576/1 unaligned: 0/0
        aligned chunks:
          0x000002453ec00000 (0x000002453ec01028-0x000002453ec01e28)
    Survivors:
      Survivor-1 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-1 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-2 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-2 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-3 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-3 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-4 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-4 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-5 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-5 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-6 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-6 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-7 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-7 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-8 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-8 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-9 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-9 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-10 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-10 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-11 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-11 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-12 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-12 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-13 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-13 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-14 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-14 To:
        aligned: 0/0 unaligned: 0/0
      Survivor-15 From:
        aligned: 0/0 unaligned: 0/0
      Survivor-15 To:
        aligned: 0/0 unaligned: 0/0
  Old generation:
    oldFromSpace:
      aligned: 0/0 unaligned: 0/0
    oldToSpace:
      aligned: 0/0 unaligned: 0/0

  Unused:
    aligned: 0/0

Segfault detected, aborting process. Use runtime option -R:-InstallSegfaultHandler if you don't want to use SubstrateSegfaultHandler.
Berstanio commented 1 year ago

Whoops, seems like I forgot to document it. Please add for now the following code snippet as early as possible (preferably at the start of the main method):

        org.lwjgl.system.Library.initialize();
        org.lwjgl.system.ThreadLocalUtil.setupEnvData();
ACGNnsj commented 1 year ago

Great! It did work.

ACGNnsj commented 1 year ago

Hi. There seems to be NoSuchMethodError as long as I import gdx-graalhelper. This occurs whether I run a jar or a native executable.

java.lang.NoSuchMethodError: 'int com.badlogic.gdx.scenes.scene2d.ui.Cell.getAlign()'
    at com.unciv.ui.components.TabbedPager$IPageExtensions$DefaultImpls.equalizeColumns(TabbedPager.kt:137)
    at com.unciv.ui.screens.overviewscreen.EmpireOverviewTab.equalizeColumns(EmpireOverviewTab.kt:11)
    at com.unciv.ui.screens.overviewscreen.UnitOverviewTab.<init>(UnitOverviewTab.kt:86)
    at com.unciv.ui.screens.overviewscreen.EmpireOverviewCategories$Units.createTab(EmpireOverviewCategories.kt:41)
    at com.unciv.ui.screens.overviewscreen.EmpireOverviewCategories$Units.createTab(EmpireOverviewCategories.kt:39)
    at com.unciv.ui.screens.overviewscreen.EmpireOverviewScreen.<init>(EmpireOverviewScreen.kt:59)
    at com.unciv.ui.screens.overviewscreen.EmpireOverviewScreen.<init>(EmpireOverviewScreen.kt:14)
    at com.unciv.ui.screens.worldscreen.WorldScreen.openEmpireOverview(WorldScreen.kt:224)
    at com.unciv.ui.screens.worldscreen.WorldScreen.openEmpireOverview$default(WorldScreen.kt:223)
    at com.unciv.ui.screens.worldscreen.WorldScreenTopBar$OverviewAndSupplyTable$2.invoke(WorldScreenTopBar.kt:184)
    at com.unciv.ui.screens.worldscreen.WorldScreenTopBar$OverviewAndSupplyTable$2.invoke(WorldScreenTopBar.kt:184)
    at com.unciv.ui.components.input.ActivationActionMap.activate(ActivationActionMap.kt:55)
    at com.unciv.ui.components.input.ActorAttachments.activate(ActorAttachments.kt:40)
    at com.unciv.ui.components.input.ActivationExtensionsKt.activate(ActivationExtensions.kt:16)
    at com.unciv.ui.components.input.ActivationListener.tap(ActivationListener.kt:15)
    at com.badlogic.gdx.scenes.scene2d.utils.ActorGestureListener$1.tap(ActorGestureListener.java:52)
    at com.badlogic.gdx.input.GestureDetector.touchUp(GestureDetector.java:206)
    at com.badlogic.gdx.scenes.scene2d.utils.ActorGestureListener.handle(ActorGestureListener.java:125)
    at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:354)
    at com.unciv.ui.screens.basescreen.UncivStage.access$touchUp$s80204510(UncivStage.kt:17)
    at com.unciv.ui.screens.basescreen.UncivStage$touchUp$1.invoke(UncivStage.kt:87)
    at com.unciv.ui.screens.basescreen.UncivStage$touchUp$1.invoke(UncivStage.kt:87)
    at com.unciv.ui.crashhandling.CrashHandlingExtensionsKt$wrapCrashHandling$1.invoke(CrashHandlingExtensions.kt:17)
    at com.unciv.ui.screens.basescreen.UncivStage.touchUp(UncivStage.kt:87)
    at com.badlogic.gdx.InputEventQueue.drain(InputEventQueue.java:70)
    at com.badlogic.gdx.backends.lwjgl3.DefaultLwjgl3Input.update(DefaultLwjgl3Input.java:189)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:378)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:192)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:166)
    at com.unciv.app.desktop.DesktopLauncher.main(DesktopLauncher.kt:85)
Berstanio commented 1 year ago

gdx-svmhelper requires libGDX 1.11.1-SNAPSHOT. In that Snapshot, there was a breaking change, that changed method signatures: https://github.com/libgdx/libgdx/commit/d9758352d2b05e90cf1c07924f1ed2fbeae2f2af As it seems, the core module gets compiled against libGDX 1.11.0, but it needs to be compiled against 1.11.1-SNAPSHOT.

ACGNnsj commented 1 year ago

Perfect. I think everything is OK now.