Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug (2023.2.x, 2023.1.x) IndexOutOfRangeException in Layout.LayoutManager.DestroyNode when changing UXML

Discussion in 'WebGL' started by KamilCSPS, Jul 25, 2023.

  1. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    372
    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.

    Note: Randomly, sometimes the following error will appear instead of the IndexOutOfRangeException. https://forum.unity.com/threads/inv...-unityengine-uielements.1391191/#post-9170996

    Note(2): Also posted in InputSystem & UIToolkit forums as I don't know which system is at fault.
    https://forum.unity.com/threads/202...node-when-changing-uxml.1465175/#post-9171143
    https://forum.unity.com/threads/202...nager-destroynode-when-changing-uxml.1465181/

    Submitted bug report with repro project in Case: IN-49088
    https://issuetracker.unity3d.com/is...utmanager-dot-destroynode-when-changing-uxmls
     

    Attached Files:

    Last edited: Aug 3, 2023
  2. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    233
    Thanks for opening that bug report, @KamilCSPS

    Do you happen to test if this occurs on native Windows builds at all?
     
  3. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    372
    I tried a windows standalone build and I can't reproduce the error. Appears to only be happening when exporting to WebGL.
     
    unityruba likes this.
  4. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    372
    So we are approaching the 2 months mark and I see that the issue is under review.

    @unityruba May I kindly ask to whom I should direct my questions (WebGL, Input, UITK) for follow-ups?

    Thank you.
     
  5. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    940
    Sorry for the delay on this @KamilCSPS.

    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. :(
     
    KamilCSPS likes this.