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
0
Question by Stygian65 · Sep 11, 2020 at 12:16 AM · loadlevelasyncbundleaddressload asset

Addressables.LoadAssetAsync freezes unity editor 2019.4

I have recently gone through the journey of converting my project to load assets via the Addressables system.

For some reason, most of the time when I load my dungeonAsset, Unity will freeze.

I then have to kill Unity and reload my project and it is a massive mission.

     [SerializeField] public AssetReference dungeonAsset;
 
     public IEnumerator CreateRoutine(int dungeonID, int dungeonSize) {
         new GameObject("===========Dungeon===========");
 
         AsyncOperationHandle<GameObject> handle
             = Addressables.LoadAssetAsync<GameObject>(dungeonAsset);
 
         Debug.Log("It breaks here half the time");
         yield return handle;
 
         if (handle.Status == AsyncOperationStatus.Succeeded) {
             GameObject dungeon = handle.Result;
   



I am considering upgrading my project to 2018.4 LTS version I upgraded my project to the latest LTS version, and am still experiencing the problem.


I supsect there might be some kind of deadlock happening
In the meanwhile, I have replace the above code with the following, which works every time.

     ResourceRequest req = Resources.LoadAsync<Dungeon>("DungeonHack");
     yield return req;


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

5 Replies

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

Answer by Stygian65 · Dec 05, 2020 at 10:44 AM

I found the issue yes. It has nothing to do with addressables.

The asset I was trying to load had a chance of creating a memory leak - i.e. one of my procedural generation methods got called infinitely and that is what caused the editor to freeze.

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
1

Answer by Driven · Nov 21, 2020 at 11:34 PM

I have the same problem, it happens after the second time the game is launched and the remote assets should be cached. Then if multiple assets get loaded at the same time the editor or the phone just freezes with 0% cpu usage. Did you find any solution?

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 Noblauch · Jan 13, 2021 at 11:57 AM

We have the same problem, it is not with every group and seems to be completely random. We even tried with a new group and empty game objects as assets, still freezes after the second time loading. What I found out so far:

  • If the asset needs to be downloaded, it always works.

  • The first time you open Unity it always works (remote or cached)

  • If you add some kind of delay in front of the Addressables load function (even one frame is enough) it always works.

We tried 2 full days to find a fix, but nothing was able to prevent these crashes, so we did the only thing that worked: add the stupid delay. Probably will encounter this again if another team member uses these functions in an odd place where we have to implement the delay again.

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 iyed · Mar 01, 2021 at 01:04 AM

@Noblauch im having the exact same issue, were you able to figure it out?

Comment
Add comment · Show 2 · 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 Noblauch · Mar 01, 2021 at 10:04 AM 0
Share

No, we kept the delay, as hard as it sounds.

avatar image iyed · Mar 02, 2021 at 12:13 AM 0
Share

Thanks for the reply, i'll keep you updated if i find any solution for the issue

avatar image
0

Answer by CodeBombQuinn · Mar 04, 2021 at 08:32 PM

I went ahead and created a new Forum post in the Addressables forums. I know the unity team watches that pretty closely.

https://forum.unity.com/threads/2019-4-lts-unity-freezes-when-trying-to-load-asset-from-cached-bundles.1069187/

I mentioned how I got the fix there as well which was essentially to load assets one at a time.

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

137 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

Related Questions

How can I cast as a game object? Addressable LoadResourceLocationsAsync locationsAsync 1 Answer

Addressables.InitializeAsync no work run time 0 Answers

Addressables.ClearDependencyCacheAsync Exception 0 Answers

Unity fails to include .bundle for native code plugin when building Intel Mac player. 0 Answers

fail build ScriptableObject into bundle 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