- Home /
Flash: The file 'MemoryStream' is corrupted! when Instantiate CharacterMotor
Hi, I'm having a problem with the flash export in Unity 3.5
When running the game in the flash content debugger and I try and Instantiate a prefab containing a CharacterMotor component I get this message.
The file 'MemoryStream' is corrupted! Remove it and launch unity again!
[Position out of bounds!]
LogCallStackError
at com.unity::UnityNative$/Ext_Flash_LogCallstack()
at com.unity::UnityNative$/_Z17DebugStringToFilePKciS0_iiii()
at com.unity::UnityNative$/_ZN12CachedReader16OutOfBoundsErrorEjj()
at com.unity::UnityNative$/_ZN12CachedReader4ReadEPvj()
at com.unity::UnityNative$/_ZN18StreamedBinaryReadILb0EE21TransferSTLStyleArrayI13dynamic_arrayI11KeyframeTplIfEEEEvRT_17TransferMetaFlags()
at com.unity::UnityNative$/ReadAnimationCurveAndReturnPtr()
at UnityEngine.Serialization::SerializedStateReader/ReadAnimationCurve()
at global::CharacterMotorMovement/Deserialize()[C:\Users\Gick\Development\Unity Projects\FlashTest\Temp\StagingArea\Data\ConvertedDotNetCode\global\CharacterMotorMovement.as:66]
at UnityEngine.Serialization::SerializedStateReader/ReadIDeserializable()
at global::CharacterMotor/Deserialize()[C:\Users\Gick\Development\Unity Projects\FlashTest\Temp\StagingArea\Data\ConvertedDotNetCode\global\CharacterMotor.as:369]
at UnityEngine.Serialization::ActionScriptDeserializer$/Deserialize()
at com.unity::UnityNative$/Ext_DeserializeMonoBehaviour()
at com.unity::UnityNative$/_ZN13MonoBehaviour23VirtualRedirectTransferER18StreamedBinaryReadILb0EE()
at com.unity::UnityNative$/_ZL15CloneObjectImplP6ObjectR10vector_mapIllSt4lessIlE13stl_allocatorISt4pairIllEL18MemLabelIdentifier93ELi4EEE()
at com.unity::UnityNative$/Object_CUSTOM_Internal_CloneSingle()
at UnityEngine::_Object$/Object_Internal_CloneSingle_Object()
at UnityEngine::_Object$/Object_Instantiate_Object()
at global::Spawner/Spawner_Update()[C:\Users\Gick\Development\Unity Projects\FlashTest\Temp\StagingArea\Data\ConvertedDotNetCode\global\Spawner.as:22]
at com.unity::UnityNative$/Ext_Flash_InvokeMethodOnObject()
at com.unity::UnityNative$/_ZN13MonoBehaviour16CallUpdateMethodEi()
at com.unity::UnityNative$/_ZN13MonoBehaviour6UpdateEv()
at com.unity::UnityNative$/_ZN20BaseBehaviourManager12CommonUpdateI16BehaviourManagerEEvv()
at com.unity::UnityNative$/_ZN16BehaviourManager6UpdateEv()
at com.unity::UnityNative$/_Z10PlayerLoopbb()
at com.unity::UnityNative$/NativeExt_PlayerLoop()
at com.unity::UnityContentInternal/playerLoop()
at com.unity::UnityContent/onEnterFrame()
I'm planning on getting round it for now by creating all of the required CharacterMotor containing objects in the editor and then enabling them at run time but I would like a better solution.
Thanks in advance.
n.b. I've tried this in both c# and js, using the flash content debugger 11.2.
I've also created an example project (download here) showing the problem, you will need to build a swf and then run it in the content debugger...
Here is how I fixed it. Go to Build Settings, then Player Settings, select Other Settings, then go to Bundle Identifier. When you get there, delete the text that is in Bundle Identifier.
.
Your answer
Follow this Question
Related Questions
Are coroutines freezing my game? 0 Answers
Stop Editor From Crashing 1 Answer