EXC_BAD_ACCESS in Unity4?

Installed Unity 4 today (from 3.5.6) and the project now crashes with EXC_BAD_ACCESS in
libsystem_c.dylib`memset$VARIANT$CortexA9:

I tried the usual NSZombieEnabled but no luck.
Any ideas ?

Please post whole stack trace.

So just noticed there is a long, long list of growTiles, I wonder if the iPad simply ran out of memory ?
(the project runs on the desktop though)

And the same project definitely works in 3.5.6, so something must have changed ?
Fortunately its easy to reproduce, just download the project with git, then try to run it.

git clone GitHub - jondewoo/UnitySlippyMap: A slippy map implementation written in C# for Unity3D

Incident Identifier: FC7D9417-3E4C-41D7-8542-8B8009B11BC5
CrashReporter Key: c65f0d20caecef8030b964f30b8645d1283f8b9d
Hardware Model: iPad2,2
Process: SlippyMap [6207]
Path: /var/mobile/Applications/9C9EFD9E-1FD5-40E7-AF47-B1BDAB27CA9E/SlippyMap.app/SlippyMap
Identifier: SlippyMap
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]

Date/Time: 2012-11-19 08:10:25.046 -0800
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x2fd00f58
Crashed Thread: 0

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_c.dylib 0x34dfe818 memset$VARIANT$CortexA9 + 0
1 SlippyMap 0x0123310c GC_clear_stack_inner + 36
2 SlippyMap 0x01233120 GC_clear_stack_inner + 56
3 SlippyMap 0x01233120 GC_clear_stack_inner + 56
4 SlippyMap 0x01233120 GC_clear_stack_inner + 56
5 SlippyMap 0x01233120 GC_clear_stack_inner + 56
6 SlippyMap 0x01233120 GC_clear_stack_inner + 56
7 SlippyMap 0x01233120 GC_clear_stack_inner + 56
8 SlippyMap 0x01233120 GC_clear_stack_inner + 56
9 SlippyMap 0x01233120 GC_clear_stack_inner + 56
10 SlippyMap 0x01233120 GC_clear_stack_inner + 56
11 SlippyMap 0x01233194 GC_clear_stack + 84
12 SlippyMap 0x0122e88c GC_gcj_malloc + 144
13 SlippyMap 0x011c9958 mono_object_new_fast + 16
14 SlippyMap 0x00a24f14 m_wrapper_managed_to_native_object___icall_wrapper_mono_object_new_fast_intptr + 56
15 SlippyMap 0x00737668 m_string_Format_System_IFormatProvider_string_object__ + 48
16 SlippyMap 0x007375e0 m_string_Format_string_object_object_object + 140
17 SlippyMap 0x00019c58 m_TileLayer_GrowTiles_UnityEngine_Plane___int_int_int_int_single_single + 1664
18 SlippyMap 0x00019ddc m_TileLayer_GrowTiles_UnityEngine_Plane___int_int_int_int_single_single + 2052
19 SlippyMap 0x00019ddc m_TileLayer_GrowTiles_UnityEngine_Plane___int_int_int_int_single_single + 2052
20 SlippyMap 0x00019ddc m_TileLayer_GrowTiles_UnityEngine_Plane___int_int_int_int_single_single + 2052
21 SlippyMap 0x00019ddc m_TileLayer_GrowTiles_UnityEngine_Plane___int_int_int_int_single_single + 2052
22 SlippyMap 0x00019ddc m_TileLayer_GrowTiles_UnityEngine_Plane___int_int_int_int_single_single + 2052
… repeated 500 lines!

Thanks, we will look into this.

Same crash happens also on 3.5.6. It is caused by infinite recursion in TileLayer.cs, GrowTiles function.

Hi,

About UnitySlippyMap, I wasn’t able to reproduce the bug on Unity 3.5.6f4. But with Unity 4 iOS, there seems to be a GPS issue describe (and solved) here: http://forum.unity3d.com/threads/159257-Unity-4.0-iOS-GPS-Fix
Anyway, I think the infinite recursion what caused by bogus GPS coordinates, I’ll try to put a safeguard asap.

Cheers!