Page 1 of 1

[0.16.12] Crash on placing entity

Posted: Tue Jan 09, 2018 6:24 pm
by darkfrei
Error message:
2018-01-09 19_21_03.png
2018-01-09 19_21_03.png (99.23 KiB) Viewed 1006 times
How to reproduce: just place this entity.

Log file, dump and mod with this entity:
factorio-dump_001.7z
(108.41 KiB) Downloaded 80 times
Free_Real_Estate_1.1.0.7z
(468.25 KiB) Downloaded 78 times
save_0.16_error_01.zip
(6.99 MiB) Downloaded 75 times
The error comes here: %mod_folder%\factory\factory.lua

Code: Select all

	local bb = factory.prototype.selection_box
	local entry_item_pos = {x=factory.position.x, y=factory.position.y + bb.right_bottom.y - 0.5}
	local exit_item_pos = {x=mid+1.0, y=bottom+3}

	-- players can teleport if they manage to reach an exit in another factory somehow
	-- probably not a big problem

	self.transit.enter = global.waypoints:create({
		item_surface=factory.surface,
		item_pos=entry_item_pos,
		tp_surface=surface,
		tp_pos={exit_item_pos.x, exit_item_pos.y-3},
		fresh=true,
		data=self,
	})

	self.transit.exit = global.waypoints:create({
		item_surface=surface,
		item_pos=exit_item_pos,
		tp_surface=factory.surface,
		tp_pos={entry_item_pos.x, entry_item_pos.y+1.5},
		fresh=false,
	})
<few hours of exploring>

The error comes with negative health of item on the ground.

Code: Select all

local negative_health = -100
surface.create_entity({
		name='fre_item-pickup-only', -- prototype type = "item-entity"
		position=transit.item_pos,
		force='neutral',
		stack={name='fre_factory_transit', count=1, health=negative_health},
	})

Re: [0.16.12] Crash on placing entity

Posted: Tue Jan 09, 2018 6:34 pm
by Bilka
Duplicate: 56407 ?

Re: [0.16.12] Crash on placing entity

Posted: Tue Jan 09, 2018 6:42 pm
by darkfrei
Bilka wrote:Duplicate: 56407 ?
Ohh, yes.