Search Unity

Bug Can't create IL2CPP build with Custom Metadata in string table entry

Discussion in 'Localization Tools' started by ashwinFEC, Feb 8, 2021.

  1. ashwinFEC

    ashwinFEC

    Joined:
    May 19, 2013
    Posts:
    49
    Hello,

    When I try to create a standalone Windows IL2CPP build (x86 and x86_64) with my localizations with a custom metadata I get this error:

    Code (CSharp):
    1. Exception: Failed running C:\Program Files\Unity\Hub\Editor\2020.2.3f1\Editor\Data\il2cpp\build/deploy/netcoreapp3.1/UnityLinker.exe @"E:/GameDev/Test game/Test/Temp/StagingArea/Data/Managed/response.rsp"
    2.  
    3. stdout:
    4. Fatal error in Unity CIL Linker
    5. Mono.Linker.Steps.XmlResolutionException: Failed to process XML description: E:\GameDev\Test game\Test\Assets\StreamingAssets\aa\AddressablesLink\link.xml
    6.  ---> System.ArgumentException: Name can not be empty
    the rest of the error message:
    Code (CSharp):
    1. at Mono.Cecil.AssemblyNameReference.Parse(String fullName)
    2.    at Mono.Linker.Steps.ResolveFromXmlStep.GetAssemblyName(XPathNavigator nav)
    3.    at Unity.Linker.Steps.Resolution.UnityResolveFromXmlStep.GetAssemblyName(XPathNavigator nav)
    4.    at Unity.Linker.Steps.Resolution.UnityResolveFromXmlStep.ProcessAssemblies(LinkContext context, XPathNodeIterator iterator)
    5.    at Mono.Linker.Steps.ResolveFromXmlStep.Process()
    6.    --- End of inner exception stack trace ---
    7.    at Mono.Linker.Steps.ResolveFromXmlStep.Process()
    8.    at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
    9.    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    10.    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    11.    at Mono.Linker.Pipeline.Process(LinkContext context)
    12.    at Unity.Linker.UnityDriver.UnityRun(ILogger customLogger)
    13.    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger)
    14.    at Unity.Linker.UnityDriver.RunDriver()
    15. stderr:
    16.   at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00190] in <a936841cea2147a2a55ea27843fa46ae>:0
    17.   at UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x0005d] in <a936841cea2147a2a55ea27843fa46ae>:0
    18.   at UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (System.Collections.Generic.IEnumerable`1[T] args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) [0x0005e] in <a936841cea2147a2a55ea27843fa46ae>:0
    19.   at UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String& output, System.String& error, System.Collections.Generic.IEnumerable`1[T] linkXmlFiles, UnityEditorInternal.UnityLinkerRunInformation runInformation) [0x0032e] in <a936841cea2147a2a55ea27843fa46ae>:0
    20.   at UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (UnityEditorInternal.UnityLinkerRunInformation runInformation) [0x0012b] in <a936841cea2147a2a55ea27843fa46ae>:0
    21.   at UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, UnityEditorInternal.BaseUnityLinkerPlatformProvider unityLinkerPlatformProvider, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, UnityEditor.RuntimeClassRegistry rcr, UnityEditor.ManagedStrippingLevel managedStrippingLevel) [0x00018] in <a936841cea2147a2a55ea27843fa46ae>:0
    22.   at UnityEditorInternal.IL2CPPBuilder.Run () [0x000a3] in <a936841cea2147a2a55ea27843fa46ae>:0
    23.   at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001c] in <a936841cea2147a2a55ea27843fa46ae>:0
    24.   at DesktopStandalonePostProcessor.RunIL2CPP (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, System.Collections.Generic.List`1[T] cppPlugins) [0x0001c] in <a936841cea2147a2a55ea27843fa46ae>:0
    25.   at DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) [0x000a4] in <a936841cea2147a2a55ea27843fa46ae>:0
    26.   at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00015] in <a936841cea2147a2a55ea27843fa46ae>:0
    27. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    28.   at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00070] in <a936841cea2147a2a55ea27843fa46ae>:0
    29.   at UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00001] in <a936841cea2147a2a55ea27843fa46ae>:0
    30.   at 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) [0x000dc] in <a936841cea2147a2a55ea27843fa46ae>:0
    31. UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, String[], Boolean)
    32. UnityEditor.DefaultBuildMethods:BuildPlayer(BuildPlayerOptions)
    33. UnityEditor.BuildPlayerWindow:CallBuildMethods(Boolean, BuildOptions)
    34. UnityEditor.BuildPlayerWindow:GUIBuildButtons(IBuildWindowExtension, Boolean, Boolean, Boolean, BuildPlatform)
    35. UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings()
    36. UnityEditor.BuildPlayerWindow:OnGUI()
    37. UnityEditor.HostView:InvokeOnGUI(Rect, Rect)
    38. UnityEditor.DockArea:DrawView(Rect, Rect)
    39. UnityEditor.DockArea:OldOnGUI()
    40. UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect, Action, Boolean)
    41. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect, Action, Boolean)
    42. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Action, Boolean)
    43. UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Boolean)
    44. UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw(EventBase, Boolean, Boolean)
    45. UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI(EventBase, Boolean, Boolean)
    46. UnityEngine.UIElements.IMGUIContainer:HandleEvent(EventBase)
    47. UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase(EventBase)
    48. UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent(EventBase, IPanel)
    49. UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies(EventBase, IPanel, Boolean)
    50. UnityEngine.UIElements.EventDispatcher:ProcessEvent(EventBase, IPanel)
    51. UnityEngine.UIElements.EventDispatcher:ProcessEventQueue()
    52. UnityEngine.UIElements.EventDispatcher:OpenGate()
    53. UnityEngine.UIElements.EventDispatcherGate:Dispose()
    54. UnityEngine.UIElements.EventDispatcher:ProcessEvent(EventBase, IPanel)
    55. UnityEngine.UIElements.EventDispatcher:Dispatch(EventBase, IPanel, DispatchMode)
    56. UnityEngine.UIElements.BaseVisualElementPanel:SendEvent(EventBase, DispatchMode)
    57. UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel)
    58. UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent(Int32, IntPtr, Boolean&)
    59. UnityEngine.UIElements.UIEventRegistration:ProcessEvent(Int32, IntPtr)
    60. UnityEngine.UIElements.<>c:<.cctor>b__1_2(Int32, IntPtr)
    61. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    62.  

    I think it's related to the fact that the link.xml file in /Assets/StreamingAssets/aa/AddressablesLink is incorrect.

    Code (csharp):
    1.  
    2. <linker>
    3.   <assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
    4.     <type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
    5.   </assembly>
    6.   <assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
    7.     <type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
    8.     <type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
    9.     <type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
    10.     <type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
    11.     <type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
    12.   </assembly>
    13.   <assembly fullname="Unity.Localization, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
    14.     <type fullname="UnityEngine.Localization.Locale" preserve="all" />
    15.     <type fullname="UnityEngine.Localization.Tables.SharedTableData" preserve="all" />
    16.     <type fullname="UnityEngine.Localization.Tables.StringTable" preserve="all" />
    17.     <type fullname="UnityEngine.Localization.Tables.DistributedUIDGenerator" preserve="nothing" serialized="true" />
    18.   </assembly>
    19.   <assembly fullname="UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
    20.     <type fullname="UnityEditor.MonoScript" preserve="all" />
    21.   </assembly>
    22.   <assembly>
    23.     <type fullname="Test.Metadata.StringArrayMeta" preserve="nothing" serialized="true" />
    24.   </assembly>
    25. </linker>
    26.  
    As you can see the fullname in the assembly tag relating to my custom metadata is missing. Do you want me to file a bug report? Or is this a known issue?

    I'm using 0.10.0 and Addressables and Scritable Build Pipeline packages are on the latest version
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    Hi,
    Yes it looks like it could be a stripping related bug.
    Could you file a bug report?
    Thanks
     
  3. ashwinFEC

    ashwinFEC

    Joined:
    May 19, 2013
    Posts:
    49
    I have filed a bug report. The case file number is 1313158
     
    karl_jones likes this.