Topic locked

EXC_BAD_ACCESS with ipa after disabling QCARWrapper.bundle

June 11, 2015 - 1:03pm #1

I had trouble with code signing errors in Xcode when tried to build a Unity 5 generated iOS project for ad hoc deployment. I used the steps described QCARWrapper.bundle codesign failed XCode and could build my ipa.

The problem:

Now the app crashes immediately after launching. The very first time I saw the camera permission popup and checked Yes, then it creashed. The permission to use the camera is registerd correctly in system settings. Now whenever I start the app it stops immediately.

Strange enough there is no problem at all when I run the app directly from Xcode - everything works as designed.

The crash log:

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: EXC_ARM_DA_ALIGN at 0x0752af66
Triggered by Thread:  0

Thread 0 name:  Dispatch queue:
Thread 0 Crashed:
0   tesla                         	0x001a5afa QCARManagerImpl_Update_m5746 (Bulk_Qualcomm.Vuforia.UnityExtensions_0.cpp:19073)
1   tesla                         	0x001d4af0 QCARAbstractBehaviour_Update_m6891 (Bulk_Qualcomm.Vuforia.UnityExtensions_1.cpp:35693)
2   tesla                         	0x003b7960 RuntimeInvoker_Void_t8(MethodInfo const*, void*, void**) (GeneratedInvokers.cpp:12)
3   tesla                         	0x00d1e11e il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppObject**) (Runtime.cpp:295)
4   tesla                         	0x00661f38 ScriptingInvocationNoArgs::Invoke(ScriptingException**) (ScriptingInvocationNoArgs.cpp:99)
5   tesla                         	0x00661ef8 ScriptingInvocationNoArgs::Invoke() (ScriptingInvocationNoArgs.cpp:83)
6   tesla                         	0x0065c3d0 MonoBehaviour::CallUpdateMethod(int) (MonoBehaviour.cpp:607)
7   tesla                         	0x005902b2 void BaseBehaviourManager::CommonUpdate<BehaviourManager>() (Behaviour.cpp:163)
8   tesla                         	0x0061c2f4 PlayerLoop(bool, bool, IHookEvent*) (Player.cpp:1887)
9   tesla                         	0x0046c7ea UnityPlayerLoopImpl(bool) (
10  tesla                         	0x0001f448 UnityRepaint (
11  tesla                         	0x0001f324 __51-[UnityAppController(Rendering) repaintDisplayLink]_block_invoke (
12  libdispatch.dylib             	0x371b12e0 _dispatch_call_block_and_release + 8
13  libdispatch.dylib             	0x371b12cc _dispatch_client_callout + 20
14  libdispatch.dylib             	0x371b4d2a _dispatch_main_queue_callback_4CF + 1326
15  CoreFoundation                	0x28d76614 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 4
16  CoreFoundation                	0x28d74d14 __CFRunLoopRun + 1508
17  CoreFoundation                	0x28cc23ac CFRunLoopRunSpecific + 472
18  CoreFoundation                	0x28cc21be CFRunLoopRunInMode + 102
19  GraphicsServices              	0x302ef1fc GSEventRunModal + 132
20  UIKit                         	0x2c32c438 UIApplicationMain + 1436
21  tesla                         	0x0001850a main (
22  libdyld.dylib                 	0x371d2aac start + 0

My environment:

  • Unity 5.0.3 with Vuforia 4.3.2, QCARWrapper.bundle set to Editor and Standalone
  • Xcode 6.3.2
  • iPhone 5 with iOS 8.2

I had to enable Background Modes / Remote Notifications in my Xcode project in order to provide push notifications. But I removed all other native code and used Replace when building the project in Unity.

Is there anyone out there having the same problem (and a solution :-) ? Thanks!


EXC_BAD_ACCESS with ipa after disabling QCARWrapper.bundle

June 17, 2015 - 5:23am #3

Yes it works :) Thank you very much!

I did not try it with my iPad Air, but on my 32 bit iPhone 5 the crash disappeared. So I can confirm thatUnity 5.0.3 still has the problem if the Xcode project is taken out of the box (like Unity 4 before 4.6.6p1). Changing the optimisation level for release builds to 'None' in Xcode solves the problem.

I did not yet update to 5.1 because of the uGUI problem Vuforia 4.2 + Unity 5.0.1 UI issue (patch 1 was not available when I start migrating).

EXC_BAD_ACCESS with ipa after disabling QCARWrapper.bundle

June 16, 2015 - 7:38pm #2

You said it works okay if building from Xcode? In Xcode settings , you might try changing Optimization Level -> Release to "None [-O0]" and see if that works. Looks like both of your devices are 32-bit. Have you tried on a 64-bit device? Also, the minimum iPhone model supported by Vuforia 4.x is the iPhone 4S.

See this thread where user also received same error: EXC_ARM_DA_ALIGN


Topic locked