Search Unity

IL2CPP build error in Unity 5.0.2p2

Discussion in 'iOS and tvOS' started by BusStopStudios, May 25, 2015.

  1. BusStopStudios

    BusStopStudios

    Joined:
    Mar 28, 2015
    Posts:
    15
    This error occurs when trying to build from unity using the IL2CPP setting. This happens in Unity 5.0.2p2 version.

    I reverted unity back to 5.0.2f1 and the error does not exist.


    Failed running /Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe --copy-level=None --emit-null-checks --enable-array-bounds-check --extra-types.file="/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/il2cpp_default_extra_types.txt" --assembly="/Users/williambarry/Documents/Game/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" --assembly="/Users/williambarry/Documents/Game/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --assembly="/Users/williambarry/Documents/Game/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll" --assembly="/Users/williambarry/Documents/Game/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --assembly="/Users/williambarry/Documents/Game/Temp/StagingArea/Data/Managed/SmartLocalization_Runtime.dll" --generatedcppdir="/Users/williambarry/Documents/Game/Temp/il2cppOutput/il2cppOutput" --builder=none

    stdout:
    IL2CPP error for method 'System.Void ObservedList`1::.ctor()' in assembly '/Users/williambarry/Documents/Game/Temp/StagingArea/Data/Managed/Mono.Security.dll'
    Additional information: Build a development build for more information. Exception of type 'System.Exception' was thrown.
    il2cpp.exe didn't catch exception: System.Exception: Exception of type 'System.Exception' was thrown.
    at Unity.IL2CPP.SharedRuntimeMetadataAccess.RetreiveType (Mono.Cecil.TypeReference type, System.Func`1 defaultFunc, System.String typeSharedAccessName, System.String methodSharedAccessName, RuntimeGenericContextInfo info) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SharedRuntimeMetadataAccess.StaticData (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.WriteCallToClassAndInitializerAndStaticConstructorIfNeeded (Mono.Cecil.TypeReference type, Mono.Cecil.MethodDefinition invokingMethod, IRuntimeMetadataAccess runtimeMetadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.WriteCallToClassAndInitializerAndStaticConstructorIfNeeded (Mono.Cecil.TypeReference type, Mono.Cecil.MethodDefinition invokingMethod, IRuntimeMetadataAccess runtimeMetadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.StaticFieldAccess (Mono.Cecil.Cil.Instruction ins) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction (Unity.IL2CPP.Node node, Unity.IL2CPP.Common.CFG.InstructionBlock block, Mono.Cecil.Cil.Instruction ins) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive (Unity.IL2CPP.Node node) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.Generate () [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodBody (Mono.Cecil.MethodReference method, Unity.IL2CPP.CppCodeWriter methodBodyWriter, IRuntimeMetadataAccess metadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter+<WriteMethodDefinition>c__AnonStorey0.<>m__0 (Unity.IL2CPP.CppCodeWriter bodyWriter, Unity.IL2CPP.MetadataUsage metadataUsage) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodWithMetadataInitialization (Unity.IL2CPP.CppCodeWriter writer, System.String methodSignature, System.Action`2 writeMethodBody) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodDefinition (Mono.Cecil.MethodReference method) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethod (Mono.Cecil.MethodReference method, MethodWriteMode mode) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodAndWrappers (Mono.Cecil.MethodReference method, MethodWriteMode mode) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodDefinitions (System.Func`2 filter) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteMethodDefinitionsFor (Unity.IL2CPP.CppCodeWriter writer, System.Func`2 filter, Mono.Cecil.TypeReference type, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles (NiceIO.NPath outputDirectory, System.String fileName, IEnumerable`1 typeList, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection genericsCollection, IEnumerable`1 allTypeDefinitions, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection allGenerics, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection, IEnumerable`1 allTypeDefinitions) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir, System.Collections.Generic.List`1 additionalCpp) [0x00000] in <filename unknown>:0
    stderr:

    Unhandled Exception:
    System.Exception: Exception of type 'System.Exception' was thrown.
    at Unity.IL2CPP.SharedRuntimeMetadataAccess.RetreiveType (Mono.Cecil.TypeReference type, System.Func`1 defaultFunc, System.String typeSharedAccessName, System.String methodSharedAccessName, RuntimeGenericContextInfo info) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SharedRuntimeMetadataAccess.StaticData (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.WriteCallToClassAndInitializerAndStaticConstructorIfNeeded (Mono.Cecil.TypeReference type, Mono.Cecil.MethodDefinition invokingMethod, IRuntimeMetadataAccess runtimeMetadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.WriteCallToClassAndInitializerAndStaticConstructorIfNeeded (Mono.Cecil.TypeReference type, Mono.Cecil.MethodDefinition invokingMethod, IRuntimeMetadataAccess runtimeMetadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.StaticFieldAccess (Mono.Cecil.Cil.Instruction ins) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction (Unity.IL2CPP.Node node, Unity.IL2CPP.Common.CFG.InstructionBlock block, Mono.Cecil.Cil.Instruction ins) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive (Unity.IL2CPP.Node node) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.Generate () [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodBody (Mono.Cecil.MethodReference method, Unity.IL2CPP.CppCodeWriter methodBodyWriter, IRuntimeMetadataAccess metadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter+<WriteMethodDefinition>c__AnonStorey0.<>m__0 (Unity.IL2CPP.CppCodeWriter bodyWriter, Unity.IL2CPP.MetadataUsage metadataUsage) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodWithMetadataInitialization (Unity.IL2CPP.CppCodeWriter writer, System.String methodSignature, System.Action`2 writeMethodBody) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodDefinition (Mono.Cecil.MethodReference method) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethod (Mono.Cecil.MethodReference method, MethodWriteMode mode) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodAndWrappers (Mono.Cecil.MethodReference method, MethodWriteMode mode) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodDefinitions (System.Func`2 filter) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteMethodDefinitionsFor (Unity.IL2CPP.CppCodeWriter writer, System.Func`2 filter, Mono.Cecil.TypeReference type, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles (NiceIO.NPath outputDirectory, System.String fileName, IEnumerable`1 typeList, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection genericsCollection, IEnumerable`1 allTypeDefinitions, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection allGenerics, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection, IEnumerable`1 allTypeDefinitions) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir, System.Collections.Generic.List`1 additionalCpp) [0x00000] in <filename unknown>:0
    [ERROR] FATAL UNHANDLED EXCEPTION: System.Exception: Exception of type 'System.Exception' was thrown.
    at Unity.IL2CPP.SharedRuntimeMetadataAccess.RetreiveType (Mono.Cecil.TypeReference type, System.Func`1 defaultFunc, System.String typeSharedAccessName, System.String methodSharedAccessName, RuntimeGenericContextInfo info) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SharedRuntimeMetadataAccess.StaticData (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.WriteCallToClassAndInitializerAndStaticConstructorIfNeeded (Mono.Cecil.TypeReference type, Mono.Cecil.MethodDefinition invokingMethod, IRuntimeMetadataAccess runtimeMetadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.WriteCallToClassAndInitializerAndStaticConstructorIfNeeded (Mono.Cecil.TypeReference type, Mono.Cecil.MethodDefinition invokingMethod, IRuntimeMetadataAccess runtimeMetadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.StaticFieldAccess (Mono.Cecil.Cil.Instruction ins) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction (Unity.IL2CPP.Node node, Unity.IL2CPP.Common.CFG.InstructionBlock block, Mono.Cecil.Cil.Instruction ins) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive (Unity.IL2CPP.Node node) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodBodyWriter.Generate () [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodBody (Mono.Cecil.MethodReference method, Unity.IL2CPP.CppCodeWriter methodBodyWriter, IRuntimeMetadataAccess metadataAccess) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter+<WriteMethodDefinition>c__AnonStorey0.<>m__0 (Unity.IL2CPP.CppCodeWriter bodyWriter, Unity.IL2CPP.MetadataUsage metadataUsage) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodWithMetadataInitialization (Unity.IL2CPP.CppCodeWriter writer, System.String methodSignature, System.Action`2 writeMethodBody) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodDefinition (Mono.Cecil.MethodReference method) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethod (Mono.Cecil.MethodReference method, MethodWriteMode mode) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodAndWrappers (Mono.Cecil.MethodReference method, MethodWriteMode mode) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.MethodWriter.WriteMethodDefinitions (System.Func`2 filter) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteMethodDefinitionsFor (Unity.IL2CPP.CppCodeWriter writer, System.Func`2 filter, Mono.Cecil.TypeReference type, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles (NiceIO.NPath outputDirectory, System.String fileName, IEnumerable`1 typeList, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection genericsCollection, IEnumerable`1 allTypeDefinitions, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection allGenerics, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection, IEnumerable`1 allTypeDefinitions) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir, System.Collections.Generic.List`1 additionalCpp) [0x00000] in <filename unknown>:0

    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.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:436)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:281)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    UnityEditor.HostView:OnGUI()
     
  2. aroha

    aroha

    Joined:
    Jan 8, 2013
    Posts:
    18
    I'm getting the same error in 4.6.5p3. I'd been using mono up until now and tried changing the player settings to IL2CPP.
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,318
    It looks like we have an existing bug on this problem which has been reported a few other places on the forums. We will try to get this corrected soon, thanks for reporting it.
     
    funx likes this.
  4. funx

    funx

    Joined:
    Jun 9, 2014
    Posts:
    16
    Hi Josh, is there an official bug tracking # that I can use to follow the progress?
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,318
    @funx

    The bug is number 699105. However, this bug is not public, so there is no link on our issue tracker for it. I can tell you that is had been corrected in 5.0.2p4, which should be out today or tomorrow.
     
  6. BusStopStudios

    BusStopStudios

    Joined:
    Mar 28, 2015
    Posts:
    15
    Thanks Josh,

    I will pull down the new Unity version once its up.
     
unityunity