Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by DigitalCartridge · May 19, 2018 at 07:04 AM · androidbuildil2cpp

IL2CPP freeze while exporting android project in unity 2017.4.2 . Stuck on "Building native binary with IL2CPP"

Hi, I am trying to export an android project using Gradle build system. But the process is stuck at '"Building native binary with IL2CPP.' After a while the memory runs out(on a system with 16GB RAM). I don't see any helpful error messages in the editor. Can anyone please help me out?

In the activity monitor I can see two clang++ process. One of them consuming almost all of my memory.

PS: I tried to export android project of the same unity project on 5.5.2 and 5.6 and they both work. In those ndk-r10e is used where as on unity 2017.4.2f2 ndk-r13b is used.

Attached is the editor log.link text

il2cpp-error.txt (35.4 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by JoshPeterson · May 21, 2018 at 12:34 PM

This looks like a crash in the clang C++ compiler from the Android NDK, unfortunately. Our best option is to try to work around the crash by changing the C# code that is generating the C++ code which clang cannot handle.

You might want to have a look at the /var/folders/j5/nc34t7qs7qx4bw68ktmxbyn80000gn/T/Bulk_Assembly-CSharp-firstpass_2-2c9a71.cpp file, which is the one clang crashed while compiling.

In my experience with these issues, often very large functions (with 10,000 or more local variables) can cause a problem like this. So, it is worth a look though the generated C++ code to see if you find a large function like that. If you do, you can try to break the associated C# method into smaller methods. That might help.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DigitalCartridge · May 21, 2018 at 05:09 PM 0
Share

You are absolutely right! Had a look at the generated file and found that one of my plugins was generating a strangely large function. Removed the plugin and voila! Was able to export the project. :)

avatar image MarMar444 · Feb 12, 2021 at 09:14 AM 0
Share

I know it's like 3 years late xD but do you know I can find this "var/folders/j5/nc34t7qs7qx4bw68ktmxbyn80000gn/T/Bulk_Assembly-CSharp-firstpass_2-2c9a71.cpp file" file? I can't find it inside the project folder, where is it created?

avatar image JoshPeterson MarMar444 · Feb 12, 2021 at 11:41 AM 0
Share

This specific file probably does not exist for your project. Since this post, the what IL2CPP names files has changed as well. You can look for any .cpp file named Assembly-CSharp* in the Unity project directory if you would like to see the generated C++ code for Assembly-CSharp.dll.

avatar image pirottedamien JoshPeterson · Feb 15, 2021 at 03:32 PM 0
Share

And how do you find these large functions in a 25000 line document without spending 3 days?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

249 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

il2cpp.exe error pls help me and solve out my problem 1 Answer

Android building process gets stuck on "Building native binary with IL2CPP" 2 Answers

Can't Build with IL2CPP for Android after 2018.3.0 Update(Empty Project) 1 Answer

Problem with Unity 2018.4.24 on Big Sur 0 Answers

il2cpp.exe didn't catch exception: System.IO.IOException: Access to the path '{path}' is denied. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges