Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Can't build using il2cpp on windows 8.1 v2020.3

Discussion in 'Android' started by Marks4, Apr 15, 2021.

  1. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    521
    The il2cpp.exe process starts using a lot of CPU, like over 80%, and then it starts to go lower until it reaches 0% and never goes up. When the process doesn't get stuck, it spawns a bunch of "clang++.exe" processes, and that's when I know it worked. But it just fails too often. How do I fix this? How do I even kill the il2cpp process? I can't kill it no matter what I do.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    When it is stuck, can you use Task Manager to generate a dump file for the il2cpp.exe process? That will include all of the threads running in the process and hopefully allow us to analyze it.
     
  3. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    521
    @JoshPeterson Okay. Do you know a way to kill the process without needing to restart the computer? Or how to delete the Library/il2cpp_android_arm64-v8a and Library/Il2cppBuildCache folders without restarting the computer. Every time I interrupt the build when the process gets stuck, I need to restart the computer to be able to delete those folders and build again. If I don't delete those folders I get an error, and if I try to delete them without restarting the computer I get a message saying that I can't because something else is using the folders, but I don't know what.

    I am trying to create the dump file, but apparently it's stuck lol. Does it take a while?
     
  4. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    521
    Yup I can't create a dump. When it succeeds, I get a message like this immediately:
    upload_2021-4-16_14-38-59.png

    il2cpp stays like this forever:
    upload_2021-4-16_14-39-32.png
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I'm not sure why the dump file cannot be created. Maybe wait longer though - I don't now how long it should take.

    To be able to delete those files, you will likely need to kill all clang++.exe processes on the machine. You can do that via the command line like this:

    taskkill /F /IM clang++.exe /T
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Can you take a look at how much memory il2cpp.exe uses when it hangs?
     
  7. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    521
    @JoshPeterson

    Almost 2GB.

    The clang++ processes are not spawned when il2cpp hangs. However I will give it a go.

    I'm trying to get a dump with process explorer.

    Ah windows is so beautiful, process explorer hanged trying to create a dump for il2cpp.
     
  8. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    521
    This time it will build, the clang++ processes were spawned. They use up 99% of the CPU. I know it fails if after 2 minutes no clang++ process was spawned and il2cpp.exe is using 0% of the CPU.
    upload_2021-4-16_16-30-18.png
     
  9. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    521
    @JoshPeterson the dump file has almost 2GB, I can't upload!
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Can you upload it to Google Drive (or something similar) and share the link with me via a private message?
     
  11. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    Is this a regression that started only on 2020.3? 2020.1 never did this?

    Does the issue occur already when building an empty project?
     
  12. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    521
    Yes it happens on an empty project as well. The default URP template with WebGL target can fail. I can't find a pattern though. After building multiple times it starts to hang, and it becomes increasingly difficult to successfully build.

    @jukka_j Never, ever. 2020.1 is safe to me. But 2020.3 onwards it can hang. Happened on multiple projects, with WebGL and Android targets. 2021 same thing. At this point I gave up and I'm stuck with 2020.1.

    If you can tell me a way to kill the il2cpp process and be able to rebuild without having to restart the computer, that already helps.

    Here's another related thread: https://forum.unity.com/threads/can...ain-after-you-cancel-it.1070354/#post-6908816
     
    Last edited: May 25, 2021