Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Massive log spam 'Failed to modify unbaked model' #133

Open
mpustovoi opened this issue Sep 15, 2024 · 14 comments
Open

[Bug]: Massive log spam 'Failed to modify unbaked model' #133

mpustovoi opened this issue Sep 15, 2024 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@mpustovoi
Copy link

Mod Loader (Required)

Forge

Minecraft Version(s) (Required)

1.20.1

Mod Version(s) (Required)

v8.1.23

Other Mods Involved (Required)

No

Notes (Required)

I suppose it's some kind of compatibility issue, but I personally can't figure out the reason.
I have a ton of different mods, and I don't remember exactly when this problem appeared. Maybe about half a month ago.
This makes logging difficult, since there are about 280 thousand lines in the latest.log with the same error from your mod.

[<time>] [Worker-ResourceReload-2/ERROR] [Puzzles Lib/]: Failed to modify unbaked model
java.lang.ClassCastException: null

latest.log (Required)

https://mclo.gs/uVv75OI

@mpustovoi mpustovoi added the bug Something isn't working label Sep 15, 2024
@mpustovoi
Copy link
Author

Here is the full file, which weighs about 20 MB:
latest.log

@Fuzss
Copy link
Owner

Fuzss commented Sep 15, 2024

Ideally report this to FerriteCore. Since it works fine in vanilla / without FerriteCore I'd assume it's an issue on their end.

@mpustovoi
Copy link
Author

I just tried it on a minimal setup:
image

With or without FerriteCore, there are many ModelBakery errors in the logs: https://mclo.gs/hfYVr2j#L3.

I ran it on a clean instance without configs.

@mpustovoi
Copy link
Author

mpustovoi commented Sep 15, 2024

I also tried without FerriteCore in my modpack.
Minecraft took 2-3 times longer to run. The length of the log file has grown to 1.3 million lines. It's full of errors with apparently every wall block and its states. First error as an example:

[<time>] [Worker-ResourceReload-2/ERROR] [Puzzles Lib/]: Failed to modify unbaked model
java.lang.IllegalArgumentException: Cannot set property EnumProperty{name=east, clazz=class net.minecraft.world.level.block.state.properties.WallSide, values=[none, low, tall]} to true on Block{deeperdarker:sculk_grime_brick_wall}, it is not an allowed value
	at net.minecraft.world.level.block.state.StateHolder.m_61124_(StateHolder.java:130) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
	at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.setBlockStateValue(MultiPartTranslator.java:59) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
	at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.convertBlockState(MultiPartTranslator.java:50) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
	at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.convertAnyBlockState(MultiPartTranslator.java:43) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
	at fuzs.diagonalblocks.client.handler.DiagonalModelHandler.onModifyUnbakedModel(DiagonalModelHandler.java:53) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
	at fuzs.puzzleslib.impl.client.event.ForgeClientEventInvokers.lambda$registerLoadingHandlers$6(ForgeClientEventInvokers.java:80) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
	at fuzs.puzzleslib.api.event.v1.core.ForgeEventInvokerRegistry.lambda$register$0(ForgeEventInvokerRegistry.java:25) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
	at fuzs.puzzleslib.impl.event.ForgeEventInvokerRegistryImpl$ForgeEventInvoker.lambda$register$1(ForgeEventInvokerRegistryImpl.java:725) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%23128!/:?]
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%23128!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%23128!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%23128!/:?]
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:114) ~[javafmllanguage-1.20.1-47.3.7.jar%231002!/:?]
	at jdk.internal.reflect.GeneratedMethodAccessor19.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.minecraftforge.client.ForgeHooksClient.mdfe4e85$modernfix$lambda$postNamespacedKeySetEvent$0$0(ForgeHooksClient.java:1372) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
	at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
	at net.minecraftforge.fml.ModList.forEachModContainer(ModList.java:223) ~[fmlcore-1.20.1-47.3.7.jar%231001!/:?]
	at net.minecraftforge.client.ForgeHooksClient.redirect$zfl000$modernfix$postNamespacedKeySetEvent(ForgeHooksClient.java:1367) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
	at net.minecraftforge.client.ForgeHooksClient.onModifyBakingResult(ForgeHooksClient.java:471) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
	at net.minecraft.client.resources.model.ModelManager.m_245476_(ModelManager.java:174) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
	at net.minecraft.client.resources.model.ModelManager.m_246937_(ModelManager.java:89) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]

I can't send it not in zip because of its 160 MB size.
2024-09-15-1.log.gz

Although, I don't have such lines here:

[<time>] [Worker-ResourceReload-0/ERROR] [Puzzles Lib/]: Failed to modify unbaked model
java.lang.ClassCastException: null

@Fuzss
Copy link
Owner

Fuzss commented Sep 15, 2024

I just tried it on a minimal setup: image

With or without FerriteCore, there are many ModelBakery errors in the logs: https://mclo.gs/hfYVr2j#L3.

I ran it on a clean instance without configs.

For this setup, how do diagonal walls look in-game? Are they fine, or do you see the purple/black missing model?

@Fuzss
Copy link
Owner

Fuzss commented Sep 15, 2024

I also tried without FerriteCore in my modpack. Minecraft took 2-3 times longer to run. The length of the log file has grown to 1.3 million lines. It's full of errors with apparently every wall block and its states. First error as an example:

[<time>] [Worker-ResourceReload-2/ERROR] [Puzzles Lib/]: Failed to modify unbaked model
java.lang.IllegalArgumentException: Cannot set property EnumProperty{name=east, clazz=class net.minecraft.world.level.block.state.properties.WallSide, values=[none, low, tall]} to true on Block{deeperdarker:sculk_grime_brick_wall}, it is not an allowed value
	at net.minecraft.world.level.block.state.StateHolder.m_61124_(StateHolder.java:130) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
	at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.setBlockStateValue(MultiPartTranslator.java:59) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
	at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.convertBlockState(MultiPartTranslator.java:50) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
	at fuzs.diagonalblocks.api.v2.client.MultiPartTranslator.convertAnyBlockState(MultiPartTranslator.java:43) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
	at fuzs.diagonalblocks.client.handler.DiagonalModelHandler.onModifyUnbakedModel(DiagonalModelHandler.java:53) ~[diagonalblocks-forge-8.0.5.jar%231232!/:8.0.5]
	at fuzs.puzzleslib.impl.client.event.ForgeClientEventInvokers.lambda$registerLoadingHandlers$6(ForgeClientEventInvokers.java:80) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
	at fuzs.puzzleslib.api.event.v1.core.ForgeEventInvokerRegistry.lambda$register$0(ForgeEventInvokerRegistry.java:25) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
	at fuzs.puzzleslib.impl.event.ForgeEventInvokerRegistryImpl$ForgeEventInvoker.lambda$register$1(ForgeEventInvokerRegistryImpl.java:725) ~[PuzzlesLib-v8.1.23-1.20.1-Forge.jar%23873!/:8.1.23]
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%23128!/:?]
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%23128!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%23128!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%23128!/:?]
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:114) ~[javafmllanguage-1.20.1-47.3.7.jar%231002!/:?]
	at jdk.internal.reflect.GeneratedMethodAccessor19.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.minecraftforge.client.ForgeHooksClient.mdfe4e85$modernfix$lambda$postNamespacedKeySetEvent$0$0(ForgeHooksClient.java:1372) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
	at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
	at net.minecraftforge.fml.ModList.forEachModContainer(ModList.java:223) ~[fmlcore-1.20.1-47.3.7.jar%231001!/:?]
	at net.minecraftforge.client.ForgeHooksClient.redirect$zfl000$modernfix$postNamespacedKeySetEvent(ForgeHooksClient.java:1367) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
	at net.minecraftforge.client.ForgeHooksClient.onModifyBakingResult(ForgeHooksClient.java:471) ~[forge-1.20.1-47.3.7-universal.jar%231005!/:?]
	at net.minecraft.client.resources.model.ModelManager.m_245476_(ModelManager.java:174) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
	at net.minecraft.client.resources.model.ModelManager.m_246937_(ModelManager.java:89) ~[client-1.20.1-20230612.114412-srg.jar%231000!/:?]
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]

I can't send it not in zip because of its 160 MB size. 2024-09-15-1.log.gz

Although, I don't have such lines here:

[<time>] [Worker-ResourceReload-0/ERROR] [Puzzles Lib/]: Failed to modify unbaked model
java.lang.ClassCastException: null

And here, can you do another minimal setup with Diagonal Walls + Deeper Darker? (no FerriteCore)

@mpustovoi
Copy link
Author

mpustovoi commented Sep 15, 2024

For this setup, how do diagonal walls look in-game? Are they fine, or do you see the purple/black missing model?

Without or with FerriteCore it looks the same:
image

@mpustovoi
Copy link
Author

mpustovoi commented Sep 15, 2024

And here, can you do another minimal setup with Diagonal Walls + Deeper Darker? (no FerriteCore)

Here everything is also fine (even with FerriteCore):
image

@Fuzss
Copy link
Owner

Fuzss commented Sep 17, 2024

Thanks for all you investigations!

So for those errors:
Exception loading blockstate definition: ...
I don't think that's an issue, especially since everything works for you in-game. If I remember correctly this always used to show in-dev and I simply suppressed it, as it's not relevant (the model is added via code later). So I assume the suppression is just not working here, which isn't important enough to look into.

The main issue though I have no clue.
java.lang.IllegalArgumentException: Cannot set property EnumProperty
Since neither Deeper Dark nor FerriteCore on their own are causing it, I'm kind of suspecting a third mod to be responsible.

@Fuzss
Copy link
Owner

Fuzss commented Sep 17, 2024

If you come on our Discord (https://lunapixel.studio/discord, just say hello in #fuzs-projects) I can send you a test version with a potential fix / workaround.

@ZephyrWindSpirit
Copy link

Did anything go forward with diagnosing this error? I have it too.

@mpustovoi
Copy link
Author

FerriteCore marked this issue as fixed in their commit: malte0811/FerriteCore@f3a4b3f.
However, I'm still unable to test it.

@malte0811
Copy link

Given #133 (comment) I decided that the underlying error was not in FerriteCore, since you get similar log spam without it. The part of the issue that is in FerriteCore is that it produces different (and useless) errors when trying to set properties to invalid values, and that is what the commit you linked fixes.

@ZephyrWindSpirit
Copy link

I may have solved my own problem.
We had structurify installed and its library. For some reason those did this massive logspam, but without them, it didn't and made puzzleslib panic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants