Page 1 of 1

[0.11.11]Wrong gui style results in crash

Posted: Thu Jan 15, 2015 10:06 am
by Choumiko
When using a wrong style type for a gui element, and that element gets displayed, Factorio crashes without any message.

To reproduce:

Code: Select all

/c game.player.gui.left.add({type="label", name="crashme", caption="You will never see", style="table_style"})
or
/c game.player.gui.left.add({type="button", name="crashme", caption="You will never see", style="label_style"})
Haven't tried every combination of type and style type. Guess it's because some gui types expect a certain key (default_background/graphical_set?) in the style and cause the crash when not present? E.g. type="label" works with frame/checkbox/button style but type button crashes with label style.

Win7 64, no mods

Re: [0.11.11]Wrong gui style results in crash

Posted: Thu Jan 15, 2015 11:05 am
by kovarex
Thanks for the report, there actually is test for it, but there is error in the test. (I didn't use typeid properly).

It is now fixed for 0.11.12

P.S. The same problem was when setting style later.