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.

Bug Using TMP with unity 2020.2.2f1 causes builds to crash

Discussion in 'UGUI & TextMesh Pro' started by GamesbyJP, Feb 19, 2021.

  1. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    55
    Hello everyone,

    I stumbled upon an issue where suddenly all of my attempted builds would crash immediately on start.
    After some troubleshooting, I found that this is caused by textMeshPro.

    As soon as I remove the TMP text on all of my buttons, the builds stop crashing. This is specifically the case for TMP because using the regular unity text component doesn't cause any issues. I can confirm this happens with both TMP 3.0.1 and TMP 3.0.4. I didn't try other versions so far.

    Any help or ideas towards a solution would be useful, because I'm limited on time for this current project.

    Thanks in advance.
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    What platform are you building?

    Do you still get the crash with a simple scene with just a TMP Button in the scene? Just trying to figure out how to reproduce the issue.

    Using Package Manager, do you see the com.unity.textcore package installed?
     
  3. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    55
    Thank you for the quick reply.

    I am building for PC Standalone, Windows 64 Bit.

    Yes, I do get the crash when I build just one scene with only a canvas, a TMP text, and an EventSystem.
    Everything in the scene is default, except for the EventSystem, which I updated to be compatible with the new input system.

    I don't see the com.unity.textcore package installed in the unity package manager, no.
    Edit: The closest to 'textcore' are the 'com.unity.textmeshpro' lines in the packages-lock.json and manifest.json files in my packages folder.
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Can you please submit a bug report with the project with that simple scene?

    Please provide me with the Case # once you get it via email from Unity. As soon as you provide that I'll go grab the project to look at it and to figure out what is going on.

    Also, could you please post the content of your "manifest.json" file which is found in the "Packages/..." folder at the root of your project.
     
  5. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    55
    Case 1316133.

    I included the manifest.json file for you as a file in the report, but if that's not enough, feel free to let me know if I can provide anything else.
     
  6. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Thank you for submitting the bug report and providing the project.

    I just had a chance to look at it and the issue seems to be assembly related where if I remove the "Jacky's Simple Audio Manager" which happens to include a precompiled assembly, I am able to build and run the TMPTest scene. I do not necessarily think the issue is specific to this asset but to the inclusion of this dll.

    I will provide this information to our scripting team for them to take a closer look at.
     
    Last edited: Feb 20, 2021
  7. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    I decided to shorten the name of the folder for this plugin and changed it to "JSAM". I then used the context menu re-import on this folder to force a re-import of the asset.

    Subsequently to this I was able to build the TMPTest scene as well as your MainMenu scene as seen below

    upload_2021-2-20_0-57-51.png

    So there is definitely an issue which the scripting team needs to take a look at but this is not an issue specific to TMP.

    I will update the case with this information.
     
    GamesbyJP likes this.
  8. GamesbyJP

    GamesbyJP

    Joined:
    May 20, 2018
    Posts:
    55
    Thank you!
    After renaming the folder to JSAM and re-importing the folder, my builds run again.
    It strikes me as odd how this is only an issue when both the audio manager and TextMeshPro are included in the project.. It might be that some TMP code is unable to be compiled for build because of the errors thrown by the assembly in the audio manager? Fascinating stuff. Anyway, again, thank you!
     
  9. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    I believe this is potential an assembly linking issue where the longer name causes incorrect linking. I think TMP just happens to be an innocent by stander in all of this.

    I have seen similar issues affecting UGUI in projects with user assemblies (.asmdef) where in that case it was the name of those assemblies which affected their sorting and linking sequence that was causing issues.