External Publication
Visit Post

An attempt at Vulkan

jMonkeyEngine Hub March 25, 2026
Source

I need some help.

3月 25, 2026 1:22:40 下午 com.jme3.renderer.vulkan.runtime.VulkanRuntimeLifecycle initWindow
信息: [Vulkan] window framebuffer size = 1920 x 1080
3月 25, 2026 1:22:40 下午 com.jme3.renderer.vulkan.runtime.VulkanRuntimeLifecycle initWindow
信息: [Vulkan] settings size (logical) = 1920 x 1080
[Vulkan] Validation layer enabled: VK_LAYER_KHRONOS_validation
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd5e2a3020, pid=26408, tid=21308
#
# JRE version: OpenJDK Runtime Environment Zulu17.42+19-CA (17.0.7+7) (build 17.0.7+7-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu17.42+19-CA (17.0.7+7-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C  [msvcp140.dll+0x13020]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# F:\JME\jmonkeyengine\jme3-lwjgl3\hs_err_pid26408.log
#
# If you would like to submit a bug report, please visit:
#   http://www.azul.com/support/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

When I open the validation layer of lwjgl-vulkan, this problem occurs.

github.com/LWJGL/lwjgl3-demos

src/org/lwjgl/demo/vulkan/ColoredRotatingQuadDemo.java

2cd4a62b0

    26. import org.lwjgl.vulkan.*;


    27.

    28. /**


    29.  * Renders a simple rotating colored quad on a cornflower blue background on a GLFW window with Vulkan.


    30.  * <p>


    31.  * This is like the {@link ColoredTriangleDemo}, but adds an additional rotation.


    32.  * Do a diff between those two classes to see what's new.


    33.  *


    34.  * @author Kai Burjack


    35.  */


    36. public class ColoredRotatingQuadDemo {


    37.     private static boolean debug = System.getProperty("NDEBUG") == null;


    38.

    39.     private static String[] layers = {


    40. 			"VK_LAYER_LUNARG_standard_validation",


    41. 			"VK_LAYER_KHRONOS_validation",


    42.     };


    43.

    44.     /**


    45.      * This is just -1L, but it is nicer as a symbolic constant.


    46.      */

If anyone is willing to help, please try running this demo and enable the validation layer to see if it also triggers a null pointer crash.

I tried to run the compiled shader, but it seems the shader returned an error code -4 and exited. I’m not sure what -4 means. I need to enable the Vulkan validation layer to locate the issue, but when I turn on the validation layer, the program triggers this null pointer error.

Discussion in the ATmosphere

Loading comments...