Only in the player, no error in editor. Switching multiple times between UXMLs within a UIDocument via UIButtons will result in a IndexOutOfRangeException generated from the InputSystem.
Repeat between x3 / x10 times to generate error (appears random, clicking speed has no incidence). Application will become unresponsible afterwards. Reproduced 100% of times.
Reproduced in 2023.2.x, 2023.1.x. Could not reproduce in 2022.x (2022.2.19 &+ LTS).
Using Chrome Version 114.0.5735.199 (Official Build) (64-bit), Windows 10 Pro Version 10.0.19045 Build 19045.
We had discussed this very issue with Ruba in a call just yesterday. The ticket went first through our incoming QA, and then since the issue was in “generic” UI code and seemingly not in our Web platform “low level” library code, we had requested a bisection to it to find the cause - which came back to a change that relates to code around UI element cleanup. So there has been active investigation going into it, but understandably not very active looking since none of that shows up on that issuetracker web site.
We don’t have a completely clear understanding yet of what is causing this specifically to happen for the Web platform, but we are looking into it. I hope you’ll bear with us a bit more on this.
Just as an FYI - Tested again in 2023.3.0a11 and it’s still happening. Really hoping to migrate our projects to the 2023.x branch when possible as there’s a lot of features we hope to leverage but this issue is a blocker.
I’m sorry this took so long, but the issue turned out more complicated than we expected. There’s a team working on this that has 2 different code changes that hope will solve the problem. I will keep you updated once they test them out. I’ll also try out their fixes myself in the next couple of days.
so the issue came down to the use of nestedFinalizers, each of which made calls resizing a Stack backed by an Array, so there were calls to Array.Resize().
Array.Resize() is unaware/non-re-entrant, it does not know that while executing an Array.Resize() that mallocs, that the code might wind back in to again Array.Resize() the very same Array. This led to the Stack being in a bad state, which caused the error.