Unity 4.6.0b20 + Vuforia 3.0.9 + iOS = EXC_BAD_ACCESS

Hi guys.
I'm having a problem: compiling my Unity app for iOS will work but if I run on my iPad I will have a EXC_BAD_ACCESS:

0xbf58ee:  blx    0x1888c8c                 ; symbol stub for: strcmp
0xbf58f2:  cmp    r0, #0x0
0xbf58f4:  beq    0xbf5926                  ; QCARUnityPlayer::QCARInit(char const*) + 106 at QCARUnityPlayer.cpp:169

I have absolutely no idea about what's wrong.

EDIT: actually I forgot to paste the objective-c function:

QCARUnityPlayer::getInstance().QCARInit([orientation UTF8String]);

Any help will be much appreciated.

Thank you very very much :)

1 Like

This worked for me !!! :-)

3 Likes

I also encountered such a problem, don't know is there any way to solve it, is to replace the Unity3d and Xcode version, or need to change the version of the Vuforia, who know, do you have or can be directly blocked this error

Unity 4.5.4 - 4.5.5 and Vuforia on iOS
September 17, 2014 - 0:02am #1

Vote up!


Vote down!

Like: 14

Unlike: 0

If you are using Unity 4.5.4, 4.5.5 and 4.6, when building and running a Vuforia-based project with iOS as target platform, from the Unity editor, you might observe a runtime crash with an error message (shown in Xcode) like the following:

EXC_BAD_ACCESS

in QCARUnityPlayer::getRotationFlag(char const*) [inlined] at ...

You can overcome this issue by:

  • editing the Info.plist file located at the root of the Xcode project that Unity automatically generates during the build process
  • add the following lines right before the line "UISupportedInterfaceOrientations"

UIInterfaceOrientation
UIInterfaceOrientationPortrait

or:

UIInterfaceOrientation
UIInterfaceOrientationPortraitUpsideDown

or:

UIInterfaceOrientation
UIInterfaceOrientationLandscapeLeft

or:

UIInterfaceOrientation
UIInterfaceOrientationLandscapeRight

The actual choice (out of the 4 possibilities listed above) to be used should be matching one of the values that appear in the under the UISupportedInterfaceOrientations.

Note that the array of values reported under UISupportedInterfaceOrientations will depend on the Player Settings that you have selected in the Unity editor; for example, if you selected Portrait in the Unity Player Settings, then the array under UISupportedInterfaceOrientations will only include a single value, i.e. UIInterfaceOrientationPortrait; in this case, this is the value that you should also put in the UIInterfaceOrientation.

On the other hand, if you selelect Autorotation in the Unity Player Settings, then the array of values under the UISupportedInterfaceOrientations will include all 4 values (Portrait, PortaitUpsideDown, LandscapeLeft and LandscapeRight); in this case, the value of UIInterfaceOrientation can be set to any of those 4.

You can then save the file, re-build and run the project from Xcode.

Note that this only occurs on Unity 4.5.4 - 4.5.5 and 4.6; if you use a previous version of Unity, up to (and including) Unity 4.5.3, the issue should not occur.

The issue affects Vuforia up to version 3.0.9.

The next version of Vuforia will not be affected by this issue.

4 Likes

This works, thanks!

When will this next version be available?

1 Like

I tried vuforia 4.0 beta which worked fine without problems so far.
You can use 3D models as marker, too. It seems vuforia 4.0 will be not for free, they have "payment plans". As you use developer plan it is for free, but have a vuforia watermark on your game. Also you need a internet connection to check the license...

Thanks for this post, I ran into to similar issue, this worked for me!


Where did you found the information about the payment plans ?
I like to check out the situation for the 4.0 version.

=> https://developer-beta.vuforia.com/target-manager
You can log in with your vuforia account

=> https://developer.vuforia.com/forum/vuforia-40-beta/prices-and-64bit-commercial-only
part of an answer on the forum: "
1. We will be releasing the pricing of Vuforia 4.0 at the end of this month - January'15
2. The pricing is per application title (an application title can have android and iOS application versions)
3. The commercial release of the native iOS Vuforia 4.0 SDK will be 64 bit compatible .Vuforia 3.0 will not be 64 bit compatible."

=> https://developer.vuforia.com/target-manager
cloud database princing

It looks like this...

1962778--127071--license_plan.jpg

[quote=“liwei1dao”, post:4, topic: 553762]
Unity 4.5.4 - 4.5.5 and Vuforia on iOS
September 17, 2014 - 0:02am #1

Vote up!


Vote down!

Like: 14

Unlike: 0

If you are using Unity 4.5.4, 4.5.5 and 4.6, when building and running a Vuforia-based project with iOS as target platform, from the Unity editor, you might observe a runtime crash with an error message (shown in Xcode) like the following:

EXC_BAD_ACCESS

in QCARUnityPlayer::getRotationFlag(char const*) [inlined] at …

You can overcome this issue by:

  • editing the Info.plist file located at the root of the Xcode project that Unity automatically generates during the build process
  • add the following lines right before the line “UISupportedInterfaceOrientations

UIInterfaceOrientation
UIInterfaceOrientationPortrait

or:

UIInterfaceOrientation
UIInterfaceOrientationPortraitUpsideDown

or:

UIInterfaceOrientation
UIInterfaceOrientationLandscapeLeft

or:

UIInterfaceOrientation
UIInterfaceOrientationLandscapeRight

The actual choice (out of the 4 possibilities listed above) to be used should be matching one of the values that appear in the under the UISupportedInterfaceOrientations.

Note that the array of values reported under UISupportedInterfaceOrientations will depend on the Player Settings that you have selected in the Unity editor; for example, if you selected Portrait in the Unity Player Settings, then the array under UISupportedInterfaceOrientations will only include a single value, i.e. UIInterfaceOrientationPortrait; in this case, this is the value that you should also put in the UIInterfaceOrientation.

On the other hand, if you selelect Autorotation in the Unity Player Settings, then the array of values under the UISupportedInterfaceOrientations will include all 4 values (Portrait, PortaitUpsideDown, LandscapeLeft and LandscapeRight); in this case, the value of UIInterfaceOrientation can be set to any of those 4.

You can then save the file, re-build and run the project from Xcode.

Note that this only occurs on Unity 4.5.4 - 4.5.5 and 4.6; if you use a previous version of Unity, up to (and including) Unity 4.5.3, the issue should not occur.

The issue affects Vuforia up to version 3.0.9.

The next version of Vuforia will not be affected by this issue.
[/quote]

in my app I dont have these values but when I try to change them it will reset the values?
Is the xcode version the problem?

Issue Resolved:

There was no problem, the xCode had changed the alias names for those keys, but if you update your .plist file with the values specified in the post I replied it will work ok.

1970386--127672--Screen Shot 2015-02-19 at 13.56.08.png

I fix adding one if:

  • (void)applicationDidBecomeActive:(UIApplication*)application{

....

NSString* orientation = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UIInterfaceOrientation"];
if(!orientation) // <-----
orientation = @""; // <-----

QCARUnityPlayer::getInstance().QCARInit([orientation UTF8String]);
QCARUnityPlayer::getInstance().QCARSetOrientation([_unityView contentOrientation]);
[self performSelector:@selector(startUnity:) withObject:application afterDelay:0];

please can you provide me older version of vuforia which is compatible with unity 4.6.3