Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    542
    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:
    144
    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:
    542
    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.