Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Line breaking recursion max threshold hit...

Discussion in 'UGUI & TextMesh Pro' started by EyeDev44, Nov 6, 2020.

  1. EyeDev44

    EyeDev44

    Joined:
    Apr 8, 2017
    Posts:
    149
    Sometimes after multiple minutes of playing when game shows element with TMP- it dropes several lines of error:

    Code (CSharp):
    1. Line breaking recursion max threshold hit... Character [32] index: 47
    2. Line breaking recursion max threshold hit... Character [32] index: 42
    3. Line breaking recursion max threshold hit... Character [1073] index: 52
    4. Line breaking recursion max threshold hit... Character [1074] index: 47
    5.  
    I use Unity 2020.1.6f1 and TMP 3.0.3. The same error appeared on 3.0.1
    How to fix it? It breaks the game so I'm getting bad reviews.
     
  2. EyeDev44

    EyeDev44

    Joined:
    Apr 8, 2017
    Posts:
    149
    When I'm trying t edit the newspaper title TMP size- unity loads some GUI process for increasing time:
    "Hold On busy for +++s GUIView.RepaintAll.PlayerLoopController"
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Had a user run into this last week where it was the result of their primary font asset metrics (Ascent and Descent lines) being different than that of a fallback font asset and the use of Text Overflow Ellipsis mode.

    Are you using Ellipsis Mode?

    Assuming you are using Ellipsis mode, see the following post / thread for short term solution which is to normalize your font asset metrics which should be done regardless to make sure these various font assets and fallbacks work well with each other from a layout point of view.

    Note: I have also made changes which will be in the next release of TMP to prevent this issue from occurring when using Ellipsis mode.

    Note (2): If you are not using Ellipsis mode and the above doesn't resolve your issue then let me know and will dig deeper.
     
  4. EyeDev44

    EyeDev44

    Joined:
    Apr 8, 2017
    Posts:
    149
    Thanks for the answer!
    The ttile's overflow mode was in Ellipsis state. I've fixed the error by deleting title and copying other TMP Gamebject.
     
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What do you mean by copying other TMP GameObjects?

    In terms of the use of Ellipsis, as per my previous post and linked thread, it is likely the result in the Ellipsis character not being present in the primary font asset used by the object giving the error and the font info metric of whatever fallback that ends up being used being larger than the primary which is also explained in the linked post / thread.
     
  6. clueduppstephen

    clueduppstephen

    Joined:
    Aug 6, 2019
    Posts:
    12
    Hello. I am trying to implement the fix @Stephan_B mentions above, but I have no idea where to edit the values (Ascent and Descent Lines) .
     
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    These can be edited via the Font Asset Inspector, The Ascent and Descent lines are in the Face Info.
     
    EyeDev44 likes this.