[2.0.49] Table background gets "stuck" when destroying all children at once

This subforum contains all the issues which we already resolved.
jagoly
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Dec 23, 2024 11:48 am
Contact:

[2.0.49] Table background gets "stuck" when destroying all children at once

Post by jagoly »

1. initial state.png
1. initial state.png (89.17 KiB) Viewed 811 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
2. after some rows destroyed.png (52.32 KiB) Viewed 811 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
3. after all rows destroyed.png (37.21 KiB) Viewed 811 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
4. after save and load.png (36.96 KiB) Viewed 807 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.
Last edited by jagoly on Thu May 15, 2025 4:03 pm, edited 1 time in total.
Loewchen
Global Moderator
Global Moderator
Posts: 10146
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Table background gets "stuck" when destroying all children at once

Post by Loewchen »

Post mod, save and log and add the version to the title please, see 3638.
jagoly
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Dec 23, 2024 11:48 am
Contact:

Re: Table background gets "stuck" when destroying all children at once

Post 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().
Attachments
table background bug.zip
(2.3 MiB) Downloaded 20 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 15679
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.49] Table background gets "stuck" when destroying all children at once

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”