[0.11.1][kovarex] game.oninit() gui style crash

This subforum contains all the issues which we already resolved.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

[0.11.1][kovarex] game.oninit() gui style crash

Post by DaveMcW »

This control.lua works in 0.10.12, but crashes in 0.11.1.

Code: Select all

require "defines"

game.oninit(function()
	game.player.gui["top"].add{type="frame", name="myframe", caption="test"}

	--Both these commands crash the game
	game.player.gui["top"].myframe.style.leftpadding = 20
	game.player.gui["top"].myframe.style.font = "default-bold"
end)
Styling the gui with console commands still works somehow. :?

Code: Select all

/c game.player.gui["top"].myframe.style.leftpadding = 20
/c game.player.gui["top"].myframe.style.font = "default-bold"
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.1][kovarex] game.oninit() gui style crash

Post by kovarex »

Thank you for the report, the problem was, that the gameView and the physical gui didn't exist at this time, and the code tried to update the buttons as well, not only the internal representaiton of the gui.

This bug would also crash then game if you tried this command in multiplayer, so it is really good that you found it :)

It is now fixed for 0.11.2 (and tested in our automated tests).
Post Reply

Return to “Resolved Problems and Bugs”