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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    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:
    534
    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,422
    Last edited: Feb 6, 2015
  3. frankprogrammer

    frankprogrammer

    Joined:
    Apr 27, 2009
    Posts:
    17
  4. frankprogrammer

    frankprogrammer

    Joined:
    Apr 27, 2009
    Posts:
    17
    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:
    133
    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:
    534
    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.