[0.7.0] Assembling machine bug

This subforum contains all the issues which we already resolved.
sword2410
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Sep 05, 2013 11:21 am
Contact:

[0.7.0] Assembling machine bug

Post by sword2410 »

I put to manufacture ammunition and realized that the assembler did not use iron and found that when I opened the menu ... :o

Try to get the iron, and ... surprise! you could get everything you want and does not decrease. :mrgreen: :mrgreen:
Attachments
millionaire.jpg
millionaire.jpg (834.39 KiB) Viewed 6877 times
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.7.0] Assembling machine bug

Post by slpwnd »

Are you able to reproduce this?
wrtlprnft
Fast Inserter
Fast Inserter
Posts: 155
Joined: Thu Feb 21, 2013 8:49 pm
Contact:

Re: [0.7.0] Assembling machine bug

Post by wrtlprnft »

sword2410 wrote:Try to get the iron, and ... surprise! you could get everything you want and does not decrease. :mrgreen: :mrgreen:
Did you try filling your player's inventory with these iron plates at least 14000 times? Because you can only hold 7168 iron plates at a time (plus a couple in the quickbar slots), it will be a while until the change is guaranteed to show up in the rounded number.

On the other hand, try to mine your assembler for a huge item explosion (or more likely, a crash)!

On a perhaps more helpful note: 4.3G looks a lot like a 32-bit integer underflow.
sword2410
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Sep 05, 2013 11:21 am
Contact:

Re: [0.7.0] Assembling machine bug

Post by sword2410 »

slpwnd wrote:Are you able to reproduce this?
I have not tried yet, but I will recreate the situation and I'll see if the bug repeats. :mrgreen:
n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [0.7.0] Assembling machine bug

Post by n9103 »

wrtlprnft wrote:On a perhaps more helpful note: 4.3G looks a lot like a 32-bit integer underflow.
My money's on this.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.7.0] Assembling machine bug

Post by slpwnd »

n9103 wrote:
wrtlprnft wrote:On a perhaps more helpful note: 4.3G looks a lot like a 32-bit integer underflow.
My money's on this.
Yeah :)
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.7.0] Assembling machine bug

Post by slpwnd »

This is probably related to the bug with inifinite item when crafting: https://forums.factorio.com/forum/vie ... =30&t=1370
Jinmago
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 16, 2014 5:00 pm
Contact:

Re: [0.7.0] Assembling machine bug

Post by Jinmago »

Seems like the problem is not limited to the assembling machine.
Image
Version is 0.10.0 on 64 bit Windows
I'm using the Dytech Mod, so there might be something wrong with a research recipe as well.
Could it be possible for researches to require negative amounts of items?
arl85
Fast Inserter
Fast Inserter
Posts: 179
Joined: Tue Jun 10, 2014 7:08 am
Contact:

Re: [0.7.0] Assembling machine bug

Post by arl85 »

it also happened for me on Campaign mission #4: Coal available at starting mines was 4.3G but I thought it was intended...

game was 0.10.2 but started with 0.9.8

I'll try to find and post a save later

edit: you can find a save here
4_3G.png
4_3G.png (606.36 KiB) Viewed 6378 times
edit 2:
I found that there's a tile with a negative amount of coal (I removed drill in order to being able to inspect it).
what if the problem is that this tile has been mined by two different drills?
negativeAmount.png
negativeAmount.png (308.53 KiB) Viewed 6377 times
Jinmago
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 16, 2014 5:00 pm
Contact:

Re: [0.7.0] Assembling machine bug

Post by Jinmago »

It is not actually a negative amount of coal, it's just a matter of how it's displayed.

The number -134 is the value of a 32 bit Integer in 2's complement representation:
11111111 11111111 11111111 01111010
The first 1 has a special meaning of: subtract 2^31 from the following number, so
Decimal(1111111 11111111 11111111 01111010) - 2^31 = -134
If you regard it as a ordinary binary number, you get
4294967162
Which are those ominous 4.3 B.
In the case of the campaign, the value of the coal is probably intentionally set to the number 111...111, which is -1 in 2's complement and 4294967295 in decimal.
In the case of the bug(s) there is likely some mechanism that subtracts more items from a stack that there are, the variable gets negative and we get what is displayed as 4.3B in short notation or a negative number in long notation.
slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.7.0][kovarex] Assembling machine bug

Post by slpwnd »

This problem in the campaign has been fixed already afaik. Shouldn't happen in 0.10.2. Not sure what is causing it in the lab. If you guys have save + reproducible steps that would be great.
Jinmago
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jun 16, 2014 5:00 pm
Contact:

Re: [0.7.0] Assembling machine bug

Post by Jinmago »

I think i figured it out:
With a lab with 0 Science Pack 2 in it, I started researching

Code: Select all

{
    type = "technology",
    name = "miner-6",
    icon = "__DyTech-Mining__/graphics/technology/miner.png",
    effects =
    {
      {
        type = "unlock-recipe",
        recipe = "basic-mining-drill-mk6"
      },
    },
    prerequisites = {"miner-5"},
    unit =
    {
      count = 1000,
      ingredients =
      {
        {"science-pack-2", 10},
        {"science-pack-2", 10},
        {"alien-science-pack", 10},
--        {"science-pack-4", 10}, to be added in a future version!
      },
      time = 150
    },
    order = "m-6",
	upgrade = true,
  }
Which has 2 times {"science-pack-2", 10} as ingredients - not intended i guess.

When there are 11 to 19 packs in the lab upon starting a research step, the bug occurs, as 20 packs get subtracted I think. It does neither happen with 10 or less nor with 20 or more.

Interesting as well : If there are 10 packs in there, 10 get subtracted, if there are more, 20 get subtracted. In both cases the research goes on successfully.

Here's the savefile and my mod folder:
http://www.datafilehost.com/d/cf628ee4
You can test it in the bottom right lab.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.7.0] Assembling machine bug

Post by kovarex »

Jinmago wrote:I think i figured it out:
With a lab with 0 Science Pack 2 in it, I started researching

Code: Select all

{
    type = "technology",
    name = "miner-6",
    icon = "__DyTech-Mining__/graphics/technology/miner.png",
    effects =
    {
      {
        type = "unlock-recipe",
        recipe = "basic-mining-drill-mk6"
      },
    },
    prerequisites = {"miner-5"},
    unit =
    {
      count = 1000,
      ingredients =
      {
        {"science-pack-2", 10},
        {"science-pack-2", 10},
        {"alien-science-pack", 10},
--        {"science-pack-4", 10}, to be added in a future version!
      },
      time = 150
    },
    order = "m-6",
	upgrade = true,
  }
Which has 2 times {"science-pack-2", 10} as ingredients - not intended i guess.

When there are 11 to 19 packs in the lab upon starting a research step, the bug occurs, as 20 packs get subtracted I think. It does neither happen with 10 or less nor with 20 or more.

Interesting as well : If there are 10 packs in there, 10 get subtracted, if there are more, 20 get subtracted. In both cases the research goes on successfully.

Here's the savefile and my mod folder:
http://www.datafilehost.com/d/cf628ee4
You can test it in the bottom right lab.
Thanks for the info, it is fixed for 0.10.4, the game will show an error message on start when there are duplicates inputs in the technology.
Post Reply

Return to “Resolved Problems and Bugs”