Search Unity

Error building game for OSX

Discussion in 'macOS' started by TheRaider, Nov 4, 2021.

  1. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,250
    I exported my project as xcode to notarise it. The PC build of this works great.

    When I try play the game with the notarised (with developerID) export it just gives me spinning wheel of death.

    When I try to play in code I get (I tried both intel64 only and silicon + intel64)

    The line the error comes is (this appears to be unity specific code and not code I wrote)
    return PlayerMain(argc, argv); }

    and the error is
    Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

    I have no clue how to fix this and get the app running on OSX, any help much appreciated.
     
  2. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,250
    This is the script throwing the error

    Code (CSharp):
    1. // Copyright © 2018 Unity Technologies. All rights reserved.
    2.  
    3. int PlayerMain(int argc, const char *argv[]);
    4.  
    5. #if UNITY_ASAN
    6. extern "C"
    7. {
    8.     extern void unity_asan_configure();
    9. }
    10. #endif
    11.  
    12. int main(int argc, const char *argv[])
    13. {
    14. #if UNITY_ASAN
    15.     unity_asan_configure();
    16. #endif
    17.  
    18.     return PlayerMain(argc, argv);
    19. }
    this is the line the error comes from return PlayerMain(argc, argv);
     
  3. Neil-Corre

    Neil-Corre

    Joined:
    Nov 29, 2015
    Posts:
    44
    Hi there! Sorry to necro this post. But, I also am having this issue currently. Similar case, game works well on PC. But, having an issue with archiving via xcode due to this same PlayerMain error. We're currently using Unity 2019.4.30f1 to make a build
     
  4. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,250
    I fixed by changing in the apple settings for backend scripting to use IC2CPP
     
    Neil-Corre likes this.
  5. Neil-Corre

    Neil-Corre

    Joined:
    Nov 29, 2015
    Posts:
    44
    Fantastic. Thank you! I'll give it a try this week. Have a great holiday!