Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Fatal error in Unity CIL Linker

Discussion in 'Android' started by harveyspectrepro, Jun 23, 2022.

  1. harveyspectrepro

    harveyspectrepro

    Joined:
    Apr 14, 2020
    Posts:
    1
    After upgrading to editor 2021.3.4f1 , I started to get 2 errors below when building the app


    Building Library\Bee\artifacts\Android\ManagedStripped failed with output:
    C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed --out=Library/Bee/artifacts/Android/ManagedStripped --include-link-xml=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed\MethodsToPreserve.xml --include-link-xml=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-link-xml=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed\SerializedTypes.xml --include-link-xml=C:\Users\DELL\Documents\MEGAsync Downloads\TRAFFIC.IO\Traf\Temp\burst.link.xml --include-link-xml=C:\Users\DELL\Documents\MEGAsync Downloads\TRAFFIC.IO\Traf\Assets\UnityAds\link.xml --include-link-xml=C:/Program Files/Unity/Hub/Editor/2021.3.4f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/AndroidNativeLink.xml --include-directory=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed --dotnetprofile=unityaot-linux --dotnetruntime=Il2Cpp --platform=Android --use-editor-options --enable-engine-module-stripping --engine-modules-asset-file=C:/Program Files/Unity/Hub/Editor/2021.3.4f1/Editor/Data/PlaybackEngines/AndroidPlayer/modules.asset --editor-data-file=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --include-unity-root-assembly=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll --include-unity-root-assembly=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed/ToonyColorsPro2.Demo.dll --include-unity-root-assembly=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed/KinoBloom.Runtime.dll --include-unity-root-assembly=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed/Unity.RenderPipelines.Core.Runtime.dll --include-unity-root-assembly=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll --include-unity-root-assembly=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed/ToonyColorsPro.Runtime.dll --include-unity-root-assembly=C:/Users/DELL/Documents/MEGAsync Downloads/TRAFFIC.IO/Traf/Temp/StagingArea/Data/Managed/TextMeshPro-2017.3-Runtime.dll --print-command-line
    Fatal error in Unity CIL Linker
    Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: TMPro.TMP_InputField.CreateCursorVerts(): Error processing method 'TMPro.TMP_InputField.CreateCursorVerts()' in assembly 'TextMeshPro-2017.3-Runtime.dll'
    ---> Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.Vector2 UnityEngine.UIVertex::uv0
    at Mono.Linker.Steps.MarkStep.HandleUnresolvedField(FieldReference reference)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference, DependencyInfo reason)
    at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction, MethodDefinition method, Boolean& requiresReflectionMethodBodyScanner)
    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
    at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    --- End of inner exception stack trace ---
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
    at Mono.Linker.Steps.MarkStep.Process()
    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
    at Unity.Linker.UnityDriver.RunDriver()
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)






    BuildFailedException: Incremental Player build failed!
    UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <36f62d8e760b48f7af5d32916f997ce1>:0)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <36f62d8e760b48f7af5d32916f997ce1>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <c3a2c42a45424b88b29dfadf7f497cbb>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <36f62d8e760b48f7af5d32916f997ce1>:0)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
     
  2. wanglifang

    wanglifang

    Joined:
    Jul 12, 2018
    Posts:
    5
    Building Library\Bee\artifacts\Android\ManagedStripped failed with output:
    Fatal error in Unity CIL Linker
    Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: System.Windows.Forms.Control.get_Font(): Error processing method 'System.Windows.Forms.Control.get_Font()' in assembly 'System.Windows.Forms.dll'
    ---> System.NullReferenceException: Object reference not set to an instance of an object.
     
  3. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,679
    I think System.Windows.Forms are not supported in Unity platforms.
     
  4. wanglifang

    wanglifang

    Joined:
    Jul 12, 2018
    Posts:
    5
    But I don't used System.Windows.Forms in my project,I searched "System.Windows.Form" in project,can only find urp contains it,but it was be annotated
    Code (CSharp):
    1.  
    2. // use_lines: Enables open path clipping. Adds a very minor cost to performance.
    3. #define use_lines
    4.  
    5. using System;
    6. using System.Collections.Generic;
    7. //using System.Text;          //for Int128.AsString() & StringBuilder
    8. //using System.IO;            //debugging with streamReader & StreamWriter
    9. //using System.Windows.Forms; //debugging to clipboard
    10.  
    11. namespace UnityEngine.Rendering.Universal
    12. {
     
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,679
    I assume you have an assembly which references System.Windows.Form
     
  6. Xozyain

    Xozyain

    Joined:
    Jun 16, 2017
    Posts:
    10
    Did you fixed this issue? Thank you
     
  7. andrewing2009

    andrewing2009

    Joined:
    Nov 28, 2021
    Posts:
    2
    Hi, maybe you succeeded to fix the problem?

    In any case, if anyone has a solution, it would be very helpful to post any feedback here. Thank you.