[0.17.12] Crash while saving when assembler holds multiple non-stackable items

This subforum contains all the issues which we already resolved.
Post Reply
OkraDonkey
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Dec 16, 2017 1:24 pm
Contact:

[0.17.12] Crash while saving when assembler holds multiple non-stackable items

Post by OkraDonkey »

Mod:
KenirasRandomRecipes

Kenira's mod alters the quantities of ingredients and products of many recipes.
With the default mod settings, the Modular Armor recipe is changed to:
70 x Steel plate + 37 x Advanced circuit = 3 x Modular armor.

If a Save is attempted right after completion of this recipe in an Assembling Machine, while the stack of 3x Modular armor is still in the Assembling Machine output slot, the game will crash.

To reproduce this crash:
Start sandbox game with items; set up an Assembling Machine and solar power.
Set the Assembling Machine to craft Modular Armor.
Add the required ingredients (70 x steel plate and 37 x advanced circuit).
The 3 Modular armor suits will be crafted and will appear in the Assembling Machine's output slot.
Save the game.

What happened:
Crash during save operation

What should happen:
Save without crashing

Stack trace:

Code: Select all

956.077 Error ItemStack.cpp:96: Attempting to save a non-stackable item with a count of > 1: pointer: 0x000001df5c17c860, item pointer: 0x000001df64f70ae0, ID: 200, count: 3, stack size: 1, prototype stack size: 1, prototype type: armor
Note:
The player can remove the three suits from the Assembling Machine without error. The crash only occurs if a save is attempted while the stack exists in the machine.

The attached save file consists only of an Assembling machine which has been set up and configured to craft Modular armor. Just turn the power switch ON. See screenshot.

Thanks!
Attachments
Crash.png
Crash.png (2.2 MiB) Viewed 2407 times
Crash.zip
(2.76 MiB) Downloaded 110 times
factorio-current.log
(8 KiB) Downloaded 111 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.12] Crash while saving when assembler holds multiple non-stackable items

Post by Rseding91 »

Thanks for the report. I've fixed it for the next version of 0.17: that recipe should never be able to produce > 1 count of things which the game never allows > 1 count for. In the next version of 0.17 it will error on startup that the recipe is invalid instead of causing corruption/crashes later.
If you want to get ahold of me I'm almost always on Discord.

MiniHerc
Fast Inserter
Fast Inserter
Posts: 171
Joined: Fri Jun 26, 2015 11:37 pm

Re: [0.17.12] Crash while saving when assembler holds multiple non-stackable items

Post by MiniHerc »

Rseding91 wrote:
Fri Mar 15, 2019 1:04 pm
Thanks for the report. I've fixed it for the next version of 0.17: that recipe should never be able to produce > 1 count of things which the game never allows > 1 count for. In the next version of 0.17 it will error on startup that the recipe is invalid instead of causing corruption/crashes later.
Instead of fixing it that way, why not fix it so non-stackable items can stack, but only in an assembler, and only if the recipe produces more than 1 of that item?

The OP reported that the recipe worked fine, it's just that the game couldn't make a save under those circumstances.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.12] Crash while saving when assembler holds multiple non-stackable items

Post by Rseding91 »

Ambaire wrote:
Fri Mar 15, 2019 8:41 pm
Rseding91 wrote:
Fri Mar 15, 2019 1:04 pm
Thanks for the report. I've fixed it for the next version of 0.17: that recipe should never be able to produce > 1 count of things which the game never allows > 1 count for. In the next version of 0.17 it will error on startup that the recipe is invalid instead of causing corruption/crashes later.
Instead of fixing it that way, why not fix it so non-stackable items can stack, but only in an assembler, and only if the recipe produces more than 1 of that item?
Because non stackable items are non stackable - by design. We have no plans to make them stackable because it makes no sense for them to stack. Like trying to make a flat sphere... it's not a sphere anymore.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”