[0.11.19] [kovarex] Crafting by hand with probability tag causes lockup

This subforum contains all the issues which we already resolved.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

[0.11.19] [kovarex] Crafting by hand with probability tag causes lockup

Post by bobingabout »

Again, discovered while modding.

I made a recipe with the following peice of code.

Code: Select all

  {
    type = "recipe",
    name = "sort-gem-ore",
    energy_required = 1,
    ingredients =
    {
	  {"gem-ore", 2},
    },
    results =
    {
      {type="item", name="ruby-3", amount=1, probability = 1},
      {type="item", name="sapphire-3", amount=1, probability = 0.8},
      {type="item", name="emerald-3", amount=1, probability = 0.6},
      {type="item", name="topaz-3", amount=1, probability = 0.4},
      {type="item", name="diamond-3", amount=1, probability = 0.2},
    },
    subgroup = "bob-ores",
    icon = "__bobplates__/graphics/icons/ore/gem-ore.png",
    order = "f-a[gem-ore]",
  },
This is made perfectly by an assembly machine with no problems.
However, when made by hand causes the game to lock up, and start taking imense ammounts of CPU power and RAM (in excess of 4GB) to the point where my computer pretty much stopped responding, causing me to need to press the reset button. When the crafting recipe completes its cycle and would give you the results, you hear a chime like it's trying to send you a message as the game locks up. I can't see the message, the lockup freezes the game's image.

Further analysis shows that the issue is with the probability tag, when set below 1. (not tried above 1, why would you set a probability above 100%?)
The ammount of result items has no effect, with a probability tag or not, if any of them have a probability below 1, you get the issue.

note: this does not happen with mining, I have ores with probabilities to drop while mining and this works fine, the issue apears to be exclusive to crafting by hand.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: [0.11.19] Crafting by hand with probability tag causes lockup

Post by MF- »

There was a change in hadling the probability in 0.11.20 AFAIK.

Fixed the loot table probability calculation bug. (https://forums.factorio.com/forum/vie ... php?t=9277)
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.11.19] Crafting by hand with probability tag causes lockup

Post by bobingabout »

As you can see, also posted by me.
The bug does still exist in 0.11.20, I updated to it shortly after posting this bug report, and the error still exists.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.19] Crafting by hand with probability tag causes lockup

Post by kovarex »

MF- wrote:There was a change in hadling the probability in 0.11.20 AFAIK.

Fixed the loot table probability calculation bug. (https://forums.factorio.com/forum/vie ... php?t=9277)
This has nothing to do with the loot table probability calculation, I will take a look at the bug.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.19] [kovarex] Crafting by hand with probability tag causes lockup

Post by kovarex »

Ok, so I fixed the issue for 0.11.21. We actually never even tried the manual crafting of things with minimal amount less than 1.

Thx for the report.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.11.19] [kovarex] Crafting by hand with probability tag causes lockup

Post by bobingabout »

kovarex wrote:Ok, so I fixed the issue for 0.11.21. We actually never even tried the manual crafting of things with minimal amount less than 1.

Thx for the report.
And thank you for the fix! :)

As a temporary solution, I added it to the "Crafting with fluids" crafting group to force it to assembly machines only, when I get the update I'll remove the tag and try it again by hand.

Though in the next version, maybe I'll delete the recipe entirely, the only reason the unsorted gems item and gem sorting recipe exists is because of the issue with the mining drill not being able to drop all 6 types at once. If that problem is fixed, I don't need this anymore.

I'll at least test it again before I delete it though, it all helps build a stable, versitile game engine, am I right?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.19] [kovarex] Crafting by hand with probability tag causes lockup

Post by kovarex »

bobingabout wrote:
kovarex wrote:Ok, so I fixed the issue for 0.11.21. We actually never even tried the manual crafting of things with minimal amount less than 1.

Thx for the report.
And thank you for the fix! :)

As a temporary solution, I added it to the "Crafting with fluids" crafting group to force it to assembly machines only, when I get the update I'll remove the tag and try it again by hand.

Though in the next version, maybe I'll delete the recipe entirely, the only reason the unsorted gems item and gem sorting recipe exists is because of the issue with the mining drill not being able to drop all 6 types at once. If that problem is fixed, I don't need this anymore.

I'll at least test it again before I delete it though, it all helps build a stable, versitile game engine, am I right?
For sure! Once we get to steam, it will be very helpful that we fixed these hundreds of bugs, because it would just overwhelm us.

And also, we can now decide to use these features in the vanilla somehow without the fear of breaking everything :)
Post Reply

Return to “Resolved Problems and Bugs”