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

Add crash protection and additional loggin when loading block materials #78

Open
Lythom opened this issue Aug 11, 2022 · 0 comments
Open
Assignees

Comments

@Lythom
Copy link
Owner

Lythom commented Aug 11, 2022

[10:42] Lythom: The crash log tells there is an errors while configuring capsule mod, specifically when calling block.defaultBlockState().getMaterial() while iterating on ForgeRegistries.BLOCKS.
It means there is a block registered that crashes when getMaterial is used on its default state. It can happen because the mod is not yet fully initialized at this point or because of a bug in the mod or because of a bug / incompatibility between one of the core mod that mofifies the getMaterial function and some other mod. I can't tell which block is causing this from the stack trace unfortunately.
What I can do though is add crash protection to this section of capsule code and print an error with additional informations.
I'm not at home this week but I'll try do add this later it should be quick to do.

Caused by 1: java.lang.ExceptionInInitializerError
at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.handler$zch000$srm_getMaterial(BlockBehaviour.java:875) ~[client-1.18.2-20220404.173914-srg.jar%23184!/:?] {re:mixin,xf:fml:libx:random_tick_block,re:computing_frames,xf:fml:libx:random_tick_block,re:classloading,xf:fml:libx:random_tick_block,pl:mixin:APP:snowrealmagic.mixins.json:BlockStateMixin,pl:mixin:APP:byg.mixins.json:common.block.MixinBlockBehaviourBlockStateBase,pl:mixin:APP:valhelsia_core.mixins.json:BlockStateBaseMixin,pl:mixin:A}
at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60767_(BlockBehaviour.java) ~[client-1.18.2-20220404.173914-srg.jar%23184!/:?] {re:mixin,xf:fml:libx:random_tick_block,re:computing_frames,xf:fml:libx:random_tick_block,re:classloading,xf:fml:libx:random_tick_block,pl:mixin:APP:snowrealmagic.mixins.json:BlockStateMixin,pl:mixin:APP:byg.mixins.json:common.block.MixinBlockBehaviourBlockStateBase,pl:mixin:APP:valhelsia_core.mixins.json:BlockStateBaseMixin,pl:mixin:A}
at capsule.Config.lambda$configureCapture$2(Config.java:185) ~[Capsule-1.18.2-6.0.92.jar%2378!/:1.18.2-6.0.92] {re:classloading}
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) ~[?:?] {}

@Lythom Lythom self-assigned this Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant