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 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:
    12
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    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.