Mod conflictsOptiFabric Crash: "resourceName" is null During Shader Reload
What the log looks like
java\.lang\.NullPointerException: Cannot invoke "String\.indexOf\(int\)" because "resourceName" is null
FabricShaderProgram\.rewriteAsId[\s\S]{0,250}optifabric\$modifyProgramID
How to fix it
- Update both OptiFabric and Fabric API to the latest builds for your Minecraft version, as newer OptiFabric releases fix several Fabric Rendering API shader hooks.
- Remove OptiFabric and OptiFine and use native Fabric alternatives like Sodium and Iris Shaders instead, which fully support Fabric API custom shaders.
- If you want to keep OptiFabric, open logs/latest.log, find the "resourceName" is null stack trace, and look just below FabricShaderProgram.<init> to identify and remove the mod registering custom shaders (commonly mods bundling LibGui such as Chest Tracker or Horse Stats Vanilla, or HUD mods like DarkKore).
| Loaders | Fabric |
|---|
| Severity | Stops the game |
|---|
| Category | Mod conflicts |
|---|
Check your own log