Maps

by Pi-C

You may find a map of the region by destroying trees and enemies. Collect maps around the world to quickly discover the area around you! But beware: if you kill a tree, you may wake up hidden enemies instead of finding a map.

Content
2 years ago
0.16 - 1.1
877

b [Fixed] Crash on entity deaths without normal causes

4 years ago

This came up from my mod
https://mods.factorio.com/mod/True-Nukes/discussion/5f974f660d7443a2dff3f64c
But applies generally, even without other mods enabled.
The mod causes a game crash when an entity is killed by anything which doesn't assign the cause normally (e.g. poison).

Replication:
Kill a tree (or other entity) with poison.

Actual failure from factorio-current.log:

101.353 Error MainLoop.cpp:1207: Exception at tick 700: The mod Maps (1.0.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Maps::on_entity_died (ID 4)
Maps/control.lua:233: attempt to index local 'cause' (a nil value)
stack traceback:
Maps/control.lua:233: in function <Maps/control.lua:214>

The failing line is a check on the force of the cause of an entity death:

local force = cause.force

to fix this:

local force
if(cause) then
force = cause.force
end

I think, although this is just a quick look at the code, which, of course, you know way way better than me... Just trying to be as helpful as possible, I tested this and it seems to work.

4 years ago

Thanks for the report! You've nailed it, the crash has been fixed in version 1.0.6. :-)

New response