Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug textmesh pro texts seem to freeze iOS device

Discussion in 'UGUI & TextMesh Pro' started by zhuliyi0, Aug 3, 2023.

  1. zhuliyi0

    zhuliyi0

    Joined:
    May 12, 2022
    Posts:
    8
    The iOS app I am working on creates relatively large number of textmesh pro texts in space, and their creations are spread out in time. There are not so many texts show up at the same time so the device shows no sign of slowing down when rendering them. However, the total number of textmesh pro text that has shown up on screen during the entire app running session cannot exceed a certain amount. When that amount is reached, the iOS device (an ipad pro 4 in my case) freezes, no crash, no cpu activity, just freeze in idle.

    What I have tried to pin down the problem:
    • hide everything except textmesh pro to consistently reproduce the bug
    • abort all textmesh pro creation and run other things normally, the bug never happened;
    • reproduce multiple times with text pop onto screen in different order, to confirm the amount of text needed to reproduce the issue is not random number
    • randomly turn off some of the texts when they about to show up, and confirm this will delay the freeze by the same rate of random turn off, so again it is caused by total number of texts showed up
    • changed rendering mode of tmp font to raster, changed SDF shader to directly output red color, and no change observed, so shader is not the issue (BTW when changed to color mode for one font, unity always crashes)
    • checked profile in XCode when running on iOS, nothing suspicious
    It run normally on Windows and Macbook, bug only happen on iPad.

    I will try reproducing the bug in a simple test scene, if possible.
     
    Last edited: Aug 3, 2023
  2. zhuliyi0

    zhuliyi0

    Joined:
    May 12, 2022
    Posts:
    8
    I failed to reproduce the bug in a simple scene that has a text generator. It didn't freeze with insane amount of texts.

    Strange. No idea what to look for now. Need help please.
     
  3. zhuliyi0

    zhuliyi0

    Joined:
    May 12, 2022
    Posts:
    8
    Now this is truely a mystery: the issue is gone. I switched to another git branch and build the simple scene version, sent to iOS, failed to reproduce the bug, then switched back to the old branch, and the bug just never happen again. I am very sure the old branch was buggy right before I switch branch.

    Still no idea at all what is it, except it must be something with textmesh pro on iOS device. The change of scene and rebuilding the app must have cleaned up something on the iOS device that was causing the bug.
     
    Last edited: Aug 4, 2023