Advanced-Rocketry / AdvancedRocketry

Space mod for minecraft
http://arwiki.dmodoomsirius.me/
MIT License
216 stars 274 forks source link

ARC Furnace crashes the game when powered and switched on #2021

Closed hodo1962 closed 3 years ago

hodo1962 commented 3 years ago

Version of Advanced Rocketry: 1.16.5-1.7.1-4

Have you verified this is an issue in the latest unstable build

Version of LibVulpes: 1.16.5-1.0.1-6

Version of Minecraft: 1.16.5

Does this occur without other mods installed

Crash report and log, or VisualVM snapshot (if applicable)

https://paste.ee/p/2xKNy

Description of the problem

After building an ARC Furnace, i supplied it with power and switched it on. Game crashes instantly. I've found out that an unpowered ARC Furnace can be switched on without a crash. After that it is possible to supply it with power. Nevertheless the smelting recipes doesn't work. (Tested with Rutile ore).

zmaster587 commented 3 years ago

Can you get me a crash report with no mods other than AR and libvulpes installed? There's nothing in here that implicates AR or libvulpes since the stack trace is vanilla with mixins. Since some mods in there do do ASM, it's hard to know who is doing what.

hodo1962 commented 3 years ago

Hello, sorry for the long time to answer but i had to stay a few days in hospital. Here is the minecraft proto coll only with AR, LibVulpes, JEI and Shutupexperimentalsettings - mod. The crash did not occure when smelting Iron and Charcoal to Steel, but it crashes when having Rutile ore in the input hatch.

https://paste.ee/p/A8tBT

Edit: After first crash:

zmaster587 commented 3 years ago

Heya! Geez, sorry to hear about that, I hope you're alright! No worries about taking a few days, I only really can check when I have free time anyway which can be once every few days or few weeks.

It's strange that it'd crash with one recipe but not the other, I'll take a look and see if I can replicate it. The crash report seems to implicate a button on the screen though, which is even weirder

zmaster587 commented 3 years ago

rutile ore recipe added here e41d89b93a4b95e6eb306575271a0ed11ec14eef

zmaster587 commented 3 years ago

I can't seem to replicate the issue, though I am using AR 1.16.5-1.7.1-5 and LibVulpes 1.16.5-1.0.1-8.

Let me know if I'm doing anything differently:

I didn't crash doing any of these things. If that's what you did, then could you try the most recent build and see if the issue continues?

hodo1962 commented 3 years ago

Hey, i'm back and alright again - nothing serious. I have copied the Rutile recipes into the mod file - it works.

With the newest builds: I've started a new test in singleplayer with a new superflat world.

  1. Filled in Iron and Charcoal - while smelting i switched it off - crash

  2. reloaded the game - furnace smelted one item and stopped

  3. switched on - furnace smelted without any crash (could switch it on and off)

  4. Filled in Rutile ore - while smelting i switched it off - crash

  5. reloaded the game - furnace smelted one item and stopped

  6. switched on - furnace smelted without any crash (could switch it on and off)

This is a bit confusing - i can't see any logic behind it. The only thing which happened in every try is a crash when i tried to power it while smelting in step 2 and 5.

zmaster587 commented 3 years ago

Good to hear it's not serious!

Strange though, I've repeated your steps and it's not crashing for me at all. What's really weird though is that the crash appears to be occurring when handling keyboard input in 100% vanilla code so im not sure how clicking would have an impact on it at all. The AR arc furnace UI handler should at least contain a reference to libvulpes in the stack trace, but I don't see that somehow?

Just to rule out any weirdness with how minecraft handles disabling mods (partly because I'm super confused how this is even possible and can't really think of anything else to try), would it be possible to try it one more time without the other mods in your mod folder at all and give me a copy of whatever crash you get with that?

hodo1962 commented 3 years ago

I've tried it again with a fresh copy of MC (using MultiMc as launcher) and only LibVulpes, AR and Jei with the same results as reported above. Forge: 36.1.4 AR version: 1.16.6-1.7.1.5 LibVulpes: 1.16.5-1.0.1-9 JEI: 1.16.4-7.6.1.73 (it's a 1.16.5 version) The crash report is here: https://paste.ee/p/NxxaB I can't figure out what's going on here. It seems that i'm the only one with that issue. I've deinstalled and reinstalled Java too - no change. Tomorrow i'll try it without Jei - last chance i think (before a new Windows installation)

zmaster587 commented 3 years ago

That's really weird. I can't imagine it's JEI because I usually test with that too. Other difference I see is the launcher, I typically use the vanilla launcher over multiMC. By any chance do you have something like software that rebinds keys or changes mouse behavior?

hodo1962 commented 3 years ago

I use a Roccat Vulcan AIMO keyboard and a Logitech M720 Triatlon mouse. I have no predifined keys and the mouse is set to standard settings. This works with every other mod i've installed and makes also no problems with the 1.12.2 version of AR.

I've tested it now with the Minecraft launcher and it shows the same behaviour. I've tested it with some more AR machines which have a button. They all shows the same behaviour. so it seems that this is not only a problem with the arc furnace. The crash report was the same in all cases. Same without JEI.

zmaster587 commented 3 years ago

Very strange. I can't imagine that'd have much impact.

As far as I can tell, the onPress variable in Minecraft's button is null when it's not expected to be and onPress is being called on some keyboard keypress event.

I'll play around with some things, would you mind if I threw a few test builds at you?

zmaster587 commented 3 years ago

LibVulpes-1.16.5-1.0.1-universal.jar.zip

Would you be able to test with this version of libvulpes?

hodo1962 commented 3 years ago

I think i've found it: It is the SPACE - key. I have defined the Space - Key in MC for opening and closing the inventory and the e - key for jumping. Whenever i hit a button in AR and then the Space key to close the gui, the game crashes. When i hit the ESC - key to close the gui, no crash occurs. I've searched a bit at Google and found out that some of this strange behaviours might caused by antiviros software, but not in this case - i've deinstalled the antivirus software to test it. I will test a bit around with an installation with all of my mods - but i think that this is the error.

hodo1962 commented 3 years ago

With that test build of LibVulpes i wasn't able to close the gui with any key except the ESC - key. And this caused no crash - like expected.

zmaster587 commented 3 years ago

With that test build of LibVulpes i wasn't able to close the gui with any key except the ESC - key. And this caused no crash - like expected.

So does this version fix the issue you were having? Or do you mean it works fine with the default keybinds?

hodo1962 commented 3 years ago

With LibVulpes-1.16.5-1.0.1-9-universal: It works fine with the default keys. But if i hit the SPACE key when a gui is open, the games crashes instantly.

LibVulpes-1.16.5-1.0.1 fix this issue.

I think finding this issue was a coincidence - just because i have that key definition. Thank you very much for your efforts.

zmaster587 commented 3 years ago

Aight, I'll apply the change i made to the LibVulpes-1.16.5-1.0..1 I linked here to mainline, hopefully that'd be the end of it!

zmaster587 commented 3 years ago

I just realized I forgot to the take test code out, it got pushed up in https://github.com/Advanced-Rocketry/libVulpes/commit/59da22a777eaf89b9bbbd3502827e5b0cd428509 which corresponds to libvulpes build 12.