Line breaking recursion max threshold hit...

Sometimes after multiple minutes of playing when game shows element with TMP- it dropes several lines of error:

Line breaking recursion max threshold hit... Character [32] index: 47
Line breaking recursion max threshold hit... Character [32] index: 42
Line breaking recursion max threshold hit... Character [1073] index: 52
Line breaking recursion max threshold hit... Character [1074] index: 47

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.

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”

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.

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.

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.

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) .

These can be edited via the Font Asset Inspector, The Ascent and Descent lines are in the Face Info.

1 Like