[wheybags] [0.17.34] Map Editor + NPE: soft crash "level::on_player_changed_position(ID81)"

Things that we don't consider worth fixing at this moment.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3290
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

[wheybags] [0.17.34] Map Editor + NPE: soft crash "level::on_player_changed_position(ID81)"

Post by boskid »

Steps to reproduce:
- run factorio
- "map editor"
- "load scenario"
- "Introduction/level-01"
- "Load"
- after loading, press arrow left (for example)

Result:

Code: Select all

Error while running event level::on_player_changed_position (ID 81)
__base__/lualib/player_tracker.lua:6: attempt to index field 'behaviors' (a nil value)
stack traceback:
	__base__/lualib/player_tracker.lua:6: in function 'log_behavior'
	__base__/lualib/player_tracker.lua:175: in function '?'
	__base__/lualib/event_handler.lua:7: in function <__base__/lualib/event_handler.lua:4>

Feels like minor issue, almost like "wont fix". Not posting in "Campaign / Scenario issues" as it feels like issue of map editor (executing scripts when not expecting scripts to run in map editor). If it is more like issue of scripting, feel free to move to "Campaign / Scenario issues"

-- edit:

Ref? 58702

Also by choosing time control and unpausing, there will be other soft crash:

Code: Select all

Error while running event level::on_tick (ID 0)
__base__/lualib/popup.lua:108: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
	[C]: in function 'pairs'
	__base__/lualib/popup.lua:108: in function '?'
	__base__/lualib/event_handler.lua:7: in function <__base__/lualib/event_handler.lua:4>
-- edit:

Other possible crashes:
- by building

Code: Select all

Error while running event level::on_built_entity (ID 6)
__base__/lualib/player_tracker.lua:6: attempt to index field 'behaviors' (a nil value)
stack traceback:
	__base__/lualib/player_tracker.lua:6: in function 'log_behavior'
	__base__/lualib/player_tracker.lua:245: in function '?'
	__base__/lualib/event_handler.lua:7: in function <__base__/lualib/event_handler.lua:4>
- by destroying (after switching to "template" layer)

Code: Select all

Error while running event level::on_player_mined_entity (ID 65)
__base__/lualib/player_tracker.lua:6: attempt to index field 'behaviors' (a nil value)
stack traceback:
	__base__/lualib/player_tracker.lua:6: in function 'log_behavior'
	__base__/lualib/player_tracker.lua:227: in function '?'
	__base__/lualib/event_handler.lua:7: in function <__base__/lualib/event_handler.lua:4>
Attachments
factorio-current.log
(7.68 KiB) Downloaded 71 times
Last edited by boskid on Wed May 01, 2019 2:13 pm, edited 1 time in total.
User avatar
wheybags
Former Staff
Former Staff
Posts: 328
Joined: Fri Jun 02, 2017 1:50 pm
Contact:

Re: [wheybags] [0.17.34] Map Editor + NPE: soft crash "level::on_player_changed_position(ID81)"

Post by wheybags »

Yes, the scenario lua runs in the editor, and the code is not written to be safe in the editor, as that would be too much work.
If you want to edit the map, you can copy the blueprint.zip out and back in (that's what we do :p)
Post Reply

Return to “Won't fix.”