ReikaKalseki / Reika_FactorioMods_Issues

The issue tracker for all of my Factorio mods - EndgameCombat, NauvisDay, Geothermal, Oreverhaul, and the rest.
5 stars 1 forks source link

FactorIO crash when launching a Space Exploration ship with a sensor on it #306

Open bonesbro opened 3 years ago

bonesbro commented 3 years ago

Factorio 1.0, FactorIO 1.18.1, Space Exploration 0.4.51.

If you have a Free Inventory Slots combinator on a Space Exploration starship and launch the ship, FactorIO crashes with a Lua error a moment later. The starship switches to the new map then you get a crash error. If you are on the ship, you and the ship transfer to the new surface and fully render, then you get the crash dialog. If you are next to the ship, the ship fully disappears before it crashes.

Someone on Discord mentioned that "SE only added script-raised-destroy events to the launch sequence in the last 1.1 version. The 1.0 version only tells you when an entity is cloned to a new surface, not when the one on the old surface is deleted." That might make it an SE problem instead of yours.

It crashes 100% of the time though I've seen two different callstacks. It crashes whether or not the sensor is connected to anything via a wire.

If it is connected you usually get this callstack:

19438.133 Script @__space-exploration__/scripts/spaceship.lua:511: spaceship launch start
19438.409 Script @__space-exploration__/scripts/spaceship.lua:820: spaceship launch end
19438.565 Error MainLoop.cpp:1207: Exception at tick 61467810: The mod Factor-I/O (1.18.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event FactorIO::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    __FactorIO__/functions.lua:116: in function 'setValue'
    __FactorIO__/functions.lua:152: in function 'tickCombinator'
    __FactorIO__/control.lua:39: in function <__FactorIO__/control.lua:34>
stack traceback:
    [C]: in function '__index'
    __FactorIO__/functions.lua:116: in function 'setValue'
    __FactorIO__/functions.lua:152: in function 'tickCombinator'
    __FactorIO__/control.lua:39: in function <__FactorIO__/control.lua:34>

Sometimes you get this callstack instead, and you always get this one if the combinator is not connected:

 150.139 Script @__space-exploration__/scripts/spaceship.lua:511: spaceship launch start
 150.403 Script @__space-exploration__/scripts/spaceship.lua:820: spaceship launch end
 150.565 Error MainLoop.cpp:1207: Exception at tick 61468680: The mod Factor-I/O (1.18.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event FactorIO::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    __FactorIO__/functions.lua:66: in function 'checkEntityConnections'
    __FactorIO__/functions.lua:84: in function 'findConnection'
    __FactorIO__/functions.lua:145: in function 'tickCombinator'
    __FactorIO__/control.lua:39: in function <__FactorIO__/control.lua:34>
stack traceback:
    [C]: in function '__index'
    __FactorIO__/functions.lua:66: in function 'checkEntityConnections'
    __FactorIO__/functions.lua:84: in function 'findConnection'
    __FactorIO__/functions.lua:145: in function 'tickCombinator'
    __FactorIO__/control.lua:39: in function <__FactorIO__/control.lua:34>