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. Dismiss Notice

Question compiling c for il2cpp(arm64) stucked

Discussion in 'Android' started by daocidi, Feb 12, 2023.

  1. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    it's happened when i build a new 3D mobile project without any code.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    In other threads, people mentioned BitDefender blocking il2cpp compilation, do you by chance have it enabled?
     
  3. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    i 'll check it.that means i should disable all my virus defender?
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    You have more than one? You dont need to disable them, just add exclusion folders for Unity and your project.
     
  5. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    Windows defender and another one.i uninstalled the other one and disable windows firewall, but it still happen.
    bu the way,it happens on 3D mobile project(android) , not happen on 3D (windows).
     
  6. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Hmph, can you check the Task Manager if there's any activity while it's stuck?
     
  7. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    yes, clang++ still running!
     
  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Does it consume any CPU? Forgot to ask which Unity version is this?
     
  9. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    yes.unity version is 2023.1.0.0a21
     
  10. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    I cannot say what the compiler is doing so long. But one way to investigate this. Is to export gradle project and check if there are really big il2cpp cpp generated files. Try building then from Android Studio
     
  11. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    Failed to connect to cdp.cloud.unity3d.com port 443 after 105209 ms: Timed out
    can you tell me why this happened?
     
  12. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    I don't, but a thing to check if you can ping cdp.cloud.unity3d.com
     
  13. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    i can't ping cdp.cloud.unity3d.com
     
  14. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    Are you behind a firewall? Or behind a proxy server?
     
  15. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    i closed my windows firewall ,have not proxy server.
     
  16. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    i upload my editor.log file, can you help me to find where is the problem?
     

    Attached Files:

  17. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    It says the compiler is crashing D:\Program Files\Unity\Hub\Editor\2023.1.0a21\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.

    Since the compiler is handled by Google, I can't answer with certainty what's wrong, but in many log messages, it mentions memory related errors, so maybe you're running out of memory?

    Do you have virtual memory setup on your machine? How much RAM do you have?
     
  18. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    16GB RAM
     
  19. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    this is another editor.log. i really need your help.this issue stucked me for a long time. i can't make grogress.
     

    Attached Files:

  20. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    A guess.

    I see your windows display language is set to Chinese, try setting the display language to English US, delete <unityproject>\Library\Bee folder and try building again.
     
  21. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    I set the display language to English US and build a new project 3D Mobile.
    this is the editor.log below.
     

    Attached Files:

  22. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Hi @daocidi

    Looking in the logs it appears that ApiUpdater.MovedFromExtractor.exe is crashing but, for some reason, no crash details is being logged.

    Can you do me a favor?

    Open your project in Unity and then, after you get the error (with the project still open), look in your log for a line similar to:

    "D:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\Tools\netcorerun\netcorerun.exe" "D:/Program Files/Unity/Hub/Editor/2021.3.21f1c1/Editor/Data/Tools/ScriptUpdater/ApiUpdater.MovedFromExtractor.exe" "Library\Bee\artifacts\mvdfrm\Unity.TextMeshPro.ref.dll_84A4293DBDD182DB.mvfrm" "Library\Bee\artifacts\1900b0aE.dag\Unity.TextMeshPro.ref.dll"

    then, in a terminal, run:
    1. "CD to your project folder"
    2. dir "Library\Bee\artifacts\1900b0aE.dag\Unity.TextMeshPro.ref.dll" (replacing 1900b0aE.dag with the actual value from your log)
    too see if this file exists.

    If the file does exist, next step is to run the program, i.e, the line you found in your log (again replacing the values with the ones from your log):
    1. "set UNITY_APIUPDATER_LOG_THRESHOLD= Debug"

    2. "D:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\Tools\netcorerun\netcorerun.exe" "D:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\Tools\ScriptUpdater\ApiUpdater.MovedFromExtractor.exe" "Library\Bee\artifacts\mvdfrm\Unity.TextMeshPro.ref.dll_84A4293DBDD182DB.mvfrm" "Library\Bee\artifacts\1900b0aE.dag\Unity.TextMeshPro.ref.dll"
    and report what the output to me.

    Also, are you willing to run a custom version of ApiUpdater.MovedFromExtractor.exe ? If so, I can prepare a version
    with even more logging enabled.

    Best

    Adriano
     
  23. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    Hi@Adriano
    i am very glad that you are here to help me !!! thank you so much!
    as you told me, i open my project, but the error not happen.
    then i create a new project , the error happend ,in log, it show like that
    /additionalfile:"Library/Bee/artifacts/1300b0aE.dag/Unity.Rider.Editor.AdditionalFile.txt"
    ##### Custom Environment Variables
    DOTNET_MULTILEVEL_LOOKUP=0
    ##### ExitCode
    -1073740940
    [362/374 0s] MovedFromExtractorCombine Library/Bee/artifacts/1300b0aE.dag/Unity.PlasticSCM.Editor.dll.mvfrm
    ##### CommandLine
    "D:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\Tools\netcorerun\netcorerun.exe" "D:/Program Files/Unity/Hub/Editor/2021.3.21f1c1/Editor/Data/Tools/ScriptUpdater/ApiUpdater.MovedFromExtractor.exe" "Library/Bee/artifacts/1300b0aE.dag/Unity.PlasticSCM.Editor.dll.mvfrm" "@Library/Bee/artifacts/1300b0aE.dag/Unity.PlasticSCM.Editor.dll.mvfrm.rsp"
    ##### ExitCode
    -1073740940
    *** Tundra build failed (1.72 seconds), 266 items updated, 374 evaluated

    i found the file "Library/Bee/artifacts/1300b0aE.dag/Unity.PlasticSCM.Editor.dll.mvfrm.rsp" exsits.

    i run the project.the log show below:

    i'd like to run a cunstom version of ApiUpdater.MovedFromExtractor.exe in order to get more log.
     

    Attached Files:

  24. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Hi

    Please, follow the instructions below (keep in mind that the modified version should not be used in production, only use it while we are trying to find out the issue):
    1. Backup your Unity installation (or install to a new machine/folder)
    2. Extract https://drive.google.com/file/d/1Mu7lvT-R3OaKsVMmNbRf6YVYA0vgR2wd/view?usp=sharing to a folder
    3. Copy the 2 extracted files to Unity_Folder\Editor\Data\Tools\ScriptUpdater
    4. From a console
      1. set UNITY_APIUPDATER_LOG_THRESHOLD=Debug
      2. Lanch Unity from the console (so it will observe the environment variable above)
      3. Reproduce the issue
    5. Report the Editor log and the contents of all files passed as arguments to ApiUpdater.MovedFromExtractor.exe back to me (you can send me a direct message if you don't want/cant attach these files in this thread)
    Thanks

    Adriano
     
  25. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    the log and the files are below.
    thanks very much
     

    Attached Files:

  26. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Based on the latest log you posted it looks like netcorerun.exe ("D:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\Tools\netcorerun\netcorerun.exe") is falling.

    Questions/comments:

    1. Have you tried to run on other machines?

    2. what happens if you try to run

    "D:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\Tools\netcorerun\netcorerun.exe" "D:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\Tools\ScriptUpdater\ApiUpdater.MovedFromExtractor.exe"


    in a console (cmd.exe or powershell) ?

    It should print something like:
    Invalid command line arguments. Expected `path of output file` and `paths of assemblies to process` and. Got 0 args.

    If it does not print that, what does it print and what is the program exit code? You can find the program exit code by executing one of the following commands just after trying to run the command line above:

    echo %errorlevel%
    (if you are using cmd.exe) or
    echo $LASTEXITCODE
    (if you are using powershell)

    3. You may also configure your system to collect a crashdump for "netcorerun.exe" following the steps below (please, either do not create the value DumpType or set it to 1)

    https://learn.microsoft.com/en-ca/windows/win32/wer/collecting-user-mode-dumps?redirectedfrom=MSDN

    then do the steps to reproduce the issue and collect any generated crashdumps and share them with me.

    Best
     
  27. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    Hi, i try your step 2, and get the print below.
    it's show some deffience here.
     

    Attached Files:

  28. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Sorry not answering before.

    Thanks for the information but unfortunately that is not what I am looking for. Quoting myself:

    What I`d like you to do is to run `ApiUpdater.MovedFromExtractor.exe` through `netcorerun.exe` , or in other words,

    "D:\Program Files\Unity\Hub\Editor\2021.3.21f1c1\Editor\Data\Tools\netcorerun\netcorerun. exe” “D:\Program Files\Unity\Hub\Editor\2021.3.21f1C1\Editor\Data\Tools\ScriptUpdater \ApiUpdater.MovedFromExtractor. exe”

    (note that I extracted the paths from the image you posted above and I may have mistyped something so you may need to adjust it)
     
  29. daocidi

    daocidi

    Joined:
    Feb 12, 2023
    Posts:
    17
    upload_2023-5-7_16-0-46.png
    it print like what you said.

    what i do next?
    best wishes to you.
     
  30. AdrianoVerona_Unity

    AdrianoVerona_Unity

    Unity Technologies

    Joined:
    Apr 11, 2013
    Posts:
    317
    Thanks.. that gives us more info but unfortunately without being able to reproduce it locally is very likely that I'll not be able to help you.

    That said, what about items 1 & 3 from a previous msg? Can you reproduce this in some other machine? And, can you try to collect a crash dump and share with me?

    Best

    Adriano