Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
1
Question by Ray-Pendergraph · Mar 11, 2011 at 03:47 PM · crashassetbundlememory

Max Bundle Size

Are there limits (practical or documented) that exist for building asset bundles. We have a situation where last year we were running out of memory (heap, presumably not physical) during building. We have since taken much of the assets and stored them in a set of asset bundles that are built from the command line with headless Unity. We are now running into memory problem again and I am wondering if we are just abusing the build pipeline or is there a bug. Again, these machines have 16GB of RAM so this is not physical memory.

What is different about the bundle that started causing the problem is that there are a lot of character prefabs that have a fair amount of FBXs that were added. The nature of the character models have not changed they are just more complex. This is actually one of our smaller bundles size wise, but the others do not contain the characters. Here is the asset bundle build preamble....

Textures 6.5 mb 1.3% Meshes 402.7 mb 78.5% Animations 20.2 mb 3.9% Sounds 10.4 mb 2.0% Shaders 28.6 kb 0.0% Other Assets 71.4 mb 13.9% Levels 0.0 kb 0.0% Scripts 0.6 kb 0.0% Included DLLs 0.0 kb 0.0% File headers 1.8 mb 0.3% Complete size 513.0 mb 100.0%

... ... ...

Unity(22120,0xa0742540) malloc: mmap(size=537911296) failed (error code=12) error: can't allocate region *** set a breakpoint in malloc_error_break to debug Out of memory! UnityEditor.BuildPipeline:BuildAssetBundleInternal(Object, Object[], String[], String, BuildAssetBundleOptions, BuildTarget) UnityEditor.BuildPipeline:BuildAssetBundleExplicitAssetNames(Object[], String[], String, BuildAssetBundleOptions, BuildTarget) AssetBundleExportTool:Export(BundleModel) (at Assets/Editor/AssetBundleExportTool.cs:289) AssetBundleExportTool:ExportBundles(IEnumerable`1) (at Assets/Editor/AssetBundleExportTool.cs:116) AssetBundleExportTool:Update() (at Assets/Editor/AssetBundleExportTool.cs:249) System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&) System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) System.Reflection.MethodBase:Invoke(Object, Object[]) UnityEditor.HostView:Invoke(String, Object) UnityEditor.HostView:Invoke(String) UnityEditor.HostView:SendUpdate() UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

[/Applications/buildAgent/work/71ca6fec1b41cc30/Projects/../Editor/Src/Application.cpp line 2139] (Filename: Assets/Editor/AssetBundleExportTool.cs Line: 289)

Edit: 3/22 Absolutely no word from Unity either way on this bug. I am almost certain that it has something to do with the animations. We have had more failures on other bundles now and in ever case can be traced back to a commit that made the bundle include a character with many prefabs. 20 MB does not sound like a ton of animations though.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Daniel-Brauer · Oct 17, 2011 at 11:21 PM

I just ran into this error myself, and was able to work around it by creating a series of smaller bundles instead of one large one. From the Editor.log, it looks like Unity is running out of memory during or just after LZMA compression. As with your situation, I don't think physical memory should be an issue here, but at least the issue can be worked around.

It's quite possible that you've discovered this yourself, but you'll want to push dependencies with each successive bundle to avoid duplication of assets.

Comment
Add comment · 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
0

Answer by kirpigiller · Jul 04, 2013 at 06:50 AM

Don't know is the problem actual now, but... Making of a bundle with such size - is absolutely out of unity bundles ideology. You will change one mesh - and what? download 500Mb pack again?

Anyway, your problem could be solved like this: start a fresh unity (i.e. run unity in batchmode with a "build something" script) for each building step. I build my project in 6 steps.

Your 16Gb of phisical memory is enough. That ~1.7Gb(32bit) or ~2.8Gb(64 bit) that Unity has on Windows - is not enough. Vote for 64bit Unity if you wish

Comment
Add comment · 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

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

2 People are following this question.

avatar image avatar image

Related Questions

unexpected massive memory allocation on iOS while loading maps 1 Answer

Help when playing in Editor , Big memory Leak/problem 0 Answers

iOS Memory Handling Crash on Startup 0 Answers

why UnloadUnusedAssets doesn't unload a asset? 0 Answers

Editor crash after editing in a better computer 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