Open st4s1k opened 2 years ago
The only thing that pops up in google is this: https://build-native-java-apps.cc/developer-guide/debug-native-image-generation/
I cannot debug GraalVM classes because they are not accessible to me. Maybe there is a way to debug this but I don't know how. When you google Fatal error: com.oracle.svm.core.util.VMError$HostedError: java.lang.NullPointerException: Cannot invoke "com.oracle.graal.pointsto.flow.AllInstantiatedTypeFlow.addState(com.oracle.graal.pointsto.PointsToAnalysis, com.oracle.graal.pointsto.typestate.TypeState)" because "t.instantiatedTypes" is null
you literally get 1 (one) search result.
I see that you have posted this as well at the GraalVM issue tracker, which is where it should be. In any case, I've tried your project on Mac, with a more recent GraalVM version, and it fails with a different error:
[Sat Apr 09 15:27:20 CEST 2022][INFO] [SUB] [3/7] Building universe... (4.2s @ 4.77GB)
[Sat Apr 09 15:27:24 CEST 2022][INFO] [SUB] [4/7] Parsing methods... [**] (3.9s @ 6.46GB)
[Sat Apr 09 15:27:32 CEST 2022][INFO] [SUB] [5/7] Inlining methods... [*****] (7.6s @ 3.74GB)
[Sat Apr 09 15:27:50 CEST 2022][INFO] [SUB] [6/7] Compiling methods... [****] (18.0s @ 3.37GB)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB]
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] [7/7] Creating image... (0.0s @ 4.72GB)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] Fatal error: com.oracle.svm.core.util.VMError$HostedError: com.oracle.svm.core.util.VMError$HostedError: Registering type as reachable after analysis: AnalysisType<org.springframework.context.ApplicationListener[], allocated: false, inHeap: false, reachable: false>
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:72)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:678)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:515)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:407)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:585)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:615)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] Caused by: com.oracle.svm.core.util.VMError$HostedError: Registering type as reachable after analysis: AnalysisType<org.springframework.context.ApplicationListener[], allocated: false, inHeap: false, reachable: false>
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:68)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.registerAsReachable(AnalysisConstantReflectionProvider.java:332)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.ameta.HostedDynamicHubFeature.replace(HostedDynamicHubFeature.java:53)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.graal.pointsto.meta.AnalysisUniverse.replaceObject(AnalysisUniverse.java:582)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.image.NativeImageHeap.addArrayElements(NativeImageHeap.java:576)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.image.NativeImageHeap.addObjectToImageHeap(NativeImageHeap.java:473)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.image.NativeImageHeap.addObject(NativeImageHeap.java:295)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.image.NativeImageHeap.processAddObjectWorklist(NativeImageHeap.java:598)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.image.NativeImageHeap.addTrailingObjects(NativeImageHeap.java:198)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:660)
[Sat Apr 09 15:27:56 CEST 2022][INFO] [SUB] ... 5 more
which is similar to this one: https://github.com/oracle/graal/issues/4303
it seems to be related to my error, something about analysis and type
@jperedadnr thanks for additional info
GluonHQ ignite doesn't work as well https://github.com/st4s1k/League-of-Legends-Team-Composition-Tool/tree/experimental/spring-framework-integration
I get a NPE when trying to build the project. It appeared after I tried to integrate spring-boot into the project. I had other issues which I fixed by creating this file
resources/META-INF/substrate/config/initbuildtime
but then the current issue appeared.Expected Behavior
The build should not throw a NPE
Current Behavior
The build throws a NPE
Steps to Reproduce
mvn clean gluonfx:runagent gluonfx:build
Your Environment
Platform: Windows 11 JDK: 17 GraalVM: graalvm-svm-java17-windows-gluon-22.0.0.3-Final