Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Major Issue with Unity and XCode 3.1.2 [SOLVED]

Discussion in 'iOS and tvOS' started by Crazy Robot, Nov 7, 2009.

  1. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    I added a few scripts to the assets folder and I get a Build Error in xCode with it's "Linking":

    ld: ldr 12-bit displacement out of range (6040 max +/-4096) in _AudioQueueAddPropertyListener$stub in _AudioQueueAddPropertyListener$stub from /Users/jean/iPhone App Projects/Time Line/build/Timeline.app/Timeline
    collect2: ld returned 1 exit status
    ld: ldr 12-bit displacement out of range (6040 max +/-4096) in _AudioQueueAddPropertyListener$stub in _AudioQueueAddPropertyListener$stub from /Users/jean/iPhone App Projects/Time Line/build/Timeline.app/Timeline

    Here is the script:

    Code (csharp):
    1. var kioskkey : KioskKey;
    2. var ActionIcon : GameObject;
    3.  
    4. function onGUIDown () {
    5.     audio.Play();
    6.     kioskkey.ActionUnlock();
    7.     ActionIcon.gameObject.SetActiveRecursively(false);
    8. }
    The line in "kioskkey.ActionUnlock();" is causing the issue, am using this kind of call in other parts of my game with no issues. The "KioskKey" Script had the "ActionUnlock" function in and. Unity is not giving me any errors. Only in xCode. This makes no sense at all.

    I did nothing, I did not update any software, I didn't change any settings. I just added this script (one like a hundred other scripts) and it gives me this error.
     
  2. lesguerra

    lesguerra

    Joined:
    Apr 20, 2009
    Posts:
    24
    me too, when i'm enabling profiler in xcode

    xcode 3.1.4
    iphone os 3.1.2
    unity iphone 1.5
     
  3. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    I just got this fixed,

    I removed some old scripts that I was no longer using and I combined/optimized scripts that I could. I did not know that you can only have a limited number of scripts in the assets folder even if not used. I’m not sure how it all works, but when I downsized my scripts, it works great!
     
  4. chocolossus

    chocolossus

    Joined:
    Nov 6, 2009
    Posts:
    4
    i've been dealing with the exact same issue for a couple days now. and at first i thought it was a problem with conflicting code when compiling into xcode because i just started building out for unity.

    if i would take out snippets of data from my files by commenting them it would let the code run fine, so i kept trying to see where the main issue was happening. after reading your post i just completely deleted a couple debug scripts and now it's building fine.

    this seems to be a huge issue if it's actually based on the amount of code that it's writing and not just the amount of scripts, but i couldn't figure out where that line is that i was apparently crossing over.

    xcode 3.1.4
    iphone os 3.1.2
    indie unity iphone 1.5
     
  5. iEarthHero1

    iEarthHero1

    Joined:
    Jul 28, 2009
    Posts:
    301
  6. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    This is the email from Unity Support.

    "Thanks for your email.  The XCode message you have is actually unconnected with the script that you sent in.  The processor on the iPhone has an instruction called LDR.  It takes a 12-bit number that tells the instruction where to get data from.  As you project gets bigger, and more data is used, this instruction cannot generate a 12-bit number to compute the address for the data"

    I hope this helps
     
  7. RodrigoSeVeN

    RodrigoSeVeN

    Joined:
    Jul 10, 2010
    Posts:
    15
    It worked for me when testing the Star Trooper Demo and getting that message with "(5264 +/-4096)", etc.

    Thanks!
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    the error there is no unity thing, its the linker of the iOS SDK that only accepts a fixed size of static library data (which is what you provide with your scripts in the end)

    normally no problem but if you hit in system, system.xml and some 3rd party iphone thingy, you will hit the wall very fast

    on ios4 though I've seen it far less regulary (read that as never so far :) )