Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Editor Crash/Soft lock in version 3.2.0-pre.3

Discussion in 'UGUI & TextMesh Pro' started by eudendeew, May 11, 2022.

  1. eudendeew

    eudendeew

    Joined:
    Feb 5, 2017
    Posts:
    18
    Hi, I was setting a text TMP_Text (the Unity UI component) from script and it causes an editor blocage (infinite loop?) and memory starts to fill up. On Unity 2020.3.17f1.

    Edit, more info: possibly caused by characters like (tm) and (r)

    Solved it by downgrading to version 3.2.0-pre.2 ;)

    My code looks like this:
    Code (CSharp):
    1.  
    2. // Clear Label
    3. var label = _buttonLabels[i]; // Array of TMP_Text, wo/ null refs; i comes from a loop not shown here
    4. if (label)
    5. {
    6.     label.text = "";
    7. }
    8.  
    9. // _perButtonDataFiller is a delegate
    10. if (_perButtonDataFiller != null)
    11. {
    12.     var data = new ButtonData();
    13.     _perButtonDataFiller(data, index); // index comes from a loop not shown here
    14.  
    15.     if (label && data.Label != null)
    16.     {
    17.         label.text = data.Label; // <-- HERE the bug begins, maybe bcs of clearing on ln6 ?
    18.     }
    19.  
    20.     button.onClick.AddListener(data.OnClick);
    21.     button.gameObject.SetActive(true);
    22. }
    23.  
     
    Last edited: May 11, 2022
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Any chance you can submit a bug report with project to reproduce this?

    If you do submit a bug report, please provide the case # once you have it.