Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.37k stars 352 forks source link

Exception: IL2CPP error 'DG.Tweening.Plugins.SpiralPlugin' #491

Open Noblauch opened 3 years ago

Noblauch commented 3 years ago

Hi, I saw other older posts here before that addressed the issue. But this problem was apparently fixed? However we are facing this issue when building for iOS at the moment.

Unity: 2020.3.4f1 DOTween: v1.2.420 DOTweenPro: v1.0.178

Full Exception (while building) Exception: IL2CPP error for type '/__StaticArrayInitTypeSize=1212' in assembly '/Users/nilsoleblock/Documents/Unity/jackpot-client/Temp/StagingArea/Data/Managed/System.Xml.dll' System.Exception: Invalid method 'null' found in vtable for 'DG.Tweening.Plugins.SpiralPlugin' at Unity.IL2CPP.Metadata.VTableBuilder.ValidateAllMethodSlots(ReadOnlyContext context, TypeDefinition typeDefinition, IEnumerable`1 slots) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Metadata/VTableBuilder.cs:line 481 at Unity.IL2CPP.Metadata.VTableBuilder.VTableForType(ReadOnlyContext context, TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, Int32 currentSlot) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Metadata/VTableBuilder.cs:line 222 at Unity.IL2CPP.Metadata.VTableBuilder.VTableFor(ReadOnlyContext context, TypeReference typeReference) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Metadata/VTableBuilder.cs:line 87 at Unity.IL2CPP.AssemblyConversion.PrimaryCollection.Steps.PerAssembly.AssemblyCollection.CollectGenericMethodsFromVTableSlots(GlobalPrimaryCollectionContext context, AssemblyDefinition item) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion/PrimaryCollection/Steps.PerAssembly/AssemblyCollection.cs:line 28 at Unity.IL2CPP.AssemblyConversion.PrimaryCollection.Steps.PerAssembly.AssemblyCollection.ProcessItem(GlobalPrimaryCollectionContext context, AssemblyDefinition item) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion/PrimaryCollection/Steps.PerAssembly/AssemblyCollection.cs:line 19 at Unity.IL2CPP.AssemblyConversion.Steps.Base.ScheduledItemsStepFunc`5.WorkerWrapper(WorkItemData`3 workerData) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion/Steps.Base/ScheduledItemsStepFunc.cs:line 43 at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.ContinueWithResultsWorkItem`4.InvokeWorker(Object context, Int32 uniqueId) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Contexts.Scheduling/PhaseWorkScheduler.cs:line 493 at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.BaseContinueWorkItem`2.Invoke(Object context, Int32 uniqueId) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Contexts.Scheduling/PhaseWorkScheduler.cs:line 404 at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Contexts.Scheduling/PhaseWorkScheduler.cs:line 247 UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:129) UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:65) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:804) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:773) UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:599) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:269) UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:908) UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:718) UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessorSettings postProcessorSettings, UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:663) UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:45) Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown. UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:49) UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:29) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337) UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) Source.Editor.BuildProcess.BuildProvider.BaseAppBuilder:Execute(String, Server, BuildTarget) (at Assets/Source/Editor/BuildProcess/BuildProvider/BaseAppBuilder.cs:71) Source.Editor.BuildProcess.Build:Start(String[], Boolean, Boolean) (at Assets/Source/Editor/BuildProcess/Build.cs:78) Source.Editor.BuildProcess.Build:Start(BuildWindowIntermediateSettings) (at Assets/Source/Editor/BuildProcess/Build.cs:48) Source.Editor.BuildProcess.BuildProvider.BuildWindow.BuildWindow:OnBuildiOSClicked() (at Assets/Source/Editor/BuildProcess/BuildProvider/BuildWindow/BuildWindow.cs:158) Source.Editor.BuildProcess.BuildProvider.BuildWindow.BuildWindow:CreateButton(String, Action) (at Assets/Source/Editor/BuildProcess/BuildProvider/BuildWindow/BuildWindow.cs:145) Source.Editor.BuildProcess.BuildProvider.BuildWindow.BuildWindow:OnGUI() (at Assets/Source/Editor/BuildProcess/BuildProvider/BuildWindow/BuildWindow.cs:132) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

Any Ideas what we can do about it? As far as I know we didn't update anything lately and the build suddenly stopped working.

Noblauch commented 3 years ago

Okay, I tried the whole day to get our builds back working. I found one way so that IL2CPP compiles again and this is deleting: "Demigiant/DOTweenPro/DOTweenProShortcuts.cs"

Apperently this was a script to fix this issue, but in our case it seems to have the exact opposite effect. I don't really feel this is the right thing to do but I have no choice, we need to be able to build. The strange thing is, it was able to build before, and this script / IL2CPP didn't cause any errors before.

Antonio-Iliev commented 3 years ago

Thank you, Noblauch, for your effort. Your solution fixes the same problem for Unity 2019.4.1f1, DOTween: v1.2.420, DOTweenPro: v1.0.178, but for Android build. There are new versions for both of DOTween and DOTweenPro. Maybe updating them will also fix the problem.