No Chat Reports

No Chat Reports

43M Downloads

Hovering over Only Show Secure Chat button crash

kevinthegreat1 opened this issue ยท 2 comments

commented

Ok, this is really weird.

caused by #117

Game crashes when hoving over Only Show Secure Chat button when throw new IllegalStateException("Can't touch this"); is present in constructor in MixinChatOptionsScreen

field secureChatTooltip doesn't get initialized in that case

Code:

With IllegalStateException:

Source code:
MixinChatOptionsScreen with IllegalStateExecption

Generated code:
ChatOptionsScreen with IllegalStateExecption

Without IllegalStateException:

Source code:
ChatOptionsScreen without IllegalStateExecption

Generated code:
MixinChatOptionsScreen without IllegalStateExecption

In the first generated code the initializer for field secureChatTooltip is NOT copied to the constructor.
In the second one, the initializer is present.

commented

Very weird indeed. I typically try to avoid non-static initializers in my mixins, guess that justifies it.

commented

Welp. I didn't know that could happen. guess that's a lesson learned.