[2.0.57] Consistent crash with new get_logistic_group() and accessing a detached owner

This subforum contains all the issues which we already resolved.
silverd
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Jun 22, 2025 10:15 pm
Contact:

[2.0.57] Consistent crash with new get_logistic_group() and accessing a detached owner

Post by silverd »

I am on Linux standalone, 2.0.57

Game crashes when accessing LuaLogisticSection::owner after it's detached from the player, despite "valid" returning true

Steps to reproduce:
  • Create a Logistic Section on your player character and name it "Test"
  • Now enter Editor Mode, and open the console
  • Run /sc local lg = game.forces.player.get_logistic_group("Test") if lg and lg.members[1] then local lgs = lg.members[1] if lgs and lgs.valid then game.print(lgs.owner) end end
This should crash the game
factorio-current.log
Crash log
(28.89 KiB) Downloaded 16 times
Last edited by silverd on Sun Jun 22, 2025 10:43 pm, edited 1 time in total.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4017
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.57] Consistent crash with new get_logistic_group() and accessing a detached owner

Post by boskid »

This gets slightly uncomfortable because LuaLogisticSection exposes owner which may be detached. I was thinking between making LuaLogisticSection.owner able of returning nil entity in that specific case but that could be considered a breaking change, so i decided to make get_logistic_group() to instead not include members that belong to detached character. Issue is now fixed for 2.0.58.
Post Reply

Return to “Resolved Problems and Bugs”