Search Unity

Editor crashes when building assetbundle with ScriptableBuildPipeline

Discussion in 'Asset Bundles' started by Kichang-Kim, Jan 9, 2020.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    463
    Hi. I found that my project always chrashes when building assetbundles with ScriptableBuildPipeline on Mac.

    Unity 2019.2.10f1 + ScriptableBuildPipeline 1.5.4.

    Here is crash log:
    Obtained 74 stack frames.
    #0 0x007fff791e15d1 in _platform_memmove$VARIANT$Ivybridge
    #1 0x000001105a2e13 in BufferMetal::Initialize(void const*, bool)
    #2 0x000001105a2bc0 in GfxDeviceMetal::InitializeBufferInternal(GfxBuffer*, void const*, GfxUpdateBufferFlags)
    #3 0x0000010ef9c705 in CreateOrUpdateBuffer(GfxDevice&, GfxBuffer*&, GfxBufferDesc&, void const*, GfxUpdateBufferFlags, char const*)
    #4 0x0000010effa3e0 in Mesh::CreateMesh()
    #5 0x0000010effffc5 in Mesh::AwakeFromLoad(AwakeFromLoadMode)
    #6 0x0000010df43573 in AwakeFromLoadQueue::InvokePersistentManagerAwake(AwakeFromLoadQueue::Item*, unsigned int, AwakeFromLoadMode)
    #7 0x0000010df432a6 in AwakeFromLoadQueue::persistentManagerAwakeFromLoad(int, AwakeFromLoadMode)
    #8 0x0000010df43073 in AwakeFromLoadQueue::persistentManagerAwakeFromLoad()
    #9 0x0000010deb2d8b in PersistentManager::IntegrateAllThreadedObjects()
    #10 0x0000010deb3c0c in PersistentManager::LoadAndIntegrateAllPreallocatedObjects(PersistentManager::LockFlags)
    #11 0x0000010deb252a in PersistentManager::ReadObject(int, AwakeFromLoadMode)
    #12 0x0000010ca7b436 in PPtr<Mesh>::eek:perator Mesh*() const
    #13 0x0000010ef54756 in MeshRenderer::UpdateCachedMesh()
    #14 0x0000010f002cb7 in MeshFilter::AwakeFromLoad(AwakeFromLoadMode)
    #15 0x0000010df43573 in AwakeFromLoadQueue::InvokePersistentManagerAwake(AwakeFromLoadQueue::Item*, unsigned int, AwakeFromLoadMode)
    #16 0x0000010df432a6 in AwakeFromLoadQueue::persistentManagerAwakeFromLoad(int, AwakeFromLoadMode)
    #17 0x0000010df43115 in AwakeFromLoadQueue::persistentManagerAwakeFromLoad()
    #18 0x0000010deb2d8b in PersistentManager::IntegrateAllThreadedObjects()
    #19 0x0000010deb3c0c in PersistentManager::LoadAndIntegrateAllPreallocatedObjects(PersistentManager::LockFlags)
    #20 0x0000010deb252a in PersistentManager::ReadObject(int, AwakeFromLoadMode)
    #21 0x0000010c99d036 in PPtr<GameObject>::eek:perator GameObject*() const
    #22 0x0000010db00af8 in MergeAllPrefabInstancesDuringLoad(AwakeFromLoadQueue*, TransferInstructionFlags)
    #23 0x0000010f1ec80d in LoadSceneOperation::CompleteAwakeSequence()
    #24 0x0000010f1ec22a in LoadSceneOperation::CompletePreloadManagerLoadSceneEditor()
    #25 0x0000010f1eb7f7 in LoadSceneOperation::IntegrateMainThread()
    #26 0x0000010f1eda57 in PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int)
    #27 0x0000010f1ee420 in PreloadManager::WaitForAllAsyncOperationsToComplete()
    #28 0x0000010db8c685 in EditorSceneManager::RestoreSceneBackups(std::__1::vector<EditorSceneBackup, stl_allocator<EditorSceneBackup, (MemLabelIdentifier)117, 16> >&, EditorSceneManager::playModeChange)
    #29 0x0000010db8be0f in EditorSceneManager::OpenSceneForBuild(core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&)
    #30 0x0000010e25b0c2 in BuildPipeline::WriteSceneSerializedFile(core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, BuildPipeline::WriteCommand const&, BuildPipeline::BuildContentSettings const&, BuildUsageTagGlobal const&, BuildPipeline::BuildUsageTagSet*, BuildPipeline::BuildReferenceMap const&, BuildPipeline::preloadInfo const*, BuildPipeline::SceneBundleInfo const*)
    #31 0x0000010e5cbe72 in ContentBuildInterface_CUSTOM_WriteSceneSerializedFilePlayerData_Injected(ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeStringPtrOpaque*, Marshalling::ManagedObjectForStruct<WriteCommand__>, BuildSettings__ const&, BuildUsageTagGlobal const&, ScriptingBackendNativeObjectPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*, Marshalling::ManagedObjectForStruct<PreloadInfo__>, WriteResult__&)
    #32 0x000018fa5dbbb6 in (wrapper managed-to-native) UnityEditor.Build.Content.ContentBuildInterface:WriteSceneSerializedFilePlayerData_Injected (string,string,string,UnityEditor.Build.Content.WriteCommand,UnityEditor.Build.Content.BuildSettings&,UnityEditor.Build.Content.BuildUsageTagGlobal&,UnityEditor.Build.Content.BuildUsageTagSet,UnityEditor.Build.Content.BuildReferenceMap,UnityEditor.Build.Content.PreloadInfo,UnityEditor.Build.Content.WriteResult&) {0x7fbe5eca0c18} + 0x116 (0x18fa5dbaa0 0x18fa5dbcb3) [0x14f800c80 - Unity Child Domain]
    #33 0x000018fa5db983 in UnityEditor.Build.Content.ContentBuildInterface:WriteSceneSerializedFilePlayerData (string,string,string,UnityEditor.Build.Content.WriteCommand,UnityEditor.Build.Content.BuildSettings,UnityEditor.Build.Content.BuildUsageTagGlobal,UnityEditor.Build.Content.BuildUsageTagSet,UnityEditor.Build.Content.BuildReferenceMap,UnityEditor.Build.Content.PreloadInfo) {0x7fbe599875c0} + 0xe3 (0x18fa5db8a0 0x18fa5dba6c) [0x14f800c80 - Unity Child Domain]
    #34 0x000018fa5db713 in UnityEditor.Build.Content.ContentBuildInterface:WriteSceneSerializedFile (string,string,string,UnityEditor.Build.Content.WriteCommand,UnityEditor.Build.Content.BuildSettings,UnityEditor.Build.Content.BuildUsageTagGlobal,UnityEditor.Build.Content.BuildUsageTagSet,UnityEditor.Build.Content.BuildReferenceMap,UnityEditor.Build.Content.PreloadInfo) {0x7fbe59987548} + 0x713 (0x18fa5db000 0x18fa5db86f) [0x14f800c80 - Unity Child Domain]
    #35 0x000018cf480663 in UnityEditor.Build.Pipeline.WriteTypes.SceneDataWriteOperation:Write (string,UnityEditor.Build.Content.BuildSettings,UnityEditor.Build.Content.BuildUsageTagGlobal) {0x7fbeea8ff8e8} + 0x2b3 (0x18cf4803b0 0x18cf4807ab) [0x14f800c80 - Unity Child Domain]
    #36 0x0000183f42163b in UnityEditor.Build.Pipeline.Tasks.WriteSerializedFiles:Run () {0x7fbeea913ee0} + 0x132b (0x183f420310 0x183f421c43) [0x14f800c80 - Unity Child Domain]
    #37 0x00000153fee6ba in UnityEditor.Build.Pipeline.BuildTasksRunner:Run (System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IBuildContext) {0x7fbeea8f9048} + 0x71a (0x153fedfa0 0x153feea7e) [0x14f800c80 - Unity Child Domain]
    #38 0x00000153fb1063 in UnityEditor.Build.Pipeline.ContentPipeline:BuildAssetBundles (UnityEditor.Build.Pipeline.Interfaces.IBundleBuildParameters,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildContent,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildResults&,System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IContextObject[]) {0x7fbeea8ec4d8} + 0x10d3 (0x153faff90 0x153fb15db) [0x14f800c80 - Unity Child Domain]
    #39 0x00000153fadf3b in UnityEditor.Build.Pipeline.ContentPipeline:BuildAssetBundles (UnityEditor.Build.Pipeline.Interfaces.IBundleBuildParameters,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildContent,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildResults&) {0x7fbeea8ec4b0} + 0x15b (0x153fadde0 0x153fadf95) [0x14f800c80 - Unity Child Domain]
    #40 0x00000153ecb233 in ManagedAssets.Editor.ManagedAssetsAutomation:Run () {0x7fbe8b353080} + 0xad3 (0x153eca760 0x153ecb294) [0x14f800c80 - Unity Child Domain]
    #41 0x00000153ecb435 in (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) {0x7fbef9dc84d0} + 0x165 (0x153ecb2d0 0x153ecb62b) [0x14f800c80 - Unity Child Domain]
    #42 0x00000141ad8098 in mono_jit_runtime_invoke
    #43 0x00000141c99e29 in do_runtime_invoke
    #44 0x00000141c99d87 in mono_runtime_invoke
    #45 0x0000010f7d30b7 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
    #46 0x0000010f7ccf27 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
    #47 0x0000010d48a101 in Application::parseARGVCommands()
    #48 0x0000010d489173 in Application::FinishLoadingProject()
    #49 0x000001107aea3f in -[EditorApplication applicationDidFinishLaunching:]
    #50 0x007fff4d06997a in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
    #51 0x007fff4d0698f4 in ___CFXRegistrationPost_block_invoke
    #52 0x007fff4d06985e in _CFXRegistrationPost
    #53 0x007fff4d071c8d in ___CFXNotificationPost_block_invoke
    #54 0x007fff4cfdac9c in -[_CFXNotificationRegistrar find:eek:bject:eek:bserver:enumerator:]
    #55 0x007fff4cfd9f47 in _CFXNotificationPost
    #56 0x007fff4f27df5b in -[NSNotificationCenter postNotificationName:eek:bject:userInfo:]
    #57 0x007fff4a5f5fc4 in -[NSApplication _postDidFinishNotification]
    #58 0x007fff4a5f5917 in -[NSApplication _sendFinishLaunchingNotification]
    #59 0x007fff4a5f3a6b in -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]
    #60 0x007fff4a5f36bb in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:]
    #61 0x007fff4f2c7b3c in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:]
    #62 0x007fff4f2c79b9 in _NSAppleEventManagerGenericHandler
    #63 0x007fff4e249397 in aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*)
    #64 0x007fff4e248c29 in dispatchEventAndSendReply(AEDesc const*, AEDesc*)
    #65 0x007fff4e248b01 in aeProcessAppleEvent
    #66 0x007fff4c2608b7 in AEProcessAppleEvent
    #67 0x007fff4a5efabd in _DPSNextEvent
    #68 0x007fff4a5ee48b in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
    #69 0x007fff4a5e85a8 in -[NSApplication run]
    #70 0x007fff4a5d7ae8 in NSApplicationMain
    #71 0x000001107ed679 in EditorMain(int, char const**)
    #72 0x000001107ed949 in main
    #73 0x007fff78ff63d5 in start

    In the same project and same build machine, Windows/Mac/Linux assetbundles are built without any issue. Only Android/iOS assetbundle builds are failed.
     
  2. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    463
    Also, when I building assetbundles in Editor, it just works. Only crashes when I executing as batch mode.
     
unityunity