
Sodium Redirect conflict on first load only
Madis0 opened this issue ยท 6 comments
I inspected your code a bit and I found that this mixin:
is referencing method_23777, which actually looks like this in the latest Sodium (less parameters):
Debug output:
[23:42:30] [Render thread/WARN] (mixin) @Redirect conflict. Skipping sodium.mixins.json:features.fast_biome_colors.MixinClientWorld->@Redirect::redirectSampleColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;)Lnet/minecraft/util/math/Vec3d; with priority 1000, already redirected by colormatic.mixins.json:world.ClientWorldMixin->@Redirect::proxySkyColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;Lnet/minecraft/util/math/Vec3d;F)Lnet/minecraft/util/math/Vec3d; with priority 1000
[23:42:30] [Render thread/WARN] (FileUtil) Configuration conflict: there is more than one oshi.architecture.properties file on the classpath
[23:42:30] [Render thread/WARN] (mixin) @Redirect conflict. Skipping sodium.mixins.json:features.fast_biome_colors.MixinClientWorld->@Redirect::redirectSampleColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;)Lnet/minecraft/util/math/Vec3d; with priority 1000, already redirected by colormatic.mixins.json:world.ClientWorldMixin->@Redirect::proxySkyColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;Lnet/minecraft/util/math/Vec3d;F)Lnet/minecraft/util/math/Vec3d; with priority 1000
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:236)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: Caused by: java.lang.reflect.InvocationTargetException
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: ... 3 more
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:208)
Exception in thread "Render thread" [23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:162)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:154)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at net.minecraft.client.main.Main.main(Main.java:187)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: ... 8 more
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector redirectSampleColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;)Lnet/minecraft/util/math/Vec3d; in sodium.mixins.json:features.fast_biome_colors.MixinClientWorld failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap mixins.sodium.refmap.json
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:408)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1291)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1042)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:395)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351)
[23:42:30] [Render thread/INFO] (Minecraft) [STDERR]: ... 15 more
That may be the reason for #49 and #50 and definitely #52.
After the first launch the value gets cached, as per
Using refmap mixins.sodium.refmap.json
Please provide the versions of all mods you are using - this should not be an issue in the latest release as Colormatic disables this mixin from Sodium.
I tested this by cloning the repo as of 7f9edf2 and running with no changes.
Full launch log (from IDEA) with mod details:
Connected to the target VM, address: '127.0.0.1:32949', transport: 'socket'
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[20:16:31] [main/INFO] (FabricLoader) Loading for game Minecraft 1.17.1
[20:16:31] [main/INFO] (Fabric|Loader) [FabricLoader] Loading 53 mods:
- [email protected]
- [email protected]
- [email protected]+mc.1.17.1
- [email protected]+1.17
- [email protected]+a02b446318
- [email protected]+2b5c62d018
- [email protected]+c345aea818
- [email protected]+a02b446318
- [email protected]+5ab9934c18
- [email protected]+92519afa18
- [email protected]+a02b446318
- [email protected]+a02b446318
- [email protected]+be9da31018
- [email protected]+6cefd57718
- [email protected]+a02b446318
- [email protected]+a722d8c018
- [email protected]+92519afa18
- [email protected]+6cefd57718
- [email protected]+a02b446318
- [email protected]+b7ab612118
- [email protected]+a02b446318
- [email protected]+36b77c3e18
- [email protected]+a02b446318
- [email protected]+a02b446318
- [email protected]+92519afa18
- [email protected]+a02b446318
- [email protected]+6cefd57718
- [email protected]+a02b446318
- [email protected]+92519afa18
- [email protected]+b7ab612118
- [email protected]+a02b446318
- [email protected]+a02b446318
- [email protected]+e2961fee18
- [email protected]+5f02c96918
- [email protected]+a02b446318
- [email protected]+a02b446318
- [email protected]+a02b446318
- [email protected]+a02b446318
- [email protected]+92519afa18
- [email protected]+a02b446318
- [email protected]+a00e834b18
- [email protected]+155f865c18
- [email protected]+a02b446318
- [email protected]+5ab9934c18
- [email protected]+a02b446318
- [email protected]+a02b446318
- [email protected]+b7ab612118
- [email protected]+3fe3c3f518
- [email protected]
- java@16
- [email protected]
- [email protected]
- [email protected]+build.5
[20:16:32] [main/INFO] (mixin) SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/home/madis/.gradle/caches/modules-2/files-2.1/net.fabricmc/sponge-mixin/0.9.4+mixin.0.8.2/ef410951e94c7f4939cc74c86f8df371827818a4/sponge-mixin-0.9.4+mixin.0.8.2.jar Service=Knot/Fabric Env=CLIENT
[20:16:32] [main/INFO] (Fabric|MixinBootstrap) Loaded Fabric development mappings for mixin remapper!
[20:16:32] [main/INFO] (mixin) Compatibility level set to JAVA_16
[20:16:32] [main/INFO] (Sodium) Loaded configuration file for Sodium: 28 options available, 0 override(s) found
[20:16:32] [main/WARN] (mixin) @Mixin target net/minecraft/client/world/ClientChunkManager$ClientChunkMap is public in sodium.mixins.json:features.chunk_rendering.MixinClientChunkManager$MixinClientChunkMap and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net.minecraft.client.particle.BlockLeakParticle$DrippingLava is public in colormatic.mixins.json:particle.DrippingLavaParticleMixin and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/server/world/ServerWorld$ServerEntityHandler is public in fabric-lifecycle-events-v1.mixins.json:ServerWorldEntityLoaderMixin and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/client/world/ClientWorld$ClientEntityHandler is public in fabric-lifecycle-events-v1.mixins.json:client.ClientWorldEntityLoaderMixin and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/server/network/ServerPlayNetworkHandler$1 is public in fabric-events-interaction-v0.mixins.json:MixinServerPlayNetworkHandler and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/village/TradeOffers$TypeAwareBuyForOneEmeraldFactory is public in fabric-object-builder-v1.mixins.json:TypeAwareTradeMixin and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/client/font/FontManager$1 is public in fabric-resource-loader-v0.mixins.json:client.FontManagerResourceReloadListenerMixin and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/server/command/GameRuleCommand$1 is public in fabric-game-rule-api-v1.mixins.json:GameRuleCommandVisitorMixin and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/client/gui/screen/world/EditGameRulesScreen$RuleListWidget$1 is public in fabric-game-rule-api-v1.mixins.json:client.RuleListWidgetVisitorMixin and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/server/world/ThreadedAnvilChunkStorage$EntityTracker is public in fabric-networking-api-v1.mixins.json:accessor.EntityTrackerAccessor and should be specified in value
[20:16:33] [main/WARN] (mixin) @Mixin target net/minecraft/client/particle/ParticleManager$SimpleSpriteProvider is public in fabric-particles-v1.mixins.json:ParticleManagerAccessor$SimpleSpriteProviderAccessor and should be specified in value
[20:16:34] [main/WARN] (mixin) @Mixin target net/minecraft/data/server/AbstractTagProvider$ObjectBuilder is public in fabric-tag-extensions-v0.mixins.json:MixinObjectBuilder and should be specified in value
[20:16:34] [main/WARN] (mixin) @Mixin target net/minecraft/tag/RequiredTagList$TagWrapper is public in fabric-tag-extensions-v0.mixins.json:MixinTagImpl and should be specified in value
[20:16:34] [main/WARN] (mixin) @Mixin target net/minecraft/client/gui/widget/EntryListWidget$Entries is public in mixins.modmenu.json:MixinEntryListWidgetEntries and should be specified in value
[20:16:35] [main/WARN] (FileUtil) Configuration conflict: there is more than one oshi.properties file on the classpath
[20:16:35] [main/WARN] (FileUtil) Configuration conflict: there is more than one oshi.architecture.properties file on the classpath
[20:16:45] [Render thread/WARN] (mixin) @Redirect conflict. Skipping colormatic.mixins.json:world.ClientWorldMixin->@Redirect::proxySkyColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;Lnet/minecraft/util/math/Vec3d;F)Lnet/minecraft/util/math/Vec3d; with priority 1000, already redirected by sodium.mixins.json:features.fast_biome_colors.MixinClientWorld->@Redirect::redirectSampleColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;)Lnet/minecraft/util/math/Vec3d; with priority 1000
[20:16:45] [Render thread/WARN] (FileUtil) Configuration conflict: there is more than one oshi.architecture.properties file on the classpath
[20:16:45] [Render thread/WARN] (mixin) @Redirect conflict. Skipping colormatic.mixins.json:world.ClientWorldMixin->@Redirect::proxySkyColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;Lnet/minecraft/util/math/Vec3d;F)Lnet/minecraft/util/math/Vec3d; with priority 1000, already redirected by sodium.mixins.json:features.fast_biome_colors.MixinClientWorld->@Redirect::redirectSampleColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;)Lnet/minecraft/util/math/Vec3d; with priority 1000
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Exception in thread "Render thread" [20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:236)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: Caused by: java.lang.reflect.InvocationTargetException
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: ... 3 more
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:208)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:162)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:154)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at net.minecraft.client.main.Main.main(Main.java:187)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: ... 8 more
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector proxySkyColor(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/CubicSampler$RgbFetcher;Lnet/minecraft/util/math/Vec3d;F)Lnet/minecraft/util/math/Vec3d; in colormatic.mixins.json:world.ClientWorldMixin failed injection check, (0/1) succeeded. Scanned 1 target(s). No refMap loaded.
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:408)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1291)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1042)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:395)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351)
[20:16:45] [Render thread/INFO] (Minecraft) [STDERR]: ... 15 more
2021-09-17 20:16:45,509 Client Shutdown Thread WARN Unable to register Log4j shutdown hook because JVM is shutting down. Using SimpleLogger
Disconnected from the target VM, address: '127.0.0.1:32949', transport: 'socket'
Process finished with exit code 1
This is a Sodium bug. Relevant issue CaffeineMC/sodium#915