64bit iOS help

I’m having trouble compiling in the editor when switching to IL2CPP. Here is the console error. Hope someone know what this means:

Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed” -l none -c link -x “/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml” -f “/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors” -x “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/…/platform_native_link.xml” -x “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml” -x “/Users/xxxx/Documents/unity/mmorpg/Assets/link.xml” -d “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/BouncyCastle.Crypto.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/Electroserver5-Unity.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/log4net.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/Thrift.dll” -a “/Users/xxxx/Documents/unity/mmorpg/Temp/StagingArea/Data/Managed/P31RestKit.dll”

stdout;
Fatal error in Mono CIL Linker
System.NullReferenceException: Object reference not set to an instance of an object
at UnusedBytecodeStripper2.ResolveFromPreserveAttribute.IsPreserveAttribute (Mono.Cecil.TypeReference arg) [0x00000] in :0
at UnusedBytecodeStripper2.ResolveFromPreserveAttribute.m__6 (Mono.Cecil.CustomAttribute c) [0x00000] in :0
at System.Linq.Enumerable.Any[CustomAttribute] (IEnumerable1 source, System.Func2 predicate) [0x00000] in :0
at UnusedBytecodeStripper2.ResolveFromPreserveAttribute.HasPreserveAttribute (ICustomAttributeProvider type) [0x00000] in :0
at UnusedBytecodeStripper2.ResolveFromPreserveAttribute.Process (Mono.Linker.LinkContext context) [0x00000] in :0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in :0
at Mono.Linker.Driver.Run () [0x00000] in :0
at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in :0
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, String&, String&, String, String) UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable1)
UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable1) UnityEditorInternal.AssemblyStripper:Strip(String[ ], String[ ], String, String, String&, String&, String, String, IEnumerable1)
UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[ ], String[ ], String)
UnityEditorInternal.IL2CPPBuilder:StripAssemblies(IEnumerable1, String) UnityEditorInternal.IL2CPPBuilder:Run() UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry)
UnityEditor.HostView:OnGUI()

@VNL-Entertainment-Games

I’m not entirely sure about the cause of this error. It looks a type which should be preserved (via the [Preserve] attribute) is not being resolved correctly. Likely the assembly where that type exists is cannot be found by the UnusedBytecodeStripper2.exe utility. Do you know if the [Preserve] attribute is being used anywhere?

We use preserve in link.xml. But the good news is once we removed link.xml which was previously required for the game to work, this problem goes away. For some reason we no longer need link.xml and the stripper manages to not break the game. Previously we had the link.xml preserve 3rd party code that if stripped, it won’t work. I don’t know why we no longer need link.xml and the game still works, but I’m not complaining. Still would be interesting to know why… Maybe the stripper isn’t even working in Unity?

@VNL-Entertainment-Games

In general, the stripper is working, but maybe there is an issue in this specific case. I’ve suspect that maybe the link.xml file was referencing a type that does not exist, and the stripper should have just skipped it, but continued to try to resolve it. If you are able to submit a bug report with the link.xml file so we can reproduce the issue, we would love to correct it. Although since things are working now, it’s fine if you also don’t.

I will submit it, in case it returns and bites be in the back down the road. Could you please provide me the url to report this bug?

@VNL-Entertainment-Games

Please use Help > Report a Bug in the Unity editor. That will get it to us!