Hello Guest

Author Topic: Xcode Crash  (Read 12163 times)

mangoocean

  • Newbie
  • *
  • Posts: 25
    • View Profile
Xcode Crash
« on: April 27, 2019, 01:40:54 am »
Hi,
I have a button when pressed opens up  (enables) a new camera/screen that contains 2d toolkit sprites and text meshes.
In the editor I get no errors on opening.
However, on Xcode I get the following hard crash:

Code: [Select]
UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32)
 
(Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

Uploading Crash Report
NullReferenceException: Object reference not set to an instance of an object.
  at tk2dTextGeomGen.GetMeshDimensionsForString (System.String str, tk2dTextGeomGen+GeomData geomData) [0x00000] in <00000000000000000000000000000000>:0
  at tk2dTextGeomGen.SetTextMeshGeom (UnityEngine.Vector3[] pos, UnityEngine.Vector2[] uv, UnityEngine.Vector2[] uv2, UnityEngine.Color32[] color, System.Int32 offset, tk2dTextGeomGen+GeomData geomData) [0x00000] in <00000000000000000000000000000000>:0
  at tk2dTextMesh.DoNotUse__CommitInternal () [0x00000] in <00000000000000000000000000000000>:0
  at tk2dUpdateManager.FlushQueuesInternal () [0x00000] in <00000000000000000000000000000000>:0
 
(Filename: currently not available on il2cpp Line: -1)

Uploading Crash Report
NullReferenceException: Object reference not set to an instance of an object.
  at tk2dTextGeomGen.GetMeshDimensionsForString (System.String str, tk2dTextGeomGen+GeomData geomData) [0x00000] in <00000000000000000000000000000000>:0
  at tk2dTextGeomGen.SetTextMeshGeom (UnityEngine.Vector3[] pos, UnityEngine.Vector2[] uv, UnityEngine.Vector2[] uv2, UnityEngine.Color32[] color, System.Int32 offset, tk2dTextGeomGen+GeomData geomData) [0x00000] in <00000000000000000000000000000000>:0
  at tk2dTextMesh.DoNotUse__CommitInternal () [0x00000] in <00000000000000000000000000000000>:0
  at tk2dUpdateManager.FlushQueuesInternal () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.UnhandledExceptionHandler:PrintException(String, Exception)
UnityEngine.UnhandledExceptionHandler:HandleUnhandledException(Object, UnhandledExceptionEventArgs)
 
(Filename: currently not available on il2cpp Line: -1)

Any ideas?

Update: Still looking for potential error on my end, but nothing. Can you confirm if this is a bug on 2d Toolkit end so i don't waste time searching through my code? Appreciate that.

Thanks
« Last Edit: April 27, 2019, 04:43:56 pm by mangoocean »

mangoocean

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Xcode Crash
« Reply #1 on: April 28, 2019, 11:12:48 pm »
Update:

So after much fiddling around, it seems that tk2d is clashing somehow with Unity's IAP system. The crash is occurring when we're getting prices for the IAP items off the apple store and displaying these prices in a tk2d text mesh. This used to work all the time without issue. I think since applying the 'quick fix beta patch' for 2d toolkit is when the issue started. <?>.

To resolve it we've had to ditch 2d toolkit text mesh from here and use a Unit text mesh which works fine.

So any news on when 2d toolkit will become completely compatible with Unity 2018? It's been a long time now.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Xcode Crash
« Reply #2 on: April 30, 2019, 08:51:54 am »
This sounds like yet another Unity issue - 2D Toolkit just creates meshes and uses them. In this case it looks like its being used before it is created... How does the IAP text thing update the text? It might happen too soon (on iOS alone)

mangoocean

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Xcode Crash
« Reply #3 on: May 03, 2019, 01:08:51 am »
This sounds like yet another Unity issue - 2D Toolkit just creates meshes and uses them. In this case it looks like its being used before it is created... How does the IAP text thing update the text? It might happen too soon (on iOS alone)

That's a point. I'll do a test now where I delay the IAP update and see if that works.