TMPro error messages specific to mobile.

I’m kind of at a loss as to what is happening to my Android build of my game. I have pasted to log at the end of this post.

Basically it works fine on my editor view but when I build to my mobile the game plays but doesn’t really work because of one of these errors.
I am using PUN as well for multiplayer but there are a lot of Text Mesh Pro errors I would like to get rid of too.
Not sure why this all of a sudden happened.
Any advice would be helpful.

<i>Autoconnected Player</i> NullReferenceException: Object reference not set to an instance of an object.
  at Photon.Pun.PhotonNetwork.set_NickName (System.String value) [0x00000] in <00000000000000000000000000000000>:0



<i>Autoconnected Player</i> Uploading Crash Report


<i>Autoconnected Player</i> NullReferenceException: Object reference not set to an instance of an object.
  at TMPro.TMP_Text.GetStyle (System.Int32 hashCode) [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.get_textStyle () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.PopulateTextProcessingArray () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.ParseInputText () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TextMeshProUGUI.OnPreRenderCanvas () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.Canvas+WillRenderCanvases.Invoke () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.UI.CanvasUpdateRegistry:PerformUpdate()
UnityEngine.WillRenderCanvases:Invoke()



<i>Autoconnected Player</i> NullReferenceException: Object reference not set to an instance of an object.
  at TMPro.TMP_Text.GetStyle (System.Int32 hashCode) [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.get_textStyle () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.PopulateTextProcessingArray () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.ParseInputText () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TextMeshProUGUI.OnPreRenderCanvas () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.Canvas+WillRenderCanvases.Invoke () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.UI.CanvasUpdateRegistry:PerformUpdate()
UnityEngine.WillRenderCanvases:Invoke()



<i>Autoconnected Player</i> NullReferenceException: Object reference not set to an instance of an object.
  at TMPro.TMP_Text.GetStyle (System.Int32 hashCode) [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.get_textStyle () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.PopulateTextProcessingArray () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TMP_Text.ParseInputText () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TextMeshProUGUI.OnPreRenderCanvas () [0x00000] in <00000000000000000000000000000000>:0
  at TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.Canvas+WillRenderCanvases.Invoke () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.UI.CanvasUpdateRegistry:PerformUpdate()
UnityEngine.WillRenderCanvases:Invoke()



Missing Profiler.EndSample (BeginSample and EndSample count must match): TMP Parse Text
Previous 5 samples:
    GC.Alloc
    CopyChannels
    Font.CacheFontForText
    GC.Alloc
    Font.CacheFontForText
In the scope:
    TMP Parse Text
    CanvasUpdate.PreRender
    Render
    UnityEngine.UIModule.dll!UnityEngine::Canvas.SendWillRenderCanvases()
    UGUI.Rendering.UpdateBatches

Missing Profiler.EndSample (BeginSample and EndSample count must match): TMP Parse Text
Previous 5 samples:
    GC.Alloc
    CopyChannels
    Font.CacheFontForText
    GC.Alloc
    Font.CacheFontForText
In the scope:
    TMP Parse Text
    CanvasUpdate.PreRender
    Render
    UnityEngine.UIModule.dll!UnityEngine::Canvas.SendWillRenderCanvases()
    UGUI.Rendering.UpdateBatches

Missing Profiler.EndSample (BeginSample and EndSample count must match): TMP Parse Text
Previous 5 samples:
    GC.Alloc
    CopyChannels
    Font.CacheFontForText
    GC.Alloc
    Font.CacheFontForText
In the scope:
    TMP Parse Text
    CanvasUpdate.PreRender
    Render
    UnityEngine.UIModule.dll!UnityEngine::Canvas.SendWillRenderCanvases()
    UGUI.Rendering.UpdateBatches

<i>Autoconnected Player</i> Can't connect: Loading settings failed. ServerSettings asset must be in any 'Resources' folder as: PhotonServerSettings
Photon.Pun.PhotonNetwork:ConnectUsingSettings()
Com.Momas.NewRacer.NetworkManager:Connect()
UnityEngine.Events.UnityAction:Invoke()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.EventSystems.EventFunction`1:Invoke(T1, BaseEventData)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()

Fixed:
Turn off Split Application Binary in Publishing Settings.

Thanks for coming back to post your solution… that’s how we all benefit!!

In any case, this is almost certainly just a bog-standard boring old nullref, nothing new here. :slight_smile:

How to fix a NullReferenceException error

https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

Three steps to success:

  • Identify what is null
  • Identify why it is null
  • Fix that