コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】Assertion failed on expression: 'it != m_SendMap.end()'

概要

Unity の Project ウィンドウで画像を選択したら
Unity エディタが強制終了する現象に遭遇した

Assertion failed on expression: 'it != m_SendMap.end()'

=================================================================
    Native Crash Reporting
=================================================================
Got a segv while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x290b474f8 - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/Frameworks/MonoBleedingEdge/MonoEmbedRuntime/osx/libmonobdwgc-2.0.dylib : mono_dump_native_crash_info
    0x290b09a7c - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/Frameworks/MonoBleedingEdge/MonoEmbedRuntime/osx/libmonobdwgc-2.0.dylib : mono_handle_native_crash
    0x290a92230 - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/Frameworks/MonoBleedingEdge/MonoEmbedRuntime/osx/libmonobdwgc-2.0.dylib : mono_sigsegv_signal_handler_debug
    0x1a69274a4 - /usr/lib/system/libsystem_platform.dylib : _sigtramp
    0x102934558 - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/MacOS/Unity : _ZN18TcpProtobufSession8EndBatchEj
    0x102923e20 - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/MacOS/Unity : _ZN4core16mutable_functionIFvvEE9DispatchTIZN9IOService10PostHelperIZN17AcceleratorClient19ScheduleNextRequestEvE4$_15EEvOT_NS4_25WrapCallableInFunctionTagEEUlvE_E8DispatchEv
    0x1029841ac - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/MacOS/Unity : _ZN4asio6detail18completion_handlerIN4core16mutable_functionIFvvEEENS_10io_context19basic_executor_typeINSt3__19allocatorIvEELj0EEEE11do_completeEPvPNS0_19scheduler_operationERKNS8_10error_codeEm
    0x10296b7f0 - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/MacOS/Unity : _ZN4asio6detail9scheduler10do_run_oneERNS0_27conditionally_enabled_mutex11scoped_lockERNS0_21scheduler_thread_infoERKNSt3__110error_codeE
    0x10296b344 - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/MacOS/Unity : _ZN4asio6detail9scheduler3runERNSt3__110error_codeE
    0x10296f61c - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/MacOS/Unity : _ZN9IOService3RunEb
    0x10296ec90 - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/MacOS/Unity : _ZN9IOService4Impl14ThreadFunctionEPv
    0x1013b8ab4 - /Applications/Unity/Hub/Editor/2022.1.11f1/Unity.app/Contents/MacOS/Unity : _ZN6Thread16RunThreadWrapperEPv
    0x1a691026c - /usr/lib/system/libsystem_pthread.dylib : _pthread_start
    0x1a690b08c - /usr/lib/system/libsystem_pthread.dylib : thread_start

=================================================================
    Telemetry Dumper:
=================================================================
Thread 0x2925c7000 may have been prematurely finalized* Assertion at mono-threads.c:702, condition `info' not met, function:mono_thread_info_current, 
Failed to upload metadata for artifact(static dependencies=b7ebc839aecec360d21da8a173acf5b9) to cacheserver
Obtained 9 stack frames.
Thread 0x1764c7000 may have been prematurely finalized#0  0x00000102f4aff4 in IsMetalSurfaceValid(MetalSurfaceHelper*)
Thread 0x1764c7000 may have been prematurely finalized#1  0x00000102faa500 in metal::PrepareEndFrame()
Thread 0x1764c7000 may have been prematurely finalized#2  0x00000102f68750 in MetalWindow::EndRendering(bool)
Thread 0x1764c7000 may have been prematurely finalized#3  0x00000102d01140 in GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)
Thread 0x1764c7000 may have been prematurely finalized#4  0x00000102f91fb8 in GfxDeviceWorkerAutoreleasePoolProxy
Thread 0x1764c7000 may have been prematurely finalized#5  0x00000102cfdd54 in GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)
Thread 0x1764c7000 may have been prematurely finalized#6  0x00000102cfda4c in GfxDeviceWorker::RunGfxDeviceWorker(void*)
Thread 0x1764c7000 may have been prematurely finalized#7  0x000001013b8ab4 in Thread::RunThreadWrapper(void*)
Thread 0x1764c7000 may have been prematurely finalized#8  0x000001a691026c in _pthread_start
Launching bug reporter
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QObject(0x600003a7ee80), parent's thread is QThread(0x600002d2c140), current thread is Thread(0x600002118b40)

Editor.log を見てみたら上記のようなログが出力されていた

Library フォルダを削除してから Unity を起動したら強制終了しなくなった