[2.0.76] Crash creating loader with stack size override via console

Bugs which we just recently fixed in our development version and will reach you in the next release.
tetlanesh
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 16, 2024 8:18 pm
Contact:

[2.0.76] Crash creating loader with stack size override via console

Post by tetlanesh »

when running via console create_entity to make a loader (from loaders-modernized mod) that have a stack size override enabled and passing a stack size override value the game crashes. Creating that loader without that parameter works fine and setting that parameter on live entity works fine.

Factorio version: experimental 2.0.76

List of mods:
04-06-2026, 15-46-32.png
04-06-2026, 15-46-32.png (12.79 KiB) Viewed 196 times
Repro:
1. Load save
2. Run this command in console:

Code: Select all

/c
local p = game.player
local s = p.surface
local pos = p.position
s.create_entity{name="mdrn-loader", position={pos.x+2, pos.y}, direction=defines.direction.north, force=p.force, type="output", belt_stack_size_override=1}
3. ...
4. Profit?

Save, dump and log attached

Attached save is small test world via editor extensions testing scenario with just the mods that i think are linked to the crash
Attachments
factorio-current.log
(14.34 KiB) Downloaded 9 times
factorio-dump-current.dmp
(939.91 KiB) Downloaded 5 times
TEST CRASH EDITO WORLD.zip
(12.12 MiB) Downloaded 5 times
User avatar
Quezler
Filter Inserter
Filter Inserter
Posts: 324
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: Crash when creating Loader-Modernised loader with stack size override via console

Post by Quezler »

Hi, talked with OP on the Space Exploration / Earendel discord about this issue, was already working on narrowing it down so here are my two cents:

space-age
+

Code: Select all

data.raw["loader-1x1"]["loader-1x1"].max_belt_stack_size = 4
data.raw["loader-1x1"]["loader-1x1"].adjustable_belt_stack_size = true
+

Code: Select all

/c game.player.surface.create_entity{name="loader-1x1", position={0, 0}, force="player", belt_stack_size_override=1}
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4441
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.76] Crash creating loader with stack size override via console

Post by boskid »

Thanks for the report. Issue is now fixed for the next release.

As a workaround, in game versions up to 2.0.76, do not pass `belt_stack_size_override` to create_entity, but instead set it in a separate instruction after loader was created using https://lua-api.factorio.com/2.0.76/cla ... e_override
tetlanesh
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu May 16, 2024 8:18 pm
Contact:

Re: [2.0.76] Crash creating loader with stack size override via console

Post by tetlanesh »

Awesome, thanks
Post Reply

Return to “Resolved for the next release”