LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
Calling Assimp.aiReleaseImport right after Assimp.aiImportFileFromMemoryWithProperties on a collada file throws a NPE. The same code does not throw exceptions with version 3.3.1, only the 3.3.2 snapshot.
The line that throws the exception is check(memGetAddress(struct + AIScene.MSKELETONS)); in AIScene.validate, introduced with this commit: 91a982dd5e8f2e0019dbf0a509ca6a9b00d69670
Tested with jdk 18 and 19. Both throw the same exception.
Exception in thread "main" java.lang.NullPointerException
at org.lwjgl.system.Checks.check(Checks.java:188)
at org.lwjgl.assimp.AIScene.validate(AIScene.java:541)
at org.lwjgl.assimp.Assimp.naiReleaseImport(Assimp.java:3348)
at org.lwjgl.assimp.Assimp.aiReleaseImport(Assimp.java:3361)
at test.Main.load(Main.java:41)
at test.Main.main(Main.java:45)
Version
3.3.2 (nightly)
Platform
Windows x64
JDK
jdk-18.0.1.10-hotspot (temurin)
Module
Assimp
Bug description
Calling Assimp.aiReleaseImport right after Assimp.aiImportFileFromMemoryWithProperties on a collada file throws a NPE. The same code does not throw exceptions with version 3.3.1, only the 3.3.2 snapshot. The line that throws the exception is
check(memGetAddress(struct + AIScene.MSKELETONS));
in AIScene.validate, introduced with this commit: 91a982dd5e8f2e0019dbf0a509ca6a9b00d69670Tested with jdk 18 and 19. Both throw the same exception.
Example code:
4 0 0 2 0 1 0 0 2 2 1 3 7 1 4 3 1 5 6 2 6 5 2 7 7 2 8 1 3 9 7 3 10 5 3 11 0 4 12 3 4 13 1 4 14 4 5 15 1 5 16 5 5 17 4 0 18 6 0 19 2 0 20 2 1 21 6 1 22 7 1 23 6 2 24 4 2 25 5 2 26 1 3 27 3 3 28 7 3 29 0 4 30 2 4 31 3 4 32 4 5 33 0 5 34 1 5 35
Stacktrace or crash log output