Support Forum

(Beta) Bug - Crash on iOS on beta 4.3.20+

Just as title said. The build is fine til version 4.3.19.
From 4.3.20, 4.3.21, 4.3.22, it crashes on iOS build 100% of the time.
Something related to RVO Simulator. Since disabled RVO Simulator and everything worked fine.

Downgrade to 4.3.19 and everything works fine.

Hi

Do you get any stack traces or errors of any kind?
There were no changes to the local avoidance system between 4.3.19 and 4.3.20.

Sorry, by the time I was sure ver 4.3.19 worked and 4.3.20+ did not, I’d already downgraded to 4.3.19 and forgot to screenshot anything. The only way to do that is upgrade them again which is too much for me currently. ^^~
However the error is 100% so I’m sure you can test it. Just build any iOS version and it will crash at first scene with RVO update() calling.
Also since I’m a noob, there’s possibility that it’s not RVO but still the version problem.
In case you still don’t find the problem, tell me and I’ll try to do it again with another test project.

Hi

Alas, I do not have access to an iOS device, or a mac computer to build an iOS build on. So it is very hard for me to debug this.
It would be very helpful for me if you could try again and try to catch the stack trace. If you do, please test on 4.3.22 as it contains some fixes for bugs that definitely could cause crashes in earlier versions.

Ok, I’ll try to do it tomorrow when I have time. Will update here.

Created an empty project.
Unity 2019.3.11
Astar 4.3.22
iOS development build
Run Example Demo for RVO 2D
The game did not crash like my project but it’s showing the same error in xcode (which crashed my game) as below:

Setting up 1 worker threads for Enlighten.

Thread -> id: 16f043000 -> priority: 1

ArgumentException: Object contains non-primitive or non-blittable data.

at System.Runtime.InteropServices.GCHandle.GetTargetHandle (System.Object obj, System.Int32 handle, System.Runtime.InteropServices.GCHandleType type) [0x00000] in <00000000000000000000000000000000>:0

at System.Runtime.InteropServices.FieldOffsetAttribute…ctor (System.Int32 offset) [0x00000] in <00000000000000000000000000000000>:0

at System.Runtime.InteropServices.GCHandle.Alloc (System.Object value, System.Runtime.InteropServices.GCHandleType type) [0x00000] in <00000000000000000000000000000000>:0

at Unity.Collections.NativeArray1[T].Copy (T[] src, System.Int32 srcIndex, Unity.Collections.NativeArray1[T] dst, System.Int32 dstIndex, System.Int32 length) [0x00000] in <00000000000000000000000000000000>:0

at Unity.Collections.NativeArray1[T].Copy (T[] src, Unity.Collections.NativeArray1[T] dst) [0x00000] in <00000000000000000000000000000000>:0

at Unity.Collections.NativeArray1[T].Copy (Unity.Collections.NativeArray1[T] src, System.Int32 srcIndex, T[] dst, System.Int32 dstIndex, System.Int32 length) [0x00000] in <00000000000000000000000000000000>:0

at Drawing.Text.DefaultFonts.LoadDefaultFont () [0x00000] in <00000000000000000000000000000000>:0

at Drawing.DrawingData.LoadFontDataIfNecessary () [0x00000] in <00000000000000000000000000000000>:0

at Pathfinding.Voxels.Voxelize.union_find_union (System.Int32[] arr, System.Int32 a, System.Int32 b) [0x00000] in <00000000000000000000000000000000>:0

at Drawing.DrawingData.GetBuiltInBuilder (System.Boolean renderInGame) [0x00000] in <00000000000000000000000000000000>:0

at Drawing.DrawingManager.OnEnable () [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.GameObject.Internal_AddComponentWithType (System.Type componentType) [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.GameObject.AddComponent (System.Type componentType) [0x00000] in <00000000000000000000000000000000>:0

at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <00000000000000000000000000000000>:0

at Drawing.DrawingManager.Init () [0x00000] in <00000000000000000000000000000000>:0

at Drawing.DrawingManager.get_instance () [0x00000] in <00000000000000000000000000000000>:0

at Drawing.DrawingManager.GetBuilder (System.Boolean renderInGame) [0x00000] in <00000000000000000000000000000000>:0

at Pathfinding.RVO.SimulatorBurst.UpdateInternal[T] () [0x00000] in <00000000000000000000000000000000>:0

at Pathfinding.RVO.SimulatorBurst.Update () [0x00000] in <00000000000000000000000000000000>:0

at Pathfinding.RVO.RVOSimulator.Update () [0x00000] in <00000000000000000000000000000000>:0

UnityEngine.GameObject:Internal_AddComponentWithType(Type)

UnityEngine.GameObject:AddComponent(Type)

UnityEngine.GameObject:AddComponent()

Drawing.DrawingManager:Init()

Drawing.DrawingManager:get_instance()

Drawing.DrawingManager:GetBuilder(Boolean)

Pathfinding.RVO.SimulatorBurst:UpdateInternal()

Pathfinding.RVO.SimulatorBurst:Update()

Pathfinding.RVO.RVOSimulator:Update()

(Filename: currently not available on il2cpp Line: -1)

any followups on this issue?

Interesting. According to the documentation for GCHandle.Alloc the char is indeed not blittable and I think it is trying to copy that type. It’s weird that it does not crash unless you do an iOS build, according to the docs it should throw an exception even in the editor.

I have uploaded a new beta version (4.3.23) which I think fixes this issue.
Let me know if it works!

Version 4.3.23 works.
Also FYI my project is using Incremental GC.
Thanks for your support. Have a nice day.