Search Unity

PropertyBag post-processor generates invalid code unable to be processed by IL2CPP for Dictionary<>

Discussion in 'Data Oriented Technology Stack' started by b2937, Jan 16, 2020.

  1. b2937

    b2937

    Joined:
    Jul 1, 2019
    Posts:
    12
    Hello

    With the latest Entities package (0.4.0-preview.10) on latest Unity Beta 2019.3.0f5 a project cannot be built with IL2CPP when there is a ISharedComponentData struction containing any fields of type System.Collections.Generic.Dictionary.

    An empty ECS project with just this code fails to build:
    Code (CSharp):
    1. using Unity.Entities;
    2. using System.Collections.Generic;
    3.  
    4. public struct SharedComponentWithDictionary : ISharedComponentData, System.IEquatable<SharedComponentWithDictionary>
    5. {
    6.     public Dictionary<int, int> theDictionary;
    7.  
    8.     public bool Equals(SharedComponentWithDictionary other) => true;
    9.     public override int GetHashCode() => 1;
    10. }
    When building, it shows the following error:

    IL2CPP error for method 'System.Collections.Generic.IList`1<System.Int32> Unity.Properties.CodeGeneratedPropertyBagRegistry.Unity_Entities_Serialization_DictionaryContainer_2_System_Int32_System_Int32_PropertyBag::KeysGetter(Unity.Entities.Serialization.DictionaryContainer`2<System.Int32,System.Int32>&)' in assembly '...\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll'
    Additional information: Specified method is not supported.


    I attached my test project (which is just an empty scene and a single code file containing the code above).
     

    Attached Files:

  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,233
    Is there a stack trace from il2cpp.exe along with that error message? If so, can you provide it?
     
  3. sean_unity746

    sean_unity746

    Unity Technologies

    Joined:
    Sep 19, 2017
    Posts:
    7
    Hi, thanks for bringing this up. The current version of the properties package is indeed generating invalid IL for dictionaries. We are currently working an update for this package which will have much better AOT support in general.
     
  4. b2937

    b2937

    Joined:
    Jul 1, 2019
    Posts:
    12
    Hello

    Update, this is still happening the latest Entities package (0.5.1-preview.11) on latest Unity 2019.3.0f6.

    This are the errors and stack traces reported by the build system:

    IL2CPP error for method 'System.Collections.Generic.IList`1<System.Int32> Unity.Properties.CodeGeneratedPropertyBagRegistry.Unity_Entities_Serialization_DictionaryContainer_2_System_Int32_System_Int32_PropertyBag::KeysGetter(Unity.Entities.Serialization.DictionaryContainer`2<System.Int32,System.Int32>&)' in assembly 'C:\dev\SharedComponentWithDictionaryProj\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll'
    Additional information: Specified method is not supported.


    Failed running C:\Program Files\Unity\2019.3.0f6\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WindowsDesktop" --architecture="x64" --configuration="Release" --outputpath="C:\dev\SharedComponentWithDictionaryProj\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\dev\SharedComponentWithDictionaryProj\Assets\..\Library/il2cpp_cache" --profiler-report --map-file-parser="C:/Program Files/Unity/2019.3.0f6/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/dev/SharedComponentWithDictionaryProj/Temp/StagingArea/Data/Managed --generatedcppdir=C:/dev/SharedComponentWithDictionaryProj/Temp/StagingArea/Data/il2cppOutput --extra-types-file=C:/dev/SharedComponentWithDictionaryProj/Temp/StagingArea/Data/extra-types.txt
    Code (output):
    1. stdout:
    2. IL2CPP error for method 'System.Collections.Generic.IList`1<System.Int32> Unity.Properties.CodeGeneratedPropertyBagRegistry.Unity_Entities_Serialization_DictionaryContainer_2_System_Int32_System_Int32_PropertyBag::KeysGetter(Unity.Entities.Serialization.DictionaryContainer`2<System.Int32,System.Int32>&)' in assembly 'C:\dev\SharedComponentWithDictionaryProj\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll'
    3. Additional information: Specified method is not supported.
    4. il2cpp.exe didn't catch exception: System.NotSupportedException: Specified method is not supported.
    5.    at Unity.IL2CPP.GenericParameterResolver.ResolveIfNeeded(IGenericInstance genericInstanceMethod, IGenericInstance genericInstanceType, GenericInstanceType genericInstanceType1)
    6.    at Unity.IL2CPP.StackAnalysis.StackStateBuilder.Build(IEnumerable`1 instructions)
    7.    at Unity.IL2CPP.StackAnalysis.StackAnalysis.Analyze()
    8.    at Unity.IL2CPP.MethodBodyWriter..ctor(IGeneratedMethodCodeWriter writer, MethodReference methodReference, TypeResolver typeResolver, IRuntimeMetadataAccess metadataAccess, VTableBuilder vTableBuilder, ISourceAnnotationWriter sourceAnnotationWriter, ISequencePointProvider sequencePointProvider, ICatchPointCollector catchPointCollector)
    9.    at Unity.IL2CPP.MethodWriter.WriteMethodBody(MethodReference method, IGeneratedMethodCodeWriter methodBodyWriter, IRuntimeMetadataAccess metadataAccess, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder, ISequencePointProvider sequencePointCollector, ICatchPointCollector catchPointCollector)
    10.    at Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
    11.    at Unity.IL2CPP.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)
    12.    at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method, IMethodCollector methodCollector, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder, SharedMethodCollector sharedMethodCollector, ISequencePointProvider sequencePointCollector, ICatchPointCollector catchPointCollector)
    13.    at Unity.IL2CPP.SourceWriter.<>c__DisplayClass7_0.<WriteMethodSourceFiles>b__0(IGeneratedMethodCodeWriter writer, TypeReference type)
    14.    at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`1 writeHeaderAction, Action`2 writeItemAction, Action`1 writeFooterAction, SourceWritingContext sourceWritingContext, Action`2 writeEnd)
    15.    at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`2 writeItemAction, SourceWritingContext sourceWritingContext, Action`2 writeEnd)
    16.    at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, Boolean writeMarshalingDefinitions)
    17.    at Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, AssemblyDefinition assemblyDefinition, IMethodCollector methodCollector)
    18.    at Unity.IL2CPP.AssemblyConverter.Apply()
    19.    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles)
    20.    at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
    21.    at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
    22.    at il2cpp.Program.Main(String[] args)
    23. stderr:
    24.  
    25. Unhandled Exception: System.NotSupportedException: Specified method is not supported.
    26.    at Unity.IL2CPP.GenericParameterResolver.ResolveIfNeeded(IGenericInstance genericInstanceMethod, IGenericInstance genericInstanceType, GenericInstanceType genericInstanceType1)
    27.    at Unity.IL2CPP.StackAnalysis.StackStateBuilder.Build(IEnumerable`1 instructions)
    28.    at Unity.IL2CPP.StackAnalysis.StackAnalysis.Analyze()
    29.    at Unity.IL2CPP.MethodBodyWriter..ctor(IGeneratedMethodCodeWriter writer, MethodReference methodReference, TypeResolver typeResolver, IRuntimeMetadataAccess metadataAccess, VTableBuilder vTableBuilder, ISourceAnnotationWriter sourceAnnotationWriter, ISequencePointProvider sequencePointProvider, ICatchPointCollector catchPointCollector)
    30.    at Unity.IL2CPP.MethodWriter.WriteMethodBody(MethodReference method, IGeneratedMethodCodeWriter methodBodyWriter, IRuntimeMetadataAccess metadataAccess, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder, ISequencePointProvider sequencePointCollector, ICatchPointCollector catchPointCollector)
    31.    at Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
    32.    at Unity.IL2CPP.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)
    33.    at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method, IMethodCollector methodCollector, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder, SharedMethodCollector sharedMethodCollector, ISequencePointProvider sequencePointCollector, ICatchPointCollector catchPointCollector)
    34.    at Unity.IL2CPP.SourceWriter.<>c__DisplayClass7_0.<WriteMethodSourceFiles>b__0(IGeneratedMethodCodeWriter writer, TypeReference type)
    35.    at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`1 writeHeaderAction, Action`2 writeItemAction, Action`1 writeFooterAction, SourceWritingContext sourceWritingContext, Action`2 writeEnd)
    36.    at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`2 writeItemAction, SourceWritingContext sourceWritingContext, Action`2 writeEnd)
    37.    at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, Boolean writeMarshalingDefinitions)
    38.    at Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, AssemblyDefinition assemblyDefinition, IMethodCollector methodCollector)
    39.    at Unity.IL2CPP.AssemblyConverter.Apply()
    40.    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles)
    41.    at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
    42.    at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
    43.    at il2cpp.Program.Main(String[] args)
    44.  
    45. 0x00007FF7E7F840EC (Unity) StackWalker::GetCurrentCallstack
    46. 0x00007FF7E7F87551 (Unity) StackWalker::ShowCallstack
    47. 0x00007FF7E66D29A5 (Unity) GetStacktrace
    48. 0x00007FF7E8BE368E (Unity) DebugStringToFile
    49. 0x00007FF7E7FEBD75 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    50. 0x000001D74DE3FE2B (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    51. 0x000001D74DE4FDAB (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    52. 0x000001D74DE4F65E (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    53. 0x000001D7517297DA (Mono JIT Code) UnityEngine.Debug:LogError (object)
    54. 0x000001D75171245B (Mono JIT Code) UnityEditorInternal.Runner:RunProgram (UnityEditor.Utils.Program,string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase)
    55. 0x000001D75171157B (Mono JIT Code) UnityEditorInternal.Runner:RunManagedProgram (string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase,System.Action`1<System.Diagnostics.ProcessStartInfo>)
    56. 0x000001D75172687B (Mono JIT Code) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments (System.Collections.Generic.List`1<string>,System.Action`1<System.Diagnostics.ProcessStartInfo>,string)
    57. 0x000001D7517165E3 (Mono JIT Code) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData,string,string,bool)
    58. 0x000001D750C2FB23 (Mono JIT Code) UnityEditorInternal.IL2CPPBuilder:Run ()
    59. 0x000001D7516EF703 (Mono JIT Code) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp (string,UnityEditorInternal.IIl2CppPlatformProvider,System.Action`1<string>,UnityEditor.RuntimeClassRegistry)
    60. 0x000001D750C2E993 (Mono JIT Code) DesktopStandalonePostProcessor:SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs,System.Collections.Generic.HashSet`1<string>)
    61. 0x000001D750C27D73 (Mono JIT Code) DesktopStandalonePostProcessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs)
    62. 0x000001D750C278BE (Mono JIT Code) UnityEditor.Modules.DefaultBuildPostprocessor:PostProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
    63. 0x000001D750C26E62 (Mono JIT Code) UnityEditor.PostprocessBuildPlayer:Postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
    64. 0x000001D750C27420 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
    65. 0x00007FFA886ECBB0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
    66. 0x00007FFA88672122 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    67. 0x00007FFA8867B11F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    68. 0x00007FF7E7F05BAE (Unity) scripting_method_invoke
    69. 0x00007FF7E7EFF88D (Unity) ScriptingInvocation::Invoke
    70. 0x00007FF7E5F3A3D5 (Unity) CallMono
    71. 0x00007FF7E5F5493D (Unity) PostprocessPlayer
    72. 0x00007FF7E5F420FD (Unity) DoBuildPlayer_PostBuild
    73. 0x00007FF7E5F3158B (Unity) BuildPlayer
    74. 0x00007FF7E6CD14F8 (Unity) BuildPipeline::BuildPlayerInternalNoCheck
    75. 0x00007FF7E6CCF1FE (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
    76. 0x000001D74DB17783 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,bool)
    77. 0x000001D74DB169C3 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    78. 0x000001D74DB12043 (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    79. 0x000001D74DB116EB (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun (bool)
    80. 0x000001D74DB11053 (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    81. 0x000001D74599DE25 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    82. 0x00007FFA886ECBB0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
    83. 0x00007FFA88672122 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    84. 0x00007FFA8867B11F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    85. 0x00007FF7E7EFC3A6 (Unity) CallStaticMonoMethod
    86. 0x00007FF7E7EFBFE9 (Unity) CallStaticMonoMethod
    87. 0x00007FF7E7EFBD71 (Unity) CallStaticMonoMethod
    88. 0x00007FF7E5F02A8F (Unity) BuildPlayerWithLastSettings
    89. 0x00007FF7E5B49C2C (Unity) MenuController::ExecuteMenuItem
    90. 0x00007FF7E5B496DB (Unity) MenuController::ExecuteMainMenuItem
    91. 0x00007FF7E6CF4465 (Unity) EditorApplication_CUSTOM_ExecuteMenuItem
    92. 0x000001D74DAC148E (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorApplication:ExecuteMenuItem (string)
    93. 0x000001D74DAC135B (Mono JIT Code) UnityEditor.ShortcutManagement.MenuItemEntryDiscoveryInfo:<.ctor>b__7_0 (UnityEditor.ShortcutManagement.ShortcutArguments)
    94. 0x000001D74DA21F61 (Mono JIT Code) UnityEditor.ShortcutManagement.Trigger:HandleKeyEvent (UnityEngine.Event,UnityEditor.ShortcutManagement.IContextManager)
    95. 0x000001D74DA1E503 (Mono JIT Code) UnityEditor.ShortcutManagement.ShortcutController:HandleKeyEvent (UnityEngine.Event)
    96. 0x000001D74DA1E06B (Mono JIT Code) UnityEditor.ShortcutManagement.ShortcutIntegration:EventHandler ()
    97. 0x000001D74DA1DD9B (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
    98. 0x000001D74599DE25 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    99. 0x00007FFA886ECBB0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
    100. 0x00007FFA88672122 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    101. 0x00007FFA8867B11F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    102. 0x00007FF7E7F05BAE (Unity) scripting_method_invoke
    103. 0x00007FF7E7EFF88D (Unity) ScriptingInvocation::Invoke
    104. 0x00007FF7E7EF9865 (Unity) ScriptingInvocation::Invoke<void>
    105. 0x00007FF7E52D882E (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallGlobalEventHandler
    106. 0x00007FF7E5CBFD81 (Unity) CallGlobalInputEvent
    107. 0x00007FF7E66F9792 (Unity) GUIView::ProcessEventMessages
    108. 0x00007FF7E66F2769 (Unity) GUIView::GUIViewWndProc
    109. 0x00007FFACD9ACA66 (USER32) DispatchMessageW
    110. 0x00007FFACD9AC582 (USER32) DispatchMessageW
    111. 0x00007FF7E66F6D96 (Unity) MainMessageLoop
    112. 0x00007FF7E67009AA (Unity) WinMain
    113. 0x00007FF7E967C602 (Unity) __scrt_common_main_seh
    114. 0x00007FFACB397974 (KERNEL32) BaseThreadInitThunk
    115. 0x00007FFACDCCA271 (ntdll) RtlUserThreadStart


    Exception: C:\Program Files\Unity\2019.3.0f6\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe did not run properly!
    Code (stacktrace):
    1. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    2. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    3. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    4. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    5. UnityEditorInternal.IL2CPPBuilder.Run () (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    6. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    7. DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    8. DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    9. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    10. DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    11. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <6f28216fea9f453abf2e05b770ed3ee4>:0)
    12. 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 <6f28216fea9f453abf2e05b770ed3ee4>:0)
    13. UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()


    Build completed with a result of 'Failed'
    Code (stacktrace):
    1. 007FF7E7F840EC (Unity) StackWalker::GetCurrentCallstack
    2. 0x00007FF7E7F87551 (Unity) StackWalker::ShowCallstack
    3. 0x00007FF7E66D29A5 (Unity) GetStacktrace
    4. 0x00007FF7E8BE368E (Unity) DebugStringToFile
    5. 0x00007FF7E7FEBD75 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    6. 0x000001D74DE3FE2B (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    7. 0x000001D74DE4FDAB (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    8. 0x000001D74DE4F65E (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    9. 0x000001D7517297DA (Mono JIT Code) UnityEngine.Debug:LogError (object)
    10. 0x000001D74DB16F9B (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    11. 0x000001D74DB12043 (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    12. 0x000001D74DB116EB (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun (bool)
    13. 0x000001D74DB11053 (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    14. 0x000001D74599DE25 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    15. 0x00007FFA886ECBB0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
    16. 0x00007FFA88672122 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    17. 0x00007FFA8867B11F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    18. 0x00007FF7E7EFC3A6 (Unity) CallStaticMonoMethod
    19. 0x00007FF7E7EFBFE9 (Unity) CallStaticMonoMethod
    20. 0x00007FF7E7EFBD71 (Unity) CallStaticMonoMethod
    21. 0x00007FF7E5F02A8F (Unity) BuildPlayerWithLastSettings
    22. 0x00007FF7E5B49C2C (Unity) MenuController::ExecuteMenuItem
    23. 0x00007FF7E5B496DB (Unity) MenuController::ExecuteMainMenuItem
    24. 0x00007FF7E6CF4465 (Unity) EditorApplication_CUSTOM_ExecuteMenuItem
    25. 0x000001D74DAC148E (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorApplication:ExecuteMenuItem (string)
    26. 0x000001D74DAC135B (Mono JIT Code) UnityEditor.ShortcutManagement.MenuItemEntryDiscoveryInfo:<.ctor>b__7_0 (UnityEditor.ShortcutManagement.ShortcutArguments)
    27. 0x000001D74DA21F61 (Mono JIT Code) UnityEditor.ShortcutManagement.Trigger:HandleKeyEvent (UnityEngine.Event,UnityEditor.ShortcutManagement.IContextManager)
    28. 0x000001D74DA1E503 (Mono JIT Code) UnityEditor.ShortcutManagement.ShortcutController:HandleKeyEvent (UnityEngine.Event)
    29. 0x000001D74DA1E06B (Mono JIT Code) UnityEditor.ShortcutManagement.ShortcutIntegration:EventHandler ()
    30. 0x000001D74DA1DD9B (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
    31. 0x000001D74599DE25 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    32. 0x00007FFA886ECBB0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
    33. 0x00007FFA88672122 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    34. 0x00007FFA8867B11F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    35. 0x00007FF7E7F05BAE (Unity) scripting_method_invoke
    36. 0x00007FF7E7EFF88D (Unity) ScriptingInvocation::Invoke
    37. 0x00007FF7E7EF9865 (Unity) ScriptingInvocation::Invoke<void>
    38. 0x00007FF7E52D882E (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallGlobalEventHandler
    39. 0x00007FF7E5CBFD81 (Unity) CallGlobalInputEvent
    40. 0x00007FF7E66F9792 (Unity) GUIView::ProcessEventMessages
    41. 0x00007FF7E66F2769 (Unity) GUIView::GUIViewWndProc
    42. 0x00007FFACD9ACA66 (USER32) DispatchMessageW
    43. 0x00007FFACD9AC582 (USER32) DispatchMessageW
    44. 0x00007FF7E66F6D96 (Unity) MainMessageLoop
    45. 0x00007FF7E67009AA (Unity) WinMain
    46. 0x00007FF7E967C602 (Unity) __scrt_common_main_seh
    47. 0x00007FFACB397974 (KERNEL32) BaseThreadInitThunk
    48. 0x00007FFACDCCA271 (ntdll) RtlUserThreadStart


    UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    Code (stacktrace):
    1.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00275] in <6f28216fea9f453abf2e05b770ed3ee4>:0
    2.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <6f28216fea9f453abf2e05b770ed3ee4>:0
    3. 0x00007FF7E7F840EC (Unity) StackWalker::GetCurrentCallstack
    4. 0x00007FF7E7F87551 (Unity) StackWalker::ShowCallstack
    5. 0x00007FF7E66D29A5 (Unity) GetStacktrace
    6. 0x00007FF7E8BE368E (Unity) DebugStringToFile
    7. 0x00007FF7E7FEBD75 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    8. 0x000001D74DE3FE2B (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    9. 0x000001D74DE4FDAB (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    10. 0x000001D74DE4F65E (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    11. 0x000001D7517297DA (Mono JIT Code) UnityEngine.Debug:LogError (object)
    12. 0x000001D74DB121AB (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    13. 0x000001D74DB116EB (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun (bool)
    14. 0x000001D74DB11053 (Mono JIT Code) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    15. 0x000001D74599DE25 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    16. 0x00007FFA886ECBB0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
    17. 0x00007FFA88672122 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    18. 0x00007FFA8867B11F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    19. 0x00007FF7E7EFC3A6 (Unity) CallStaticMonoMethod
    20. 0x00007FF7E7EFBFE9 (Unity) CallStaticMonoMethod
    21. 0x00007FF7E7EFBD71 (Unity) CallStaticMonoMethod
    22. 0x00007FF7E5F02A8F (Unity) BuildPlayerWithLastSettings
    23. 0x00007FF7E5B49C2C (Unity) MenuController::ExecuteMenuItem
    24. 0x00007FF7E5B496DB (Unity) MenuController::ExecuteMainMenuItem
    25. 0x00007FF7E6CF4465 (Unity) EditorApplication_CUSTOM_ExecuteMenuItem
    26. 0x000001D74DAC148E (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorApplication:ExecuteMenuItem (string)
    27. 0x000001D74DAC135B (Mono JIT Code) UnityEditor.ShortcutManagement.MenuItemEntryDiscoveryInfo:<.ctor>b__7_0 (UnityEditor.ShortcutManagement.ShortcutArguments)
    28. 0x000001D74DA21F61 (Mono JIT Code) UnityEditor.ShortcutManagement.Trigger:HandleKeyEvent (UnityEngine.Event,UnityEditor.ShortcutManagement.IContextManager)
    29. 0x000001D74DA1E503 (Mono JIT Code) UnityEditor.ShortcutManagement.ShortcutController:HandleKeyEvent (UnityEngine.Event)
    30. 0x000001D74DA1E06B (Mono JIT Code) UnityEditor.ShortcutManagement.ShortcutIntegration:EventHandler ()
    31. 0x000001D74DA1DD9B (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
    32. 0x000001D74599DE25 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
    33. 0x00007FFA886ECBB0 (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
    34. 0x00007FFA88672122 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    35. 0x00007FFA8867B11F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    36. 0x00007FF7E7F05BAE (Unity) scripting_method_invoke
    37. 0x00007FF7E7EFF88D (Unity) ScriptingInvocation::Invoke
    38. 0x00007FF7E7EF9865 (Unity) ScriptingInvocation::Invoke<void>
    39. 0x00007FF7E52D882E (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallGlobalEventHandler
    40. 0x00007FF7E5CBFD81 (Unity) CallGlobalInputEvent
    41. 0x00007FF7E66F9792 (Unity) GUIView::ProcessEventMessages
    42. 0x00007FF7E66F2769 (Unity) GUIView::GUIViewWndProc
    43. 0x00007FFACD9ACA66 (USER32) DispatchMessageW
    44. 0x00007FFACD9AC582 (USER32) DispatchMessageW
    45. 0x00007FF7E66F6D96 (Unity) MainMessageLoop
    46. 0x00007FF7E67009AA (Unity) WinMain
    47. 0x00007FF7E967C602 (Unity) __scrt_common_main_seh
    48. 0x00007FFACB397974 (KERNEL32) BaseThreadInitThunk
    49. 0x00007FFACDCCA271 (ntdll) RtlUserThreadStart


    I also attached an updated testproject for these latest versions.
     

    Attached Files:

  5. Playcorp

    Playcorp

    Joined:
    Sep 3, 2014
    Posts:
    2
    Any hint about when this AOT update will be released? Entities + Console dev means no builds without it or a workaround.
     
  6. e-khezri

    e-khezri

    Joined:
    Aug 23, 2013
    Posts:
    10
    Hi @sean_unity746

    Thanks for your reply, as our current IL2CPP build is blocked by this error. Can we know when we expect a fix for it? in the meantime, I will appreciate any workaround to resolve the problem.
     
  7. Playcorp

    Playcorp

    Joined:
    Sep 3, 2014
    Posts:
    2
    Workaround was to create a new pseudo Dictionary class that fully implemented IDictionary, then, comment out the IDictionary interface in the class decleration. Next I replaced all useages of Dictionary in the affected assembly def with the new one. This allowed IL2CPP to compile.

    Once the issue is fixed, just remove all references to the dictionary clone and revert them back to the standard dictionary.
     
    e-khezri likes this.
  8. sean_unity746

    sean_unity746

    Unity Technologies

    Joined:
    Sep 19, 2017
    Posts:
    7
    Hey @e-khezri

    Unfortunately I don't have a specific date for a release. We are just about finished with backend changes for managed object serialization and in the polish/testing phase. We are currently going through the process of updating entities and it's dependencies with this new backend. There are quite a few packages which this touches so it likely won't make it in to the next release but hopefully the one after that.
     
    e-khezri, Playcorp and Ham-Dongki like this.
  9. e-khezri

    e-khezri

    Joined:
    Aug 23, 2013
    Posts:
    10
    Thanks for your reply Sean, These are good information to know :) should we expect this update to work with 2019.3?
     
  10. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    64
    Is this the same issue?
    In com.unity.entities@0.5.1-preview.11\Unity.Entities\Types\TypeManager.cs:
    upload_2020-2-14_14-54-43.png
    It's run well in unity editor,but throw a exception when it run in win32(mono).

    The message is:
    Type Unity.Properties.CodeGeneratedPropertyBagRegistry.System_ObjectPropertyBag has invalid vtable method slot 4 with method Unity.Properties.PropertyBag`1<object>:Accept<TVisitor> (object&,TVisitor&,Unity.Properties.ChangeTracker&)
     
    Last edited: Feb 14, 2020 at 9:19 AM
  11. Roycon

    Roycon

    Joined:
    Jul 10, 2012
    Posts:
    39
  12. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    64
unityunity