0.14.21 Sprite GUIElement errors are fatal during early init

This subforum contains all the issues which we already resolved.
User avatar
zx64
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Fri Dec 16, 2016 3:57 pm
Contact:

0.14.21 Sprite GUIElement errors are fatal during early init

Post by zx64 »

Version tested: 0.14.21

Summary:

Unknown sprite path errors from the Sprite GUIElement when created during the on_player_created event are reported with an OS message box followed by exiting the entire game.

Image

Expected:

It would be preferable if that error was reported like other early init errors - an in-game dialog with a stack trace.

Steps to repro:

Easiest repro I've found is with this control.lua in a scenario:

Code: Select all

script.on_event(defines.events.on_player_created, function(event)
    local player = game.players[event.player_index]
    player.gui.top.add {type="sprite", name="l", sprite="item/nope"}
end)
For convenience here's a downloadable version with a tiny blueprint.dat.

Note that if you do this at runtime via

Code: Select all

/c game.player.gui.top.add {type="sprite", name="l", sprite="item/nope"}
then the error is caught and logged to the console like other runtime errors.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16000
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: 0.14.21 Sprite GUIElement errors are fatal during early init

Post by Rseding91 »

Fixed for 0.15.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”