LoginSignup
0
0

More than 5 years have passed since last update.

UnityEditorが突然落ちた時のメモ (UI::Canvas::CaptureBatchFrame)

Posted at

解散アドベントカレンダーi日目です。
完全に書くの忘れていた+忙しすぎて記事書けてませんでしたね。
まぁ一日くらい遅れても誤差誤差。

さて今回はUnityがクラッシュして困ってた時の備忘録というか覚え書きです、
結論から言うとUnityのバグで落ちていたのですが近いうち修正されると思います。困ってる人がもしかしたらいるかもしれないのでメモしときます。

症状

シーンを再生するとほぼ100%落ちる。

Editor.Logを見てみると、以下のような感じでした。

Receiving unhandled NULL exception
Obtained 23 stack frames.
#0  0x00000101bfe4d2 in UI::Canvas::CaptureBatchFrame(dynamic_array<UISystemProfilerInfo, 4ul>&, dynamic_array<char, 1ul>&, UI::SubBatch const&, int, int, int, dynamic_array<int, 4ul>&) const
#1  0x00000101bfdf23 in UI::Canvas::CaptureFrame(dynamic_array<UISystemProfilerInfo, 4ul>&, dynamic_array<char, 1ul>&, UI::Canvas const*, dynamic_array<int, 4ul>&) const
#2  0x00000101c02223 in UI::CanvasManager::CaptureFrame(dynamic_array<UISystemProfilerInfo, 4ul>&, dynamic_array<char, 1ul>&, dynamic_array<EventMarker, 4ul>&, dynamic_array<char, 1ul>&, dynamic_array<int, 4ul>&)
#3  0x00000100db16d8 in UnityProfiler::SaveCurrentFrameRecording()
#4  0x00000100db0ae8 in UnityProfiler::EndFrame()
#5  0x00000100db08af in UnityProfiler::RecordPreviousFrame(ProfilerMode)
#6  0x00000100365cfc in Application::TickTimer()
#7  0x007fff8e2f9e0f in __NSFireTimer
#8  0x007fff8c86fc54 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
#9  0x007fff8c86f8df in __CFRunLoopDoTimer
#10 0x007fff8c86f43a in __CFRunLoopDoTimers
#11 0x007fff8c866b81 in __CFRunLoopRun
#12 0x007fff8c866114 in CFRunLoopRunSpecific
#13 0x007fff8bdc6ebc in RunCurrentEventLoopInMode
#14 0x007fff8bdc6cf1 in ReceiveNextEventCommon
#15 0x007fff8bdc6b26 in _BlockUntilNextEventMatchingListInModeWithFilter
#16 0x007fff8a35da54 in _DPSNextEvent
#17 0x007fff8aad97ee in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#18 0x007fff8a3523db in -[NSApplication run]
#19 0x007fff8a31ce0e in NSApplicationMain
#20 0x0000010220e8a5 in EditorMain(int, char const**)
#21 0x0000010220ed19 in main
#22 0x007fffa1fec235 in start
Launching bug reporter

なんかキャンバスが悪さしてるっぽい雰囲気がありますね。

解決方法

結論から言うとUnityのprofilerウィンドウが開かれていたのが原因でした。
Unityのissue Trackerを見てみると同じ症状がありました。
https://issuetracker.unity3d.com/issues/entering-playmode-with-profiler-open-and-ui-in-the-scene-crashes-in-ui-canvas-capturebatchframe

ISSUE TRACKER曰く将来的に修正される予定らしいのですが現状では落ちてしまうので同じ症状が出てる方いましたらこちらを試して見てください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0