CleanroomMC / Fugue

Dead mods still alive ... in some way.
GNU General Public License v3.0
37 stars 5 forks source link

Fugue without `!` in front of filename will cause RFTools' Storage Scanner to crash #17

Closed ZZZank closed 3 months ago

ZZZank commented 4 months ago

This crash can be reproduced using(and only using)

After installing these, just open a Storage Scanner.

What happened when Fugue's filename is Fugue-1.12.2-0.5.4.jar: crash-2024-02-12_10.11.39-client.txt

java.lang.NullPointerException: Cannot invoke "mcjty.lib.gui.Scrollable.getFirstSelected()" because "this.scrollable" is null
    at mcjty.lib.gui.widgets.Slider.mouseWheel(Slider.java:178)
    at mcjty.lib.gui.widgets.AbstractContainerWidget.mouseWheel(AbstractContainerWidget.java:46)
    at mcjty.lib.gui.widgets.AbstractContainerWidget.mouseWheel(AbstractContainerWidget.java:46)
    at mcjty.lib.gui.Window.draw(Window.java:292)
    at mcjty.lib.gui.WindowManager.lambda$draw$3(WindowManager.java:87)
...

What happend when Fugue's filename is !Fugue-1.12.2-0.5.4.jar: (Github somehow doesn't allow me to upload screenshot, it seems that there're some wierd format on my screenshot) Everything seems working normally.

Given the fact that ! in filename can affect even untouched mods, I think maybe Fugue should add an ! in filename ahead of time when release(MixinBooter is already doing so, and that doesn't seem to violate anything)

kappa-maintainer commented 4 months ago

I want to add this by default too, but GitHub just removed it automatically Will try to find another working char But Fugue somehow patched mcjty is unintended. I will keep this PR open, so I can check it later

ZZZank commented 4 months ago

I found that in certain cases Fugue will crash RFTools even with ! in filename. I can reporduece this crash by:

The modlist is the same as before, and the crash report is also the same. It seems that go far away is important for triggering this crash, because it won't crash when I was near such Storage Scanner

kappa-maintainer commented 3 months ago

Switched to +, but still need to investigate what's behind RFTools' crash

kappa-maintainer commented 3 months ago

Reproduced, just clicking Storage Scanner will crash the game like this

kappa-maintainer commented 3 months ago

RFTools must have some weird problem The scrollable was null for no reason, but when I mixin into it and see what's going on it suddenly had a value From this point, all rftool machines in this save are safe from crash now, even after I disabled the mixin or fugue. The same crash happened again in new save though

ZZZank commented 3 months ago

🤯That sounds bad, random problem is the most difficult to fix, usually.

Will it be possible that the scrollable obj get wiped after some action, like breaking a placed container?

On my side, the crash only happens when I'm not near my Storage Scanner, and it feels like such Storage Scanner, or fields inside it is wiped when I walked away, and loaded only when visible.

kappa-maintainer commented 3 months ago

Could you try if the latest build from action fix the problem? I also get Could not find component 'offset'! when using scanner, but I have no idea if it is normal, you could check that too

ZZZank commented 3 months ago

I've tested the snapshot version from https://github.com/CleanroomMC/Fugue/actions/runs/8325910403, and the game runs runs for nearly an hour without crash, no matter how I opened the Storage Scanner. Cool!

But it finally crashed due to another mod FutureMC, which can be fixed with an addition to the config. I think I will make a PR for that soon.

Maybe we can mark this issue as resolved now