Search Unity

  1. We want you to join us at GDC this year! Take a peek at all of the events we will be hosting during the week of GDC.
    Dismiss Notice
  2. Tell us about your experience here and you’ll get early access to the 2018 Game Studios report + more goodies.
    Dismiss Notice
  3. Unity 2017.3 has arrived! Read about it here.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  5. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice

Unity 4.6.0b20 + Vuforia 3.0.9 + iOS = EXC_BAD_ACCESS

Discussion in 'iOS and tvOS' started by Eugenio, Oct 16, 2014.

  1. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    152
    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:
    Code (CSharp):
    1. 0xbf58ee:  blx    0x1888c8c                 ; symbol stub for: strcmp
    2. 0xbf58f2:  cmp    r0, #0x0
    3. 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:
    Code (CSharp):
    1. QCARUnityPlayer::getInstance().QCARInit([orientation UTF8String]);
    Any help will be much appreciated.

    Thank you very very much :)
     
    Last edited: Oct 16, 2014
    Jessy likes this.
  2. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    152
    This worked for me !!! :)
     
    dleight, liwei1dao and GMT like this.
  3. liwei1dao

    liwei1dao

    Joined:
    Dec 7, 2014
    Posts:
    2
    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
     
  4. liwei1dao

    liwei1dao

    Joined:
    Dec 7, 2014
    Posts:
    2
    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 "<key>UISupportedInterfaceOrientations</key>"
    <key>UIInterfaceOrientation</key>
    <string>UIInterfaceOrientationPortrait</string>

    or:

    <key>UIInterfaceOrientation</key>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>

    or:

    <key>UIInterfaceOrientation</key>
    <string>UIInterfaceOrientationLandscapeLeft</string>

    or:

    <key>UIInterfaceOrientation</key>
    <string>UIInterfaceOrientationLandscapeRight</string>



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

    Note that the array of values reported under <key>UISupportedInterfaceOrientations</key> 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 <key>UISupportedInterfaceOrientations</key> will only include a single value, i.e. <string>UIInterfaceOrientationPortrait</string>; in this case, this is the value that you should also put in the <key>UIInterfaceOrientation</key>.

    On the other hand, if you selelect Autorotation in the Unity Player Settings, then the array of values under the <key>UISupportedInterfaceOrientations</key> will include all 4 values (Portrait, PortaitUpsideDown, LandscapeLeft and LandscapeRight); in this case, the value of <key>UIInterfaceOrientation</key> 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.
     
  5. Petro19

    Petro19

    Joined:
    Jan 17, 2013
    Posts:
    3
    This works, thanks!
     
  6. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    962
    When will this next version be available?
     
    kayy likes this.
  7. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    318
    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...
     
  8. sourabhB

    sourabhB

    Joined:
    Feb 8, 2015
    Posts:
    1
    Thanks for this post, I ran into to similar issue, this worked for me!
     
  9. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    2,604
    Where did you found the information about the payment plans ?
    I like to check out the situation for the 4.0 version.
     
  10. MS80

    MS80

    Joined:
    Mar 7, 2014
    Posts:
    318
    => 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...
     

    Attached Files:

    Last edited: Feb 13, 2015
  11. bocalexandru

    bocalexandru

    Joined:
    Dec 6, 2012
    Posts:
    1
    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.
     

    Attached Files:

    Last edited: Feb 19, 2015
  12. rdvt

    rdvt

    Joined:
    Aug 23, 2014
    Posts:
    21
    I fix adding one if:


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

    ....

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

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

    rubiya

    Joined:
    Feb 15, 2016
    Posts:
    1
    please can you provide me older version of vuforia which is compatible with unity 4.6.3