IL2CPP error. AOTGenerated.PreventCodeStrippingViaReferences

Issue #378 invalid
Former user created an issue
  • using Unity 2018.2.1f1 on osX
  • target iOS
  • checking from Serialization Debuger, there are no warning or error.
  • used to test with 2018.1.x but they yield error about System.String <>__AnonType1`2::ToString()

Failed running /Applications/Unity/Hub/Editor/2018.2.1f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityjit" --map-file-parser="/Applications/Unity/Hub/Editor/2018.2.1f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Unity.TextMeshPro.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/UnityEngine.Timeline.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Sirenix.Serialization.Config.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Facebook.Unity.Settings.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Opencoding.Console.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/DOTween.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/UnityEngine.Analytics.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/UnityEngine.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Facebook.Unity.Android.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Facebook.Unity.IOS.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Sirenix.OdinInspector.Attributes.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Sirenix.Serialization.AOTGenerated.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Sirenix.Serialization.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Sirenix.Utilities.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Stores.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/UnityEngine.Purchasing.dll" --assembly="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/mscorlib.dll" --generatedcppdir="/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/il2cppOutput/il2cppOutput" stdout: IL2CPP error for method 'System.Void Sirenix.Serialization.AOTGenerated.PreventCodeStrippingViaReferences::.cctor()' in assembly '/Users/PigsssGames01/Desktop/Work Projects/Vera/Unity/Temp/StagingArea/Data/Managed/Sirenix.Serialization.AOTGenerated.dll' Additional information: Build a development build for more information. Exception has been thrown by the target of an invocation. il2cpp.exe didn't catch exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Exception of type 'System.Exception' was thrown. at Unity.IL2CPP.GenericsCollection.Inflater.InflateType(GenericContext context, TypeReference typeReference) at Unity.IL2CPP.GenericsCollection.Inflater.ConstructGenericType(GenericContext context, TypeDefinition typeDefinition, IEnumerable1 genericArguments) at Unity.IL2CPP.GenericsCollection.Inflater.InflateType(GenericContext context, GenericInstanceType genericInstanceType) at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(MethodReference methodReference, Context context) at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(Instruction instruction, Context context) at Unity.Cecil.Visitor.Visitor.Visit(MethodBody methodBody, Context context) at Unity.Cecil.Visitor.Visitor.Visit(MethodDefinition methodDefinition, Context context) at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(MethodDefinition methodDefinition, Context context) at Unity.Cecil.Visitor.Visitor.Visit(TypeDefinition typeDefinition, Context context) at Unity.Cecil.Visitor.Visitor.Visit(ModuleDefinition moduleDefinition, Context context) at Unity.Cecil.Visitor.Visitor.Visit(AssemblyDefinition assemblyDefinition, Context context) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Unity.Cecil.Visitor.Visitor.Visit[T](T node, Context context) at Unity.IL2CPP.GenericsCollection.GenericsCollector.CollectPerAssembly(IInteropDataCollector interopDataCollector, AssemblyDefinition assembly) at System.Linq.Enumerable.SelectIListIterator2.MoveNext() at Unity.IL2CPP.GenericsCollection.GenericsCollector.MergeCollections(IEnumerable1 collections) at Unity.IL2CPP.AssemblyConverter.Apply() at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable1 assemblyDirectories, IEnumerable1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles) at il2cpp.Program.DoRun(String[] args) at il2cpp.Program.Run(String[] args) at il2cpp.Program.Main(String[] args) stderr: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Exception of type 'System.Exception' was thrown. at Unity.IL2CPP.GenericsCollection.Inflater.InflateType(GenericContext context, TypeReference typeReference) at Unity.IL2CPP.GenericsCollection.Inflater.ConstructGenericType(GenericContext context, TypeDefinition typeDefinition, IEnumerable1 genericArguments) at Unity.IL2CPP.GenericsCollection.Inflater.InflateType(GenericContext context, GenericInstanceType genericInstanceType) at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(MethodReference methodReference, Context context) at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(Instruction instruction, Context context) at Unity.Cecil.Visitor.Visitor.Visit(MethodBody methodBody, Context context) at Unity.Cecil.Visitor.Visitor.Visit(MethodDefinition methodDefinition, Context context) at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(MethodDefinition methodDefinition, Context context) at Unity.Cecil.Visitor.Visitor.Visit(TypeDefinition typeDefinition, Context context) at Unity.Cecil.Visitor.Visitor.Visit(ModuleDefinition moduleDefinition, Context context) at Unity.Cecil.Visitor.Visitor.Visit(AssemblyDefinition assemblyDefinition, Context context) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Unity.Cecil.Visitor.Visitor.VisitT at Unity.IL2CPP.GenericsCollection.GenericsCollector.CollectPerAssembly(IInteropDataCollector interopDataCollector, AssemblyDefinition assembly) at System.Linq.Enumerable.SelectIListIterator2.MoveNext() at Unity.IL2CPP.GenericsCollection.GenericsCollector.MergeCollections(IEnumerable1 collections) at Unity.IL2CPP.AssemblyConverter.Apply() at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable1 assemblyDirectories, IEnumerable1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles) at il2cpp.Program.DoRun(String[] args) at il2cpp.Program.Run(String[] args) at il2cpp.Program.Main(String[] args) at Program.Main(String[] args) 0 Unity 0x00000001019f244c _Z13GetStacktracei + 92 1 Unity 0x0000000100c07dfb _Z17DebugStringToFileRK21DebugStringToFileData + 795 2 Unity 0x0000000101e48b36 _ZN15DebugLogHandler12Internal_LogE7LogTypeN4core12basic_stringIcNS1_20StringStorageDefaultIcEEEEP6Object + 310 3 Unity 0x0000000101e4890a _Z35DebugLogHandler_CUSTOM_Internal_Log7LogTypeP10MonoStringP10MonoObject + 330 4 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object) 5 (Mono JIT Code) [BuildUtils.cs:80] UnityEditorInternal.Runner:RunNetCoreProgram (string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase,System.Action`1<System.Diagnostics.ProcessStartInfo>)

Comments (1)

  1. Log in to comment