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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

IL2CPP UnusedBytecodeStripper2.exe crash when building IOS

Discussion in 'iOS and tvOS' started by SoylentGraham, Sep 2, 2015.

  1. SoylentGraham

    SoylentGraham

    Joined:
    Nov 12, 2013
    Posts:
    44
    I've been getting the error below when building my project for IL2CPP. I've been trying to nail down the exact problem (problem script?) but failing... I opened a new project, copied in all my assets one by one (and then project settings) until the project was identical, no problem... Switched back to my project, problem gone.
    I can't really submit a minimum project until I have a reliable project...

    Now... (and hour or two later) it's come back again. I've done a few git branch changes in the mean time, but that's really all I can think of which might be a problem.
    This wasn't working in 5.1.2f1, so tried 5.1.3p1, no difference.

    I have a script with some marshalling, (which builds fine, runs on android/osx and ios... WHEN it builds)
    I have all stripping settings off (Maybe these don't apply to IL2CPP)

    Are there any clues here that might help me hone in on what is broken?

    Failed running /Applications/Unity 5.1.3p1/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Volumes/Code/RwdMovieTexture/Unity/Temp/StagingArea/Data/Managed" -l none -c link -x "/Applications/Unity 5.1.3p1/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml" -f "/Applications/Unity 5.1.3p1/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors" -x "/Volumes/Code/RwdMovieTexture/Unity/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Volumes/Code/RwdMovieTexture/Unity/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "/Volumes/Code/RwdMovieTexture/Unity/Temp/StagingArea/Data/Managed" -a "/Volumes/Code/RwdMovieTexture/Unity/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Volumes/Code/RwdMovieTexture/Unity/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll"

    stdout:
    stderr:

    Unhandled Exception:
    Nested exception detected.
    Original Exception: at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0x00051>
    at UnusedBytecodeStripper2.Program.Main (string[]) <0x00013>

    Nested exception:at (wrapper managed-to-native) System.MonoType.getFullName (System.MonoType,bool,bool) <0x00060>
    at System.MonoType.ToString () <0x00017>
    at System.Exception.get_ClassName () <0x0001e>
    at System.Exception.ToString () <0x00013>


    [ERROR] FATAL UNHANDLED EXCEPTION: Nested exception detected.
    Original Exception: at (wrapper managed-to-native) object.__icall_wrapper_mono_object_new_fast (intptr) <0x00051>
    at UnusedBytecodeStripper2.Program.Main (string[]) <0x00013>

    Nested exception:at (wrapper managed-to-native) System.MonoType.getFullName (System.MonoType,bool,bool) <0x00060>
    at System.MonoType.ToString () <0x00017>
    at System.Exception.get_ClassName () <0x0001e>
    at System.Exception.ToString () <0x00013>



    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
    UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:426)
    UnityEditorInternal.IL2CPPBuilder:StripAssemblies(IEnumerable`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:414)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:291)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()​
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @SoylentGraham

    This is not something we've seen before. Which specific version of OSX are you using (you mentioned El Capitan here: http://forum.unity3d.com/threads/anyone-using-el-capitan-beta-xcode-7b6-unity.351921/)?
     
  3. SoylentGraham

    SoylentGraham

    Joined:
    Nov 12, 2013
    Posts:
    44
    I THINK it's beta 4, I may be wrong, in which case it's 3. (The apple menu doesn't say which beta)
    10.11 (15A225f) on a MacBook Pro (Retina, 15-inch, Early 2013)
    The latest beta 5 came out... today or yesterday, it's not that.

    Using latest xcode beta (only option for el capitan)
    Version 7.0 beta 4 (7A165t)

    As stated, this HAS worked before, but suddenly stopped, and doesn't seem to have recovered properly since.
     
  4. SoylentGraham

    SoylentGraham

    Joined:
    Nov 12, 2013
    Posts:
    44
    My mistake, the latest El Capitan in the app store is beta 6.... now I'm not sure which version I have at all :)
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @SoylentGraham

    I agree that this Apple beta stuff is pretty confusing. For what its worth, I'm using OSX 10.11 Beta (15A263e) (via About This Mac) and Xcode Version 7.0 beta 6 (7A192o). I've not seen this before, but if it is intermittent on your machine, I just may not have hit it.

    I'm not sure there is much we can do until we gather more data. If you start to see it on a regular basis, please let me know.
     
  6. SoylentGraham

    SoylentGraham

    Joined:
    Nov 12, 2013
    Posts:
    44
    Do let me know if there's a build with a ton more verbose debug information :)

    I've installed xcode 7 beta 6, and will upgrade el capitan to beta 6tommorrow and see if there's any difference.
     
  7. SoylentGraham

    SoylentGraham

    Joined:
    Nov 12, 2013
    Posts:
    44
    This has come back again, was fine yesterday. Not sure what's triggering the problem....
    Now on El Capitan Gold Master... Just installing a newer Xcode.
    Using Unity 5.1.3p1
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    Is this happening on a regular basis now? If so, it might be something we can reproduce and investigate then.
     
  9. SoylentGraham

    SoylentGraham

    Joined:
    Nov 12, 2013
    Posts:
    44
    It was happening every time before... Then stopped.
    Now it's every time again.
    Just installing latest 7.1 xcode beta.
    Then trying new Unity.
    Then maybe rebooting a few times...
    Only seems to occur when I'm trying to meet a deadline ;)
     
  10. SoylentGraham

    SoylentGraham

    Joined:
    Nov 12, 2013
    Posts:
    44
    Upgraded to xcode 7.1 beta (the one with watchOS), no change.
    Upgraded to Unity 5.1.3p3, problem gone. (though I saw nothing in the release notes about this)
    Opened project in 5.1.3p1 again, no problem.
    (In each case I tried replacing the build, as well as deleting it and creating from scratch)

    Will keep thread updated if it comes back.
     
  11. thecodes

    thecodes

    Joined:
    Jul 9, 2015
    Posts:
    20
    I installed Unity 5.2 and now have this same error everytime I try compiling. I checked off the byte stripping options in the player and it still happened. I can't get my project to build for iOS now.
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @thecodes

    Are you using El Capitan and/or Xcode 7 beta? It seems like this issue might have something to do with those, although we're not certain. Another data point would be beneficial though.
     
  13. BBRome

    BBRome

    Joined:
    Jul 3, 2012
    Posts:
    373
    + 1
    OSX 10.5.5 same can't build IOS
    xCode Version 7.0 (7A220)
    UNITY 5.2...
     
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @BBRome

    Is it possible for you to submit a bug report with the project that causes this issue? It is not something we've been able to reproduce there, so we would like to have look.