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

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??

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”

any info on this?

I can’t find an entry in the bug database for this. Please can you file a bug report (menu: Help > Report A Bug).

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

GameObject asset = Instantiate((GameObject)MyLoadAssetFunc(...));
class_member = asset.GetComponent<ComponentType>();
MyUnloadAssetFunc(...)

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

I would love to know what this problem is.

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

I also get this issue! Just wanted to +1.

I have this problem too now… any new information about this?

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.

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.

+1

Asset bundles keep me up at night

+1

+1 same issue, different reasons (I believe)
plus this: Trying to reload asset from disk error - Questions & Answers - Unity Discussions
plus that: Why exactly we have to rebuild the bundle when updating Unity? - Questions & Answers - Unity Discussions

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.

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.

Hello,

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

QualitySettings.SetQualityLevel( quality, true );

I get this error too…

I get this error too and its been a while…

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

Thanks

3 years later and this errors still here, with no help/fix/info. Love that support Unity.

It has been fixed in Unity 4…

Unfortunately its not feasible to move 18 months of development onto a new version…