Page 1 of 1
[2.0.49] Table background gets "stuck" when destroying all children at once
Posted: Thu May 15, 2025 1:20 pm
by jagoly

- 1. initial state.png (89.17 KiB) Viewed 1055 times
/storage/Projects/factorio/bugreports/stucktables/1. initial state.png
Here we have table with several rows. It uses odd_row_graphical_set to display an alternating background. The +Item and +Fluid buttons are not part of the table.

- 2. after some rows destroyed.png (52.32 KiB) Viewed 1055 times
/storage/Projects/factorio/bugreports/stucktables/2. after some rows destroyed.png
If we destroy some of the rows, then the background will successfully resize.

- 3. after all rows destroyed.png (37.21 KiB) Viewed 1055 times
/storage/Projects/factorio/bugreports/stucktables/3. after all rows destroyed.png
If we instead destroy all of the rows, then the background will not be updated. The table here has a height of zero according to the inspector, but the old background is still visible.

- 4. after save and load.png (36.96 KiB) Viewed 1051 times
/storage/Projects/factorio/bugreports/stucktables/4. after save and load.png
Notably, if we save and then load the game without closing the GUI, the background is drawn correctly. Maybe this is useful for figuring out where the problem is.
Re: Table background gets "stuck" when destroying all children at once
Posted: Thu May 15, 2025 2:56 pm
by Loewchen
Post mod, save and log and add the version to the title please, see
3638.
Re: Table background gets "stuck" when destroying all children at once
Posted: Thu May 15, 2025 4:03 pm
by jagoly
Add a "d" to the end of the search term (so that it reads "@fluid"). This will cause the code to destroy every cell in the table because none of them are fluids, which will reveal the bug.
I should also note that this problem occurs even when tables are cleared with LuaGuiElement.clear().
Re: [2.0.49] Table background gets "stuck" when destroying all children at once
Posted: Wed May 21, 2025 6:39 pm
by Rseding91
Thanks for the report. This is now fixed for the next release.