[Genhis][2.0.52] Crash reading style.horizontal_spacing

This subforum contains all the issues which we already resolved.
User avatar
Kuxynator
Inserter
Inserter
Posts: 38
Joined: Wed Sep 23, 2020 5:02 pm
Contact:

[Genhis][2.0.52] Crash reading style.horizontal_spacing

Post by Kuxynator »

Accessing .style.horizontal_spacing on a table GUI element results in a hard crash (Access Violation) inside LuaStyle::luaReadHorizontalSpacing, even inside a pcall().
Writing to the property first prevents the crash.

Reproduction:

Code: Select all

script.on_event(defines.events.on_player_created, function(event)
	local player = game.players[event.player_index]
	local t = player.gui.screen.add{type="table", column_count=1}
	local _ = t.style.horizontal_spacing -- 💥 Factorio crashes here
end)
Attachments
Zwischenablage.txt
(6.26 KiB) Downloaded 55 times
Genhis
Factorio Staff
Factorio Staff
Posts: 846
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis][2.0.52] Crash reading style.horizontal_spacing

Post by Genhis »

Thanks for the report, the crash is fixed for 2.0.53.
Post Reply

Return to “Resolved Problems and Bugs”