I am working on a plugin that has a menu where certain objects are listed and some information about these objects. A UIListLayout is used to display this information, and there are some buttons to sort the rows in different ways.
However, whenever I try to re-sort the rows (and thus ApplyLayout is called on the UIListLayout in the plugin CoreGui), the following error occurs and the sorting fails:
The error seems internal, it does not have any useful information for me apart from me knowing something went wrong. I can’t really tell what/if I’m doing anything wrong, though.
When I use this exact same UI in-game in PlayerGui instead (so not as a CoreGui UI, but just a regular UI menu), the UI works just fine without ever generating this error. So it seems there is a difference in behaviour between CoreGui and regular UI.
The error is generated 100% of the time when I try to use UIListLayout::ApplyLayout with the layout ordering set to Custom and with a valid sorting function provided (i.e. when I copy over the UIListLayout to a regular UI, it works as intended, just not in the CoreGui for some reason).
I can provide a repro plugin if needed, just let me know.
cc @darthskrill@Tiffblocks (because I’ve seen you address bugs about these classes before). Also, if you happen to know if this is somehow caused by me and not a bug, could you tell me if you know what I could be doing wrong?
No, that is unrelated (notice how it says “in CoreGui” in the title here meaning it is related to plugins, while you have a screenshot from the console in a live server), please post that in its own bug report with a reproduction file. Make sure to follow the format for bug reports and post it in the right category (Client Bugs).