- Home /
The file 'MemoryStream' is corrupted!
Hi, i am having some problems with bundles, getting the error below
25/6/2010 16:45:10 [ERROR] {Unity} The file 'MemoryStream' is corrupted! Remove it and launch unity again!
[Position out of bounds!] UnityEngine.Object:Internal_CloneSingle(Object)
UnityEngine.Object:Internal_CloneSingle(Object)
UnityEngine.Object:Instantiate(Object)
...
This occurs when i call the instantiate of some prefab that have been loaded from a bundle file.
Has Anybody already seen this? Any idea of how i can solve this problem?
Thanks.
We just had this today in Unity 4.5.4. Likely a busted prefab, we think.
Answer by Lucas Meijer 1 · Jun 26, 2010 at 12:34 AM
This looks like a bug. If it reproduces, could you be so kind to send it to us using UnityMenu->Help->Report a problem? Thanks, Lucas
Answer by Lloyd_RedironLabs · Dec 08, 2015 at 10:56 PM
FYI, I hit this today. Submitted the bug to Unity, but unless they grab the extended folders I doubt they can replicate it easily.
I have a project that I had to move from Unity 5.2 back to Unity 5.1. Unsure if thats part of the cause.
Everything has been working great. However, today as part of my testing, I had to flood a response back to our web component. This involved creating a MASSIVE string until everything crashed.
When it crashed, I had the error appear:
The file "MemoryStream" is corrupted! [Invalid Positions!]
Or something therein. Launching the project would generate this error a whole ton of times. And the scene would say the timestamps are invalid, and wipe the references for every single file in the scene. No matter how many times I reset the scene or dumped the changes in sourcetree it would replicate it self.
Further, there is no MemoryStream file. So what I did was delete the Libraries folder, obj folder, cleared all temp files, and for safety re-installed Unity 5.1.4.
Launching the scene everything is back to working order. I highly suspect, that just wiping the Library folder would resolve this for most people, but remember to make sure not to save the scene file (File>Save inside the editor) if you see this error, or the scene will save with missing references.
Answer by ialex32x · Feb 16, 2012 at 11:22 AM
I also encountered the same problem when loading assetbundle. and it seems that it only happens in WebPlayer
Answer by grobm · Oct 11, 2016 at 05:22 AM
I got the same error in Windows project settings, build in on the Vive Multiplayer Unity 5.4.1, submitted bug... and will try said delete files method.
Thanks
-Mark
Answer by talibjan · Nov 20, 2020 at 01:09 PM
I got the same error in Windows project settings, build in on the Unity 2018.4.25f when i import some assets and it loading the assemblies expediently i closed vs 2019 community then it show me the error Unloading broken assembly Library/ScriptAssemblies/Assembly-CSharp.dll, this assembly can cause crashes in the runtime
show this and unity closed