- Home /
EXC_BAD_ACCESS on iOS armv7 when using locks (il2cpp compiler)
In Unity 4.6.2, building for iOS using il2cpp compiler, on armv7 architecture (iPhone 5), I get a crash when calling lock() from thread that is not the main thread.
I get the following error:
EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=0x19c5b0b4) in OSAtomicCompareAndSwap64Barrier
il2cpp::os::Atomic::Exchange64(long long volatile*, long long)
il2cpp::os::Atomic::Exchange64(unsigned long long volatile*,unsigned long long)
MonitorData:Unacquire()
ExitMonitor(Il2CppObject*)
when calling lock()
When running on 64 bit architecture, the error does not occur.
If found a similar issue on the following forum thread: http://forum.unity3d.com/threads/4-6-ios-64-bit-beta.290551/page-6 with the following reply from someone (joncham) from unity:
FrenzooInfo said: ↑ Still problems with threading. P5 now crashes in il2cpp::eek:s::Atomic::Exchange64(...) inside OSAtomicCompareAndSwap64Barrier with EXC_BAD_ACCESS(code=EXC_ARM_DA_ALIGN) when targeting ARM7. Had to hack the bad cpp code generation in order to continue testing.
The alignment issues with monitors on ARMv7 have been fixed for a future release.
When can we expect this fix? (was not included yet in Unity 4.6.2)
I tried Patch 4.6.2p1, but I'm still having the same problem
Your answer
Follow this Question
Related Questions
I have the following error when trying to compile in Il2cpp... 2 Answers
Exported APK very slow in my mobile when having all target architectures ON 0 Answers
Undefined symbols for architecture armv7: "query_call_back(callback_func_type)", 0 Answers
[Resolved] IL2CPP Argument Out Of Range Exception When using "in" keyword 1 Answer
Win32Exception Native error= The system cannot find the file specified. 2 Answers