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 Windows Build creates NullReferenceException in standalone player

Discussion in 'Unity Build Automation' started by airburst_studios, Apr 5, 2023.

  1. airburst_studios

    airburst_studios

    Joined:
    Jan 7, 2023
    Posts:
    35
    I am creating a windows build and tested the resulting build.
    When starting the standalone client I see the following error messages in the log:

    Code (Boo):
    1. NullReferenceException: Object reference not set to an instance of an object
    2.   at TMPro.TMP_Settings.get_defaultFontAsset () [0x00005] in <603236846f51438799f07d7500ebb307>:0
    3.   at TMPro.TextMeshProUGUI.LoadFontAsset () [0x00016] in <603236846f51438799f07d7500ebb307>:0
    4.   at TMPro.TextMeshProUGUI.Awake () [0x000a6] in <603236846f51438799f07d7500ebb307>:0
    5.  
    6. NullReferenceException: Object reference not set to an instance of an object
    7.   at TMPro.TMP_Settings.get_defaultFontAsset () [0x00005] in <603236846f51438799f07d7500ebb307>:0
    8.   at TMPro.TextMeshProUGUI.LoadFontAsset () [0x00016] in <603236846f51438799f07d7500ebb307>:0
    9.   at TMPro.TextMeshProUGUI.Awake () [0x000a6] in <603236846f51438799f07d7500ebb307>:0
    10.  
    11. NullReferenceException: Object reference not set to an instance of an object
    12.   at TMPro.TMP_Settings.get_defaultFontAsset () [0x00005] in <603236846f51438799f07d7500ebb307>:0
    13.   at TMPro.TextMeshProUGUI.LoadFontAsset () [0x00016] in <603236846f51438799f07d7500ebb307>:0
    14.   at TMPro.TextMeshProUGUI.Awake () [0x000a6] in <603236846f51438799f07d7500ebb307>:0
    All my TextMeshPro Labels are removed - the game starts but no text object labels appear anymore.

    So this only happens in the Unity Build Automation. When I build locally via Unity Editor - everything works fine.
    I am building on a MacOS if this is relevant to know here.

    Here is the Compact Log of the build: https://pastebin.com/h1L4Mk2c
     
  2. Benjamin-Gooding

    Benjamin-Gooding

    Unity Technologies

    Joined:
    Apr 12, 2022
    Posts:
    242
  3. airburst_studios

    airburst_studios

    Joined:
    Jan 7, 2023
    Posts:
    35
  4. airburst_studios

    airburst_studios

    Joined:
    Jan 7, 2023
    Posts:
    35
    @Benjamin-Gooding
    So the Build Automation created successfully a new windows build. However even tho I could locally resemble everything fine that same state (being pushed to Git) still creates the mentioned Textmesh Pro issues. What should I do?
     
  5. Benjamin-Gooding

    Benjamin-Gooding

    Unity Technologies

    Joined:
    Apr 12, 2022
    Posts:
    242
    I'd recommend opening up a support ticket so that one of our engineers can take a deep look. You can do this in the help and support section of the DevOps portion of the Unity Dashboard
     
  6. airburst_studios

    airburst_studios

    Joined:
    Jan 7, 2023
    Posts:
    35
    Fixed thanks. For some reason my gitignore excluded TextMeshPro
     
    Benjamin-Gooding likes this.