Technology give-item with 0 count freezes the game and crash

This subforum contains all the issues which we already resolved.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Technology give-item with 0 count freezes the game and crash

Post by Mooncat »

Bug: If technology has an "effect" with type = "give-item" and count = 0, the game will freeze and then crash if such technology is researched.

Steps to reproduce:
1) select a technology and change its effects to be something like this:

Code: Select all

effects =
{
    {
        type = "give-item",
        name = "inserter",
        count = 0
    }
}
or install the following mod. It changes the effects of "automation" as above:
tech-give-zero-item-crash_0.1.0.zip
(813 Bytes) Downloaded 59 times
2) start a new game and research that technology
3) observe when it finish

Here is the log:
log
Expected result:
Either of the following:
a) game does not crash. No item is given.
b) count has to be at least 1 or error will occur when game initializes.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14390
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Technology give-item with 0 count freezes the game and crash

Post by Rseding91 »

This is fixed for 0.15. You must have a count != 0.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1196
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: Technology give-item with 0 count freezes the game and crash

Post by Mooncat »

Thanks. It should be fine.
But please consider this request: Customizable technology effect :mrgreen:
Post Reply

Return to “Resolved Problems and Bugs”