[Rseding91] [15.18] "Error loading mods" dialog can overrun UI
Posted: Sat Jun 03, 2017 12:57 am
It's possible for a badly behaved mod to make the "Error loading mod" dialog run past the end of the screen so that the friendly "Mods to be disabled" text, and the buttons, are not visible. A user must then guess or know to hit Escape to exit, and this results in the system-styled error reporting dialog (which means user might think that Factorio crashed).
Hopefully published mods are not too likely to do this! It happened to me during mod development, but perhaps Factorio should protect against it? It's borderline because it's not an actual crash, but I thought I'd report it. Could happen if a mod dumps a lua table without realizing it's too big, or pretty prints a large block of text as an error message.
Sample code to put into a data.lua:
A more minimal (if tenuous) method:
These examples were tested on a 1440p monitor. Reproduced both in full screen and windowed (maximized).
Hopefully published mods are not too likely to do this! It happened to me during mod development, but perhaps Factorio should protect against it? It's borderline because it's not an actual crash, but I thought I'd report it. Could happen if a mod dumps a lua table without realizing it's too big, or pretty prints a large block of text as an error message.
Sample code to put into a data.lua:
Code: Select all
local result = {}
for i=0, 100 do
r = table.insert(result, 1)
end
error(serpent.block(result))
Code: Select all
error("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");