Dotween: Cant build for iOS / with Assembly Definitions

Created on 18 Sep 2019  路  14Comments  路  Source: Demigiant/dotween

`stdout:
Fatal error in Unity CIL Linker
Mono.Linker.MarkException: Error processing method: 'System.Void DG.Tweening.DOTweenPath::DORestart(System.Boolean)' in assembly: 'DOTweenPro.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Int32 DG.Tweening.Core.Debugger::logPriority
at Mono.Linker.Steps.MarkStep.HandleUnresolvedField(FieldReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Unity.Linker.UnityDriver.Run()
at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
at Unity.Linker.UnityDriver.RunDriver()
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:222)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable1, BuildTargetGroup, ManagedStrippingLevel, Boolean, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:158) UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:358) UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:246) UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:326) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)`

DOTween Pro bug resolved

All 14 comments

Just started a IOS build after upgrading to Unity 2017.4.32f1 and to Dotween Pro 1.0.155 / Dotween 1.2.270 and received a similar error. We were on 2017.4.1.4f1 and whatever version of Dotween was around late 2018. I'll post the log in the next comment. Hope that's enough info to go on or whether we've missed something in upgrading.

Failed running /Applications/Unity/Hub/Editor/2017.4.32f1/Unity.app/Contents/il2cpp/build/UnityLinker.exe --api=NET_2_0_Subset -out="/Users/ ...

stdout:
Fatal error in Unity CIL Linker
Mono.Linker.MarkException: Error processing method: 'System.Void DG.Tweening.DOTweenPath::DORestart(System.Boolean)' in assembly: 'DOTweenPro.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Int32 DG.Tweening.Core.Debugger::logPriority
at Mono.Linker.Steps.MarkStep.MarkField (Mono.Cecil.FieldReference reference) [0x00032] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00044] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x000b4] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x001a0] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at UnityLinker.Steps.UnityMarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x002b9] in <3d35a59e4269494893502a89973184cc>:0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00020] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00051] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.ProcessEntireQueue () [0x00007] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.Process () [0x00017] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000e] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at UnityLinker.Steps.UnityMarkStep.Process (Mono.Linker.LinkContext context) [0x0000c] in <3d35a59e4269494893502a89973184cc>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00020] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at UnityLinker.UnityDriver.Run () [0x00086] in <3d35a59e4269494893502a89973184cc>:0
at UnityLinker.UnityDriver.RunDriverWithoutErrorHandling () [0x00001] in <3d35a59e4269494893502a89973184cc>:0
at UnityLinker.UnityDriver.RunDriver () [0x00002] in <3d35a59e4269494893502a89973184cc>:0
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:89)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:82) UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:204) UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114) UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:152) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This is a Unity error that sometimes happened in older version (then they fixed it, then it came back again), where IL2CPP didn't agree with overridden methods that had optional parameters. I went around it by creating separate overloads without optional parameters in DOTween Pro v1.0.110, so it's quite surprising that this is happening again. Also, I had various games built on iOS without problems so I'm wondering if it's a new Unity bug specific to 2017.4.32. Can you confirm me that you're on DOTween Pro 1.0.155 (please check the DOTween Utility panel again). Also, are you using DOTween's ASMDEF or not?

Apologies for the late response. I thought I'd get an email when a new comment is posted, but apparantly not, even though I'm subscribed to the issue. Hopefully @happimal will provide their info as well.

AFAIK, it did upgrade to 1.0.155 fine as seen below. We're not using ASMDEF as I don't think it existed in 2018 and I'm struggling to find a quick reference to what it is. Should we be using it?

I might see if I can remove DOtween & Pro and reinstall tomorrow, just to make sure it wasn't updated incorrectly. When I saw this issue opened and just 19 hour prior, my initial thought was that something was causing it in 2017.4.32f1.

Capture

Capture2

As promised, I did a bit more testing with an empty project set as iOS/IL2CPP Net 3.5 on Unity Unity 2017.4.32f1 (Mac)

DOTween Pro 1.0155 with Dotween 1.2.250 included in the package builds with no problem!

DOTween Pro 1.0155 with Dotween 1.2.280 has similar errors to before. Error log shown below.

Hope that helps in some way. I might just go with 1.2.250, but will have to test it with our game build.

stdout:
Fatal error in Unity CIL Linker
Mono.Linker.MarkException: Error processing method: 'System.Void DG.Tweening.DOTweenPath::DORestart(System.Boolean)' in assembly: 'DOTweenPro.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Int32 DG.Tweening.Core.Debugger::logPriority
at Mono.Linker.Steps.MarkStep.MarkField (Mono.Cecil.FieldReference reference) [0x00032] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00044] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x000b4] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x001a0] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at UnityLinker.Steps.UnityMarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x002b9] in <3d35a59e4269494893502a89973184cc>:0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00020] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00051] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.ProcessEntireQueue () [0x00007] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.Process () [0x00017] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000e] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at UnityLinker.Steps.UnityMarkStep.Process (Mono.Linker.LinkContext context) [0x0000c] in <3d35a59e4269494893502a89973184cc>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00020] in <0e17d802702b4bd2a6843bd5c9b53b9e>:0
at UnityLinker.UnityDriver.Run () [0x00086] in <3d35a59e4269494893502a89973184cc>:0
at UnityLinker.UnityDriver.RunDriverWithoutErrorHandling () [0x00001] in <3d35a59e4269494893502a89973184cc>:0
at UnityLinker.UnityDriver.RunDriver () [0x00002] in <3d35a59e4269494893502a89973184cc>:0
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:89)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:82) UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:204) UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114) UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:152) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


Exception: /Applications/Unity/Hub/Editor/2017.4.32f1/Unity.app/Contents/il2cpp/build/UnityLinker.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73) UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:89)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable1 additionalBlacklist) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:82) UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.String stagingAreaData, IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:204) UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114) UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:152) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:787)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:623)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:576)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:37)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This is a Unity error that sometimes happened in older version (then they fixed it, then it came back again), where IL2CPP didn't agree with overridden methods that had optional parameters. I went around it by creating separate overloads without optional parameters in DOTween Pro v1.0.110, so it's quite surprising that this is happening again. Also, I had various games built on iOS without problems so I'm wondering if it's a new Unity bug specific to 2017.4.32. Can you confirm me that you're on DOTween Pro 1.0.155 (please check the DOTween Utility panel again). Also, are you using DOTween's ASMDEF or not?

I'm in fact using DOTween Pro 1.0.155 and ASMDEF.

As promised, I did a bit more testing with an empty project set as iOS/IL2CPP Net 3.5 on Unity Unity 2017.4.32f1 (Mac)

DOTween Pro 1.0155 with Dotween 1.2.250 included in the package builds with no problem!

DOTween Pro 1.0155 with Dotween 1.2.280 has similar errors to before. Error log shown below.

Hope that helps in some way. I might just go with 1.2.250, but will have to test it with our game build.

Same, after several trys we downgraded.

Thanks for the additional info, and know that I'm on it and, even if I'm still puzzled, I hope to have a fix very quickly (and I mean within today).

No worries if not. I know it's like whack a mole keeping up with the different streams of Unity. Quite happy to stick to Dotween 1.0.155 & 1.2.250. At least if anyone else has problems they will find this thread for a solution in the interm :)

Ahoy again. I'm still struggling with this but I'm obviously insisting. As of now all the theories I had didn't work :| While I make more tests I have a question: in what folder do you keep DOTween and DOTweenPro? Could you write me the full Assets path to their parent?

Wait wait wait! I got it! I was looking at the completely wrong problem! I'm trying to see if I can fix it by updating DOTween only and not the Pro too, but otherwise by updating the Pro I can fix it. Victory \o/

Lol! I just sent you an email via your contact form with the basic project containg Dotween & Pro which fails on building for iOS. I then came back and saw you may have found a solution. I'll delete that link in the next hour or so if it's not needed. It also contained what the path is for DOTween - essentially the default install path.

Ah, thank you! :) And yes, I definitely got it so I won't need your project. But I just checked and I need to update DOTween Pro: the problem is simply a public field that became a public property in DOTween 1.2.255, and the iOS build can't deal with that while all the others can鈥攚hich is kinda sad. So I have to rebuild DOTween Pro. I will send the update to the Asset Store as soon as I'm done (one hour for the whole process I assume) and it should be live in a couple days. In the meantime I'll send you the updated version via mail ;)

P.S. @happimal write me here so I can send you an update too.

Marvelous! Thanks for looking at at it, especially as maintenance is such a drag compared to creating new stuff :) Have a great weekend.

Email sent, and thank you ^_^
You have a great weekend too!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Puutalo picture Puutalo  路  8Comments

Dentrax picture Dentrax  路  10Comments

dooprod picture dooprod  路  11Comments

wilczarzgit picture wilczarzgit  路  9Comments

RealCosmik picture RealCosmik  路  9Comments