Search Unity

Bug Editor Crash with The file 'MemoryStream' is corrupted! Remove it and launch unity again!

Discussion in 'Asset Importing & Exporting' started by planternfish, Nov 7, 2022.

  1. planternfish

    planternfish

    Joined:
    Apr 15, 2019
    Posts:
    8
    Editor Crash!!! only in editor!!! on importing assets process!!!
    reopen editor can reslove ,so i dont know how to reproduce it.
    it happens on importing assets when i open my project after pull or checkout my branch.
    my unity crash log often stop on same asset,after reopen it i found the asset's icon become white and the hierarchy window show nothing,reimport can resolve

    its not always happen,i fail everytime i try to reproduce (._.`)

    MOST IMPORTANTLY, IT CAN SHOW UP SERVAL TIMES A DAY!

    so can somebody tell me how to reslove or avoid it (._.`)

    <・ )))><<
    i post on editor page but i found maybe here s better,so i do copy and paste

    ========== OUTPUTTING STACK TRACE ==================

    0x00007FF678315FAF (Unity) DebugStringToFilePostprocessedStacktrace
    0x00007FF67831598B (Unity) DebugStringToFile
    0x00007FF6770BB191 (Unity) CachedReader::OutOfBoundsError
    0x00007FF6770BF88A (Unity) CachedReader::UpdateReadCache
    0x00007FF6775D7D04 (Unity) StreamedBinaryRead::Transfer<std::vector<MonoPPtr,stl_allocator<MonoPPtr,1,16> > >
    0x00007FF677603DD9 (Unity) Transfer_UnityEngineObject<StreamedBinaryRead,1>
    0x00007FF6775DEEE8 (Unity) TransferField_LinearCollection<SafeBinaryRead>
    0x00007FF675B821F6 (Unity) ExecuteSerializationCommands<SafeBinaryRead>
    0x00007FF675B8D977 (Unity) TransferScriptingObject<StreamedBinaryRead,0>
    0x00007FF6775833D7 (Unity) MonoBehaviour::VirtualRedirectTransfer
    0x00007FF675C191FB (Unity) ReadObjectFromVector
    0x00007FF675856D73 (Unity) ApplyPrefabStateAndPropertyModificationsToObjects
    0x00007FF675863717 (Unity) MergePrefabChanges
    0x00007FF675819662 (Unity) MergePrefabInternal
    0x00007FF675817907 (Unity) MergeAllPrefabInstancesDuringLoad
    0x00007FF6753314B9 (Unity) PrefabImporter::GenerateAssetData
    0x00007FF675E66D0E (Unity) ImportToObjects
    0x00007FF675E64A9E (Unity) ImportAsset
    0x00007FF675DF1530 (Unity) AssetImportWorker::Import
    0x00007FF675DDAC43 (Unity) AssetImportManager::ImportInProcess
    0x00007FF675DD9BFD (Unity) AssetImportManager::Import
    0x00007FF675E645A0 (Unity) ImportAndPostprocessOutOfDateAssets
    0x00007FF675E6FC8B (Unity) RefreshInternalV2
    0x00007FF675E74DD6 (Unity) StopAssetImportingV2
    0x00007FF675E704E6 (Unity) RefreshV2
    0x00007FF675D35C11 (Unity) AssetDatabase::Refresh
    0x00007FF6752EAC61 (Unity) Application::AutoRefresh
    0x00007FF675CAC6C0 (Unity) ContainerWindow::ContainerWndProc
    0x00007FFC8A075C1D (USER32) CallWindowProcW
    0x00007FFC8A0757EC (USER32) DispatchMessageW
    0x00007FFC8A081F83 (USER32) IsWindowVisible
    0x00007FFC8A780C14 (ntdll) KiUserCallbackDispatcher
    0x00007FFC877510C4 (win32u) NtUserPeekMessage
    0x00007FFC8A0794F2 (USER32) PeekMessageW
    0x00007FFC8A079AE9 (USER32) PeekMessageA
    0x00007FF675CB621E (Unity) MainMessageLoop
    0x00007FF675CC0B58 (Unity) WinMain
    0x00007FF678DEABF2 (Unity) __scrt_common_main_seh
    0x00007FFC89FB7C24 (KERNEL32) BaseThreadInitThunk
    0x00007FFC8A74D721 (ntdll) RtlUserThreadStart
     
  2. planternfish

    planternfish

    Joined:
    Apr 15, 2019
    Posts:
    8
    sometimes i use AssetDatabase.LoadAssetAtPath<GameObject>("xxx") and unity crash

    ========== OUTPUTTING STACK TRACE ==================
    0x00007FF678315FAF (Unity) DebugStringToFilePostprocessedStacktrace
    0x00007FF67831598B (Unity) DebugStringToFile
    0x00007FF6770BB191 (Unity) CachedReader::OutOfBoundsError
    0x00007FF6770BF88A (Unity) CachedReader::UpdateReadCache
    0x00007FF6775D7D04 (Unity) StreamedBinaryRead::Transfer<std::vector<MonoPPtr,stl_allocator<MonoPPtr,1,16> > >
    0x00007FF677603DD9 (Unity) Transfer_UnityEngineObject<StreamedBinaryRead,1>
    0x00007FF6775DEEE8 (Unity) TransferField_LinearCollection<SafeBinaryRead>
    0x00007FF675B821F6 (Unity) ExecuteSerializationCommands<SafeBinaryRead>
    0x00007FF675B8D977 (Unity) TransferScriptingObject<StreamedBinaryRead,0>
    0x00007FF6775833D7 (Unity) MonoBehaviour::VirtualRedirectTransfer
    (-------------------<・ )))><<----------------------)
    0x00007FF676BFED0A (Unity) CloneObjectImpl
    0x00007FF676C00C83 (Unity) InstantiateObject
    0x00007FF676C00AF2 (Unity) InstantiateObject
    0x00007FF6777164BE (Unity) Object_CUSTOM_Internal_InstantiateSingleWithParent_Injected
    0x0000025DF2A3EDEB (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Object:Internal_InstantiateSingleWithParent_Injected (UnityEngine.Object,UnityEngine.Transform,UnityEngine.Vector3&,UnityEngine.Quaternion&)
    0x0000025DF2A3EC6B (Mono JIT Code) UnityEngine.Object:Internal_InstantiateSingleWithParent (UnityEngine.Object,UnityEngine.Transform,UnityEngine.Vector3,UnityEngine.Quaternion)
    0x0000025DF2A3E993 (Mono JIT Code) UnityEngine.Object:Instantiate (UnityEngine.Object,UnityEngine.Vector3,UnityEngine.Quaternion,UnityEngine.Transform)

    i found infos above (----<・ )))><<------) are similar to the importing crash's stack trace.
    maybe there is some common point between them but its sad that i dont know how to figure it out
     
  3. planternfish

    planternfish

    Joined:
    Apr 15, 2019
    Posts:
    8
    reopen unity and found the prefab ,it looks good ,no missing ,not warning ,not error.
     
  4. planternfish

    planternfish

    Joined:
    Apr 15, 2019
    Posts:
    8
    The file 'MemoryStream' is corrupted! Remove it and launch unity again!
    [Position out of bounds!]
    (Filename: C:\buildslave\unity\build\Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 214)

    any ideas about what happened on line 214 of CachedReader,anyone?
     
  5. planternfish

    planternfish

    Joined:
    Apr 15, 2019
    Posts:
    8
    in this case ,sometimes the script value attached to prefabs reset to default value also after i checkout or pull others commits.
    such as the value turn into none of enum field
    absolutely,reimport the prefab can solve
    but the problem is i dont how many prefabs have issue until they print error (._.`)
     
  6. Illia_Komendantov

    Illia_Komendantov

    Unity Technologies

    Joined:
    Jan 27, 2015
    Posts:
    5
    Hi planternfish,
    What Unity version do you use?
    The easiest way is to make a bug report, even if you could not reliably reproduce the issue yourself.
    Or you could attach the Editor log and problematic asset with its dependencies here.
    this one probably.
    1. Right click on the asset and click on "Select Dependencies"
    ==> There might be a few assets selected
    2. Right click on any of them again and choose "Export package" from context menu
    ==> It will create <name>.unitypackage file.
    If you attach this file here, we could try to repro it on our side.
     
  7. planternfish

    planternfish

    Joined:
    Apr 15, 2019
    Posts:
    8
    thanks for reply ,i had make a bug report as your suggession
    and our version is 2019.4.40