Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Trying to reload asset from disk that is not stored on disk

Discussion in 'Editor & General Support' started by GVGiu, May 18, 2010.

  1. GVGiu

    GVGiu

    Joined:
    May 18, 2010
    Posts:
    4
    We've been working with unity for some time and we use asset-bundles for our content, recently we noticed this log on unity repeating itself a lot:
    well, you get the point, anyways, when this happen it is common that the game ends up crashing, but it doesn't happen all the time, so it's hard to know what's happening

    anyone had this problem already, dealt with it or is still fighting it??
     
  2. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    255
    Hi,

    I get this error when I stop the editor from playing

    I use

    asset_bundles.Unload(false);

    after all the requests to the asset bundle are executed.

    The game works just fine, it's just when I stop the editor that I get this error.

    If i don't call the Unload I get another error instead "Deleting persistent object without writing it first: customassetbundle-87ffe8b44f170d248a0448936433eb1b"
     
  3. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    255
    any info on this?
     
  4. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    I can't find an entry in the bug database for this. Please can you file a bug report (menu: Help > Report A Bug).
     
  5. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    255
    still have to open the bug, I'm currently investigating the causes and I've found out that is because I'm storing a component of the instantiated object in a class member.

    my code is something like

    Code (csharp):
    1.  
    2. GameObject asset = Instantiate((GameObject)MyLoadAssetFunc(...));
    3. class_member = asset.GetComponent<ComponentType>();
    4. MyUnloadAssetFunc(...)
    5.  
    if I comment out the GetComponent part it works without error so I don't really understand what i causing the problem...

    if i comment out the UnloadFunc e leave the instantiate only i get this error instead:

    Deleting persistent object without writing it first: customassetbundle-cea26ef9aae316340a2c57821b507c45
     
    Last edited: Jan 16, 2011
  6. Evan-Greenwood

    Evan-Greenwood

    Joined:
    Aug 6, 2008
    Posts:
    97
    I would love to know what this problem is.

    I also get it when I call AssetBundle.Unload(false) after instantiating.
     
  7. floky

    floky

    Joined:
    Oct 6, 2010
    Posts:
    258
    I also get this issue! Just wanted to +1.
     
  8. DerWoDaSo

    DerWoDaSo

    Joined:
    May 25, 2009
    Posts:
    131
    I have this problem too now... any new information about this?
     
  9. caardappel

    caardappel

    Joined:
    Oct 17, 2009
    Posts:
    7
    Just a note, I've made this error go away by using AssetBundle.Unload(false); BEFORE the object I've instantiated has been destroyed. This, however, was causing a memory leak. Now I wait for the object to be destroyed and use AssetBundle.Unload(true); and the error "Deleting persistent..." has returned.
     
  10. Steven-Walker

    Steven-Walker

    Joined:
    Oct 27, 2010
    Posts:
    38
    I've also encountered the error "Trying to reload asset from disk..." after changing Unload(true) to Unload(false). I found that when set to true, my objects were getting destroyed immediately without calling OnDestroy. Using Unload(false) corrected that, but now has created this new issue. I've set it back to Unload(true) and added a yield statement to wait for the destroy to finish. Not an ideal solution, but it works.
     
  11. DanTreble

    DanTreble

    Joined:
    Aug 31, 2010
    Posts:
    590
    +1

    Asset bundles keep me up at night
     
  12. chwu

    chwu

    Joined:
    Jan 6, 2012
    Posts:
    3
  13. Cawas

    Cawas

    Joined:
    Jan 14, 2010
    Posts:
    121
    +1 same issue, different reasons (I believe)
    plus this: http://answers.unity3d.com/questions/17581/trying-to-reload-asset-from-disk-error.html
    plus that: http://answers.unity3d.com/questions/272367/why-exactly-we-have-to-rebuild-the-bundle-when-upd.html

    In our case, it started happening after fixing some upgrading Unity from 3.5.0b6 to 3.5.2f2 bundle bugs and it still happens in that 1 PC where the bugs were fixed plus in another fresh PC, on the tablet and on the mac - but it has no side effect other than flooding the Logs.

    Also it returns me a slightly different second line: C:/BuildAgent/work/.../Runtime/Serialize/PersitentManager.cpp at line: 1115 - probably because it's a newer Unity version.

    Bug Report was already submitted, andeeee. You probably can reproduce it there.
     
  14. jsp7355

    jsp7355

    Joined:
    Jul 19, 2012
    Posts:
    1
    I got this error if I kept references to objects in an AssetBundle (obtained through Load, LoadAll, etc). If I instead Instantiate the object and keep that one around, I don't get the error.
     
  15. sirival

    sirival

    Joined:
    Sep 14, 2011
    Posts:
    146
    Hello,

    I am getting this error in the web player when I am running

    Code (csharp):
    1.  
    2. QualitySettings.SetQualityLevel( quality, true );
    3.  
     
    Last edited: Nov 12, 2012
  16. ForrestX

    ForrestX

    Joined:
    Apr 17, 2010
    Posts:
    94
    I get this error too...
     
  17. ZenithCode

    ZenithCode

    Joined:
    Jul 26, 2012
    Posts:
    42
    I get this error too and its been a while...

    Where can I see the status of a Unity defect please?

    Thanks
     
  18. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    210
    3 years later and this errors still here, with no help/fix/info. Love that support Unity.
     
  19. ForrestX

    ForrestX

    Joined:
    Apr 17, 2010
    Posts:
    94
    It has been fixed in Unity 4...
     
  20. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    210
    Unfortunately its not feasible to move 18 months of development onto a new version...
     
  21. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    Same as on my side.

    OSX 10.7.5, Unity3D 4.0.1f2


    I got this error when I build asset bundle which contains prefabs:

     
  22. Taphos

    Taphos

    Joined:
    Dec 5, 2012
    Posts:
    11
    Got the same error with unity 4.2.1
    According to our statistics this is number one reason of the game crashes.

    We use asset bundles containing prefabs with asset dependencies.

    Unity, please help!
     
  23. sirival

    sirival

    Joined:
    Sep 14, 2011
    Posts:
    146
    This still happens for us in version 4.2.0. When we build a standalone window or OSX player we get this error when we change our quality settings:

    Code (csharp):
    1.  
    2. Trying to reload asset from disk that is not stored on disk
    3. (Filename:  Line: 1022)
    4.  
    We are using asset bundles for character customizations pretty much exactly like Unity's character customization example.
     
  24. jvil

    jvil

    Joined:
    Jul 13, 2012
    Posts:
    263
    Are you referencing AssetBundles on static variables?
     
  25. sirival

    sirival

    Joined:
    Sep 14, 2011
    Posts:
    146
    Possibly. Why?
     
  26. jvil

    jvil

    Joined:
    Jul 13, 2012
    Posts:
    263
    That's possibly the problem. Try don't reference AssetBundles on static variables as probably they aren't cleaned up correctly when unloading assets.
     
  27. sirival

    sirival

    Joined:
    Sep 14, 2011
    Posts:
    146
    I don't really understand the error message. Why would asset bundles be unloaded / reloaded when the quality settings change? And I am storing asset bundles in static data structures but that doesn't make sense that they are not unloaded why would that be the case?
     
  28. jimmikaelkael

    jimmikaelkael

    Joined:
    Apr 27, 2015
    Posts:
    612
    I know this thread is not new, but I'm getting this error with unity 5.1.3f1 build on standalone platform.
    This error is triggered by one of my script when it tries to change the quality level from good to simple (this doesn't happen when changing from Fantastic to Beautiful, for example):

    Code (csharp):
    1.  
    2. QualitySettings.SetQualityLevel (2);
    3.  
    Any ideas ?
     
  29. FIveTip

    FIveTip

    Joined:
    Jul 11, 2014
    Posts:
    1
    I am also getting this message. I believe it only happens when the Texture Quality changes from Full Res to Half Res and vice versa. Can anyone confirm? Any solution floating around yet?
     
  30. sadajpe

    sadajpe

    Joined:
    Sep 19, 2015
    Posts:
    1
    I'm getting this error with unity 5.2.1p1 build on ios
     
  31. Jordi-Bonastre

    Jordi-Bonastre

    Unity Technologies

    Joined:
    Jul 6, 2015
    Posts:
    102
  32. navi2121

    navi2121

    Joined:
    Sep 17, 2015
    Posts:
    10
    This got same problem, but if change Texture Quality from HALF to FULL.
    From FULL to half - working!

    UPD: correct. From HALF to FULL game crashed (Standart Windows 32bit EXE)
     
  33. lodendsg

    lodendsg

    Joined:
    Sep 1, 2012
    Posts:
    203
    Anyone track down what the message actually means; we are getting this when setting the AudioConfiguration which occurs on game start e.g. to change SpeakerMode.

    This doesn't seem to happen in a build only in the editor, it also doesn't seem to actually cause any issues other then 10 or 15 messages on start of simulation but we would like to know.

    What does "Trying to reload asset from disk that is not stored on disk" mean
    In particular in the context of UnityEngine.AudioSettings.Reset(AudioConfiguration);
    where AudioConfiguration is
    aConfig = AudioSettings.GetConfiguration();
    aConfig.SpeakerMode = [users indicated preference]
     
  34. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    240
    We're also getting this recently. No idea what's causing it though, but the errors are always preceded by this:
    Code (csharp):
    1.  
    2. Default audio device was changed, but the audio system failed to initialize it (No errors.). Attempting to reset sound system.
    3. (Filename: Line: 38)
    4.  
    5. Trying to reload asset from disk that is not stored on disk
    6. (Filename: Line: 1027)
    7.  
    And then it's gonna spam that second error for a while. This is on Unity 5.3.5p3, but hasn't always been happening with this version it seems. One of the reports claims it happens when disconnecting their USB audio device.

    How can we even find out what's causing this as there's no trace again?

    Regards,
    Chris
     
  35. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    240
    Anything?
     
  36. Jordi-Bonastre

    Jordi-Bonastre

    Unity Technologies

    Joined:
    Jul 6, 2015
    Posts:
    102
  37. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    240
    Jordi-Bonastre likes this.
unityunity