Search Unity

can't build to ios , Fatal error in Mono CIL Linker and Problem with UnusedBytecodeStripper2.exe !

Discussion in 'iOS and tvOS' started by Nooh, Oct 11, 2015.

  1. Nooh

    Nooh

    Joined:
    Dec 20, 2014
    Posts:
    5
    Hi

    in my game this message appear when i produce to iphone !!

    are the some solution for this problem ??

    i run patch 5.2.1 p3 , and problem still appear !!

    i change Api level in player setting to .NET 2 , but also not work !!

    i have this plugins in my game :

    playmaker - MadlLevelManager - ORKframework - DoTween pro


    i see different error Msg appear in log :



    Code (CSharp):
    1. Error building Player: Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!

    also this :

    Code (CSharp):
    1. Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\tempStrip" -l none -c link -x "C:\Program Files\Unity\Editor\Data\Tools\native_link.xml" -f "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\..\platform_native_link.xml" -x "C:\Users\me\Documents\‏‏chickenbox/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\Assembly-UnityScript-firstpass.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\DOTween.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\DOTweenPro.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\ORKFramework.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\ORKFrameworkCore.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\PlayMaker.dll"
    2.  
    3. stdout:
    4. Fatal error in Mono CIL Linker
    5.  
    6. System.Exception: Error processing method: 'System.Void DG.Tweening.DOTweenPath::DOComplete()' in assembly: 'DOTweenPro.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void DG.Tweening.TweenExtensions::Complete(DG.Tweening.Tween)
    7.   at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in <filename unknown>:0
    8.   at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
    9.   at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
    10.   at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
    11.   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    12.   --- End of inner exception stack trace ---
    13.   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    14.   at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
    15.   at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    16.   at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    17.   at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    18.   at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    19. stderr:
    20.  
    21. UnityEngine.Debug:LogError(Object)
    22. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    23. UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    24. UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    25. UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    26. UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
    27. UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:444)
    28. UnityEditorInternal.IL2CPPBuilder:StripAssemblies(IEnumerable`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:417)
    29. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:291)
    30. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    31. UnityEditor.HostView:OnGUI()

    also this :

    Code (CSharp):
    1. Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
    2. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:68)
    3. UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    4. UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    5. UnityEditorInternal.AssemblyStripper.Strip (System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String monoLinkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    6. UnityEditorInternal.AssemblyStripper.Strip (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String monoLinkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
    7. UnityEditorInternal.IL2CPPBuilder.RunAssemblyStripper (IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:444)
    8. UnityEditorInternal.IL2CPPBuilder.StripAssemblies (IEnumerable`1 assemblies, System.String managedAssemblyFolderPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:417)
    9. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:291)
    10. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    11. UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.iOSBuildPostprocessor pp, BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
    12. UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    13. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    14. UnityEditor.HostView:OnGUI()
    15.  
    I have Unity 5.2.1 P3

    and all this msg appear after doing this events :

    - importing old standerd asset (charachtar control )
    - import New DoTween ver
    - and some tiny change in code !!

    Please help :(
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
    @Nooh

    It may be worth looking at the DOTweenPro.dll assembly in a tool like ILSpy. This error means that the DoComplete method in the DG.Tweening.DOTweenPath type uses a method named Complete in the DG.Tweening.TweenExtensions type. Maybe this TweenExtensions type is in a different assembly that you don't have in your project?

    You may also want to ask the DOTween maintainers about this error. Have other users seen it?
     
  3. Deleted User

    Deleted User

    Guest

    Bump. I am also getting a similar error but for DOTween.Restart
     
  4. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Never heard about this problem before (Nooh never contacted me, so maybe he solved it?). Can you post your full error log @supremegrandruler? Did you check already that you're not missing any files?
     
  5. Deleted User

    Deleted User

    Guest

    @Izitmee , sure here's the first error:

    This is the second error:

    This happens only when I build for iOS. Android and Stand Alone are OK.

    EDIT: Note that it says Unity 5.1.4 but this is a typo; I'm actually on Unity 5.4.1
     
    Last edited by a moderator: Jul 11, 2017
  6. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    I think I found the problem. It seems that Unity's iOS builder has troubles accepting a method with optional parameters. This definitely looks like a Unity bug, hope someone can look into it. In the meantime, I'm gonna send you via email a modified version that should fix this, in a short while.
     
  7. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Actually, no, wait. I realized that fixing this on my side would be way more complex than I thought, and lead to verbose code that will should be unnecessary since I'm pretty sure Unity fixed this already. Could you try upgrading your project to Unity 5.6 (or the latest release version possible, at least 5.4.5) and try again?
     
  8. Deleted User

    Deleted User

    Guest

    Is there no way for you to fix it? If it's only a method that has optional parameters can't you do something like this?

    So this:

    Code (CSharp):
    1. void DoStuff(int x = 0, float y = 9, string g = "hi");
    Could become this:

    Code (CSharp):
    1. void DoStuff(int x, float y, string g){
    2.    //Actually do stuff
    3. }
    4.  
    5. void DoStuff(int x, float y){
    6.     DoStuff(x, y, "hi);
    7. }
    8.  
    9. void DoStuff(int x){
    10.    DoStuff(x, 9);
    11. }
    12.  
    13. void DoStuff(){
    14.    DoStuff(0);
    15. }
    16.  
    I'd really hate to have to upgrade Unity right now as I'm very very close to finishing a project. :(