Towdium / JustEnoughCalculation

A simple minecraft mod help you calculate the cost for recipes
Other
53 stars 39 forks source link

Crash when saving an empty recipe #54

Closed KindarConrath closed 4 years ago

KindarConrath commented 5 years ago

I'll create a more detailed report later, but I crashed my game when I edited a recipe, deleted everything and hit save.

Towdium commented 5 years ago

Thanks for report!

No need for further testing. I have already had it reproduced.

ClarSco commented 5 years ago

This has just happened to me as well. If bdd66e7 is included in the most recent version of JEC on Curse, the issue appears to be unresolved.

I had populated a recipe with the JEI + button, realised that it had cycled to the next recipe, then started to remove the items from the grid. After clearing the last item from the recipe, I (accidentally) clicked the Save button. The game then froze for a few seconds and exited with the following message:

The game crashed whilst updating screen events
Error: java.lang.IllegalArgumentException: Invalid recipe

Full crash report: crash-2019-06-25_01.32.02-client.txt

Towdium commented 5 years ago

Thanks for report!

The fix should have been pushed to curse. To clarify, this crash happens when the player attempts to save a recipe with empty input or output list. The "save" button should be disabled when any of them is empty to prevent such behavior. So can you further describe steps to reproduce it?

ClarSco commented 5 years ago

The Save button was not disabled (but it might have been greyed out), hence the crash. I can't remember exactly what I did, but I think that this may have happened on a recipe that had already been saved, i.e. the crash happened when editing the existing recipe.

ClockwiseGear commented 4 years ago

+1 crash with the same issue, Save button was not disabled.

https://pastebin.com/mLm7We4n

Towdium commented 4 years ago

Hi @ClockwiseGear

Can you provide some steps to reproduce the issue?

ClockwiseGear commented 4 years ago

I was playing the Manufactio and was setting up recipes for the modular machines. After assigning a recipe of one stone yielding the output of a blueprint for the "Cobblegen 9000" machine, I also set a recipe for the "Laboratory" blueprint with the blocks required for the structure as the input. After checking to see if the crafting calculator differentiated between the two recipes (it did, thanks for that btw), I searched for the "Covblegen 9000" recipe, clicked edit, then clear grid, then save. As soon as I hit save, the game crashed to desktop with the above crash report.

On Tue, Dec 17, 2019, 6:10 PM Juntong Liu notifications@github.com wrote:

Hi @ClockwiseGear https://github.com/ClockwiseGear

Can you provide some steps to reproduce the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Towdium/JustEnoughCalculation/issues/54?email_source=notifications&email_token=AK3EQHVQAG2KFT3X4XMU56LQZF2BVA5CNFSM4HFRHJ72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHEQDLY#issuecomment-566821295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3EQHSCMBVKIKY2XPWEBJ3QZF2BVANCNFSM4HFRHJ7Q .

ClockwiseGear commented 4 years ago

Here is a link to a Twitch clip of the crash: https://clips.twitch.tv/TardyInventiveDugongYee

On Tue, Dec 17, 2019, 6:10 PM Juntong Liu notifications@github.com wrote:

Hi @ClockwiseGear https://github.com/ClockwiseGear

Can you provide some steps to reproduce the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Towdium/JustEnoughCalculation/issues/54?email_source=notifications&email_token=AK3EQHVQAG2KFT3X4XMU56LQZF2BVA5CNFSM4HFRHJ72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHEQDLY#issuecomment-566821295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3EQHSCMBVKIKY2XPWEBJ3QZF2BVANCNFSM4HFRHJ7Q .

Towdium commented 4 years ago

@ClockwiseGear Thanks! Got it.

Towdium commented 4 years ago

Should be fixed for both 1.12 and 1.14 latest version