Playmaker Forum
Bug Reporting => PlayMaker Bug Reporting => Topic started by: Padenlee on May 28, 2019, 12:01:12 PM
-
Hey humans, bug hunter extraordinaire here!
I've been trying to test the new PUN 2 actions and found this other bug. When combining ARKit and Datamaker I get this bug shown below, I tried a few different methods for a work around and here is the result:
Unity 2019.1.1f1
In both attempts I had to switch "Stripping Runtime Version" to .NET 4.x Equivalent to get around a Text Mesh Pro error.
attempted1.
Unity ARKit projet download:https://bitbucket.org/Unity-Technologies/unity-arkit-plugin/src/default/
Unity ARKit Project(Build)>playmaker(Build)>DataMaker(Build error)
attempted 2.
Export UnityARKitPlugin folder from Unity ARKit downloaded project.
Fresh project>Playmaker>DataMaker(Build)>Import ARKit UnityARKitPlugin folder(Build error)
I'm trying to help test the Pun 2 actions Jean has been working hard on and I love mixing AR and multiplayer, so I thought I'd give it a try and found this bug. I'm wondering if it has to do with the linker file?
IL2CPP error for type 'Newtonsoft.Json.Serialization.DefaultContractResolver' in assembly '/Users/padenpierry/Local My Documents/Unity/AR Shooter/Temp/StagingArea/Data/Managed/Newtonsoft.Json.dll'
Additional information: Interface Newtonsoft.Json.Serialization.IContractResolver method Newtonsoft.Json.Serialization.JsonContract Newtonsoft.Json.Serialization.IContractResolver::ResolveContract(System.Type) not implemented on non-abstract class Newtonsoft.Json.Serialization.DefaultContractResolver
Failed running /Applications/Unity/Hub/Editor/2019.1.1f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --profiler-report --map-file-parser="/Applications/Unity/Hub/Editor/2019.1.1f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/padenpierry/Local My Documents/Unity/AR Shooter/Temp/StagingArea/Data/Managed" --generatedcppdir="/Users/padenpierry/Local My Documents/Unity/AR Shooter/Temp/il2cppOutput/il2cppOutput"
stdout:
IL2CPP error for type 'Newtonsoft.Json.Serialization.DefaultContractResolver' in assembly '/Users/padenpierry/Local My Documents/Unity/AR Shooter/Temp/StagingArea/Data/Managed/Newtonsoft.Json.dll'
Additional information: Interface Newtonsoft.Json.Serialization.IContractResolver method Newtonsoft.Json.Serialization.JsonContract Newtonsoft.Json.Serialization.IContractResolver::ResolveContract(System.Type) not implemented on non-abstract class Newtonsoft.Json.Serialization.DefaultContractResolver
il2cpp.exe didn't catch exception: System.Exception: Interface Newtonsoft.Json.Serialization.IContractResolver method Newtonsoft.Json.Serialization.JsonContract Newtonsoft.Json.Serialization.IContractResolver::ResolveContract(System.Type) not implemented on non-abstract class Newtonsoft.Json.Serialization.DefaultContractResolver
at Unity.IL2CPP.Metadata.VTableBuilder.ValidateInterfaceMethodSlots(TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, List`1 slots)
at Unity.IL2CPP.Metadata.VTableBuilder.VTableForType(TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, Int32 currentSlot)
at Unity.IL2CPP.Metadata.VTableBuilder.VTableFor(TypeReference typeReference)
at Unity.IL2CPP.Metadata.VTableBuilder.IndexFor(MethodDefinition method)
at Unity.IL2CPP.MethodBodyWriter.VirtualCallFor(IGeneratedMethodCodeWriter writer, MethodReference method, MethodReference unresolvedMethod, IEnumerable`1 args, TypeResolver typeResolver, IRuntimeMetadataAccess runtimeMetadataAccess, VTableBuilder vTableBuilder)
at Unity.IL2CPP.MethodBodyWriter.CallExpressionFor(MethodReference callingMethod, MethodReference unresolvedMethodToCall, MethodCallType callType, List`1 argsFor, Func`2 addUniqueSuffix, Boolean emitNullCheckForInvocation)
at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction(Node node, InstructionBlock block, Instruction& ins)
at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive(Node node)
at Unity.IL2CPP.MethodBodyWriter.Generate()
at Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
at Unity.IL2CPP.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)
at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method, IMethodCollector methodCollector, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder, SharedMethodCollector sharedMethodCollector, ISequencePointProvider sequencePointCollector)
at Unity.IL2CPP.SourceWriter.<>c__DisplayClass7_0.<WriteMethodSourceFiles>b__0(IGeneratedMethodCodeWriter writer, TypeReference type)
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)
at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`2 writeItemAction, SourceWritingContext sourceWritingContext)
at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, Boolean writeMarshalingDefinitions)
at Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, AssemblyDefinition assemblyDefinition, IMethodCollector methodCollector)
at Unity.IL2CPP.AssemblyConverter.Apply()
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)
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)
stderr:
Unhandled Exception: System.Exception: Interface Newtonsoft.Json.Serialization.IContractResolver method Newtonsoft.Json.Serialization.JsonContract Newtonsoft.Json.Serialization.IContractResolver::ResolveContract(System.Type) not implemented on non-abstract class Newtonsoft.Json.Serialization.DefaultContractResolver
at Unity.IL2CPP.Metadata.VTableBuilder.ValidateInterfaceMethodSlots(TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, List`1 slots)
at Unity.IL2CPP.Metadata.VTableBuilder.VTableForType(TypeDefinition typeDefinition, Dictionary`2 interfaceOffsets, Int32 currentSlot)
at Unity.IL2CPP.Metadata.VTableBuilder.VTableFor(TypeReference typeReference)
at Unity.IL2CPP.Metadata.VTableBuilder.IndexFor(MethodDefinition method)
at Unity.IL2CPP.MethodBodyWriter.VirtualCallFor(IGeneratedMethodCodeWriter writer, MethodReference method, MethodReference unresolvedMethod, IEnumerable`1 args, TypeResolver typeResolver, IRuntimeMetadataAccess runtimeMetadataAccess, VTableBuilder vTableBuilder)
at Unity.IL2CPP.MethodBodyWriter.CallExpressionFor(MethodReference callingMethod, MethodReference unresolvedMethodToCall, MethodCallType callType, List`1 argsFor, Func`2 addUniqueSuffix, Boolean emitNullCheckForInvocation)
at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction(Node node, InstructionBlock block, Instruction& ins)
at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive(Node node)
at Unity.IL2CPP.MethodBodyWriter.Generate()
at Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(IGeneratedMethodCodeWriter bodyWriter, IRuntimeMetadataAccess metadataAccess)
at Unity.IL2CPP.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)
at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method, IMethodCollector methodCollector, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder, SharedMethodCollector sharedMethodCollector, ISequencePointProvider sequencePointCollector)
at Unity.IL2CPP.SourceWriter.<>c__DisplayClass7_0.<WriteMethodSourceFiles>b__0(IGeneratedMethodCodeWriter writer, TypeReference type)
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)
at Unity.IL2CPP.SourceWriter.WriteEqualSizedChunks[T](NPath outputDir, IEnumerable`1 items, String fileName, Int64 chunkSize, Action`2 writeItemAction, SourceWritingContext sourceWritingContext)
at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, Boolean writeMarshalingDefinitions)
at Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, AssemblyDefinition assemblyDefinition, IMethodCollector methodCollector)
at Unity.IL2CPP.AssemblyConverter.Apply()
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)
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)
at Program.Main(String[] args)
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:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:494)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Exception: /Applications/Unity/Hub/Editor/2019.1.1f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll 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.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:494)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
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/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:833)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:655)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessorSettings postProcessorSettings, UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:601)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:48)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:52)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
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/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
-
Hi,
ok, try to remove the Newtonsoft.Json.Net20 dll inside PlayMaker DataMaker/Plugins, it's likely the cause of the issue.
If that doesn't work, I'll try on my end as well.
Bye,
Jean
-
I can confirm this works! Also, I had to delete some JSON actions that also threw some errors. Builds perfect now.
-
FYI for others -- I had the same issue because some Datamaker actions & IL2CPP are not compatible, while they are compatible on MONO as a scripting backend.
Keep an eye out for ConvertJsonStringToXmlNode.cs and ConvertXmlNodeToJson.cs as offending actions if you do switch to IL2CPP.
If anybody wants to update those actions to work without the addon, that would be swell!
-
Hi,
yes, I'll get on this to make DataMaker compatible.
Bye,
Jean
-
FYI for others -- I had the same issue because some Datamaker actions & IL2CPP are not compatible, while they are compatible on MONO as a scripting backend.
Keep an eye out for ConvertJsonStringToXmlNode.cs and ConvertXmlNodeToJson.cs as offending actions if you do switch to IL2CPP.
If anybody wants to update those actions to work without the addon, that would be swell!
Hi,
can you give more infos on Unity version, build target, etc because Everything works fine here, even on the latest 2019.3 beta
IL2CPP has been around for a long time now, and I am not aware of any specific issues with that. I would think that it's either a corrupted project or a conflict with another asset probably.
(https://i.imgur.com/5xjHMaa.png)
Bye,
Jean
-
I used datamaker from here: https://hutonggames.fogbugz.com/default.asp?W1133
Unity 2019.1.8f1. I also used the datamaker with JSON support because I was pulling data from XML and JSON files and storing in arrays. Worked fine in editor, switched to android and when building it would eventually produce those errors if IL2CPP is enabled.
-
Hi,
Can you update datamaker from the ecosystem, it should be fixed now.
also, if you don't use json at all, make sure you delete the json folder inside PlayMaker, the last build was featuring the json support, where it should have only be in the dedicated json package.
Bye,
Jean