Closed PiggyWhiskey closed 5 years ago
I am also getting the same issue, my guess is that during Migrations the surface can possibly still exist.
Changing line 46 inside landfill.lua to the following should fix the issue:
local surface = game.get_surface("_BPEX_Temp_Surface") or game.create_surface("_BPEX_Temp_Surface")
That is, assuming you dont want to re-create the surface from scratch.
Duplicate of #10, which I am currently working on.
This code is not called during migrations.
The issue is that Landfill.compute_prototype_overrides()
can be called twice in one tick -- once from on_init
and once from on_configuration_changed
, and a deleted surface isn't actually deleted until the next tick. The function is supposed to have a guard against being called more than once, but for whatever reason the guard is not working -- so it fails the second time it is called.
@AlienXAXS, your workaround may actually work, but it's not the best fix (the code doesn't need to run twice!) so I'm working on a better one.
Also, this entire mess is only present because of the Factorio API giving bad information when I ask it for collision boxes on entities that aren't actually placed so I have to workaround it myself.
Issue has re-emerged in 0.4.4
Established Save. Added mod (Alone in the Dark) Loaded Save
I'm trying to load a test world, that has SignleColorTerrain and Creative Mod.
The loaded modpack has BP Extensions 0.4.3.
Crash as shown:![image](https://user-images.githubusercontent.com/9373995/55676895-efe17f80-591c-11e9-9625-b53a16837922.png)
Console Log as show: