Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Automated build only works once, after that NullRef when building

Discussion in 'iOS and tvOS' started by pahe, Feb 6, 2015.

  1. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    379
    Hi folks.

    I'm having a problem currently with my build server (and also manually building) and my iOS build.
    When building a xCode project, only the first time the build process is running fine. After that, I get a null reference exception for building. From the logfile:

    Code (csharp):
    1.  
    2. /Applications/Unity4.6.2/Unity.app/Contents/PlaybackEngines/iossupport/UnityEditor.iOS.Extensions.Xcode.dll (this message is harmless)
    3. 09:04:06 Error building Player: NullReferenceException: Object reference not set to an instance of an object
    4.  
    I then have to replace the old xCode project and modify my project again (which is pretty annoying). I'm using Unity 4.6.2 and xCode 6.1.

    Anyone else has this problem?
     
    Adquizition likes this.
  2. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,349
    Last edited: Feb 6, 2015
  3. Frank84

    Frank84

    Joined:
    Apr 27, 2009
    Posts:
    15
  4. Frank84

    Frank84

    Joined:
    Apr 27, 2009
    Posts:
    15
    I have also managed to get the exact same error message you are getting in our actual project when building. Player.log shows a null reference error in some random code.
     
  5. Adquizition

    Adquizition

    Joined:
    Oct 11, 2014
    Posts:
    13
    Just want to toss my hat in this as saying I am having the same problem. I have to usually rebuild my project instead of append.
     
  6. Adquizition

    Adquizition

    Joined:
    Oct 11, 2014
    Posts:
    13
    I am for sure. Seems like a legitimate bug.
     
  7. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    65
    Same issue here. I solved it by deleting iOS build, and making a new build with Unity.
    I yet have to try to build second time.. (after restarting Unity).

    EDIT: nope. No luck. Same problem again.
    What I do to fix is:
    - delete whole build folder (sometimes works or not)
    - restart unity (sometimes working)

    Also started getting another bug when wanting to open project with xCode (couldn't parse...).

    P.S. I am using Facebook plugin.
     
    Last edited: Feb 11, 2015
  8. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    379
    Interesting. @Frank84 do you know if this is related to the Facebook plugin only? I've removed it from my testproject, but the problem still occured.