Describe the bug
When launching the game with Radiance on Windows, the Vulkan renderer crashes completely if the game directory involves a Windows Reparse Point (specifically a Directory Junction /J or Symbolic Link /D).
After rigorous cross-platform and environment testing, I have identified that the crash consists of two parts: a primary I/O failure and a secondary unsafe shutdown sequence.
The Crash Sequence & Root Cause:
- The I/O Failure: The C++
core.dll fails to handle Windows Reparse Points during path traversal or directory creation. When it attempts to extract vanilla-pt.zip / advanced.zip (or internal.zip in 0.1.4) into a path containing a Symlink/Junction, it throws an extraction error (e.g., -107 or Failed to load shared shader pack).
- The Unsafe
atexit() Cleanup: Because the extraction fails, the C++ code executes an unsafe exit/abort. The Vulkan layer static memory is destroyed, but the code then attempts to destroy the VkDevice during the atexit() phase, triggering the fatal EXCEPTION_UNCAUGHT_CXX_EXCEPTION (0xe06d7363) in RendererProxy.present().
Vulkan Validation Layer Proof:
VALIDATION ERROR - The VkDevice dispatch handle was not found and Validation will crash. If you are using exit() you need to make sure to not call any Vulkan calls in your atexit() function as the layer static memory will be destroyed prior to atexit()
Workaround / Verification:
If I move the .minecraft folder to a direct physical path (e.g., E:\.minecraft) without using mklink, the ZIP files extract successfully and the game runs perfectly.
How to Fix (Suggestions)
- Path Handling: Ensure the C++ I/O library correctly resolves Windows Reparse Points (e.g., checking for
FILE_ATTRIBUTE_REPARSE_POINT properly or using std::filesystem::canonical safely on Windows).
- Lifecycle Management: Catch the extraction error gracefully instead of exiting abruptly, or ensure
VkDevice is validated before being destroyed in the atexit() hook.
Version Tracking (Regression)
- 0.1.0 ~ 0.1.3: Works perfectly, even with Symlinks/Junctions.
- 0.1.4 alpha: The game silently crashes/hangs during initialization (the Symlink I/O bug was introduced here).
- 0.1.5 alpha: The crash is no longer silent and throws the explicit
hs_err_pid native error due to the atexit() device cleanup sequence.
To Reproduce
- Use Windows
cmd to create a Directory Junction for your game directory (e.g., mklink /J C:\Users\User\AppData\Roaming\.minecraft E:\.minecraft).
- Install Radiance
0.1.5 alpha.
- Launch the game. It will fail to extract the ZIP and instantly crash the JVM.
Environment
- OS: Windows 11 (Build 26100)
- CPU/GPU: Intel Core i9-14900HX / NVIDIA RTX 4060 Laptop GPU
- Java: Zulu OpenJDK 21.0.11
- Minecraft: 1.21.4 (Fabric 0.19.2)
- Mod Version: 0.1.4 alpha & 0.1.5 alpha
Crash Report / Logs
hs_err_pid.log
output_with_validation_layers.txt
Describe the bug
When launching the game with Radiance on Windows, the Vulkan renderer crashes completely if the game directory involves a Windows Reparse Point (specifically a Directory Junction
/Jor Symbolic Link/D).After rigorous cross-platform and environment testing, I have identified that the crash consists of two parts: a primary I/O failure and a secondary unsafe shutdown sequence.
The Crash Sequence & Root Cause:
core.dllfails to handle Windows Reparse Points during path traversal or directory creation. When it attempts to extractvanilla-pt.zip/advanced.zip(orinternal.zipin 0.1.4) into a path containing a Symlink/Junction, it throws an extraction error (e.g.,-107orFailed to load shared shader pack).atexit()Cleanup: Because the extraction fails, the C++ code executes an unsafe exit/abort. The Vulkan layer static memory is destroyed, but the code then attempts to destroy theVkDeviceduring theatexit()phase, triggering the fatalEXCEPTION_UNCAUGHT_CXX_EXCEPTION (0xe06d7363)inRendererProxy.present().Vulkan Validation Layer Proof:
Workaround / Verification:
If I move the
.minecraftfolder to a direct physical path (e.g.,E:\.minecraft) without usingmklink, the ZIP files extract successfully and the game runs perfectly.How to Fix (Suggestions)
FILE_ATTRIBUTE_REPARSE_POINTproperly or usingstd::filesystem::canonicalsafely on Windows).VkDeviceis validated before being destroyed in theatexit()hook.Version Tracking (Regression)
hs_err_pidnative error due to theatexit()device cleanup sequence.To Reproduce
cmdto create a Directory Junction for your game directory (e.g.,mklink /J C:\Users\User\AppData\Roaming\.minecraft E:\.minecraft).0.1.5 alpha.Environment
Crash Report / Logs
hs_err_pid.log
output_with_validation_layers.txt