A bit of background: I have a core scene, which additively loads other scenes as the levels. When they go out of range, those levels are supposed to be destroyed… and here seems to be where my troubles come in. Each “root” piece of a level contains a component called UnloadableLevelPiece which destroys itself if it matches the ID of the scene we are trying to unload.
With that in mind… This happens when I try to unload a scene. Specifically, it happens immediately after I try to unload a scene, which IIRC is when things marked by Destroy actually get destroyed. Given the number of times “Canvas” appears here, I’m fairly certain this is a beta-related bug. (There are a number of world-space canvases in the scene being unloaded. To confirm the cause, I tried deleting all of these object from the scene, and it no longer crashes when unloading.)
I’ve made a bug report on this, but I’m wondering if anyone else has come across similar problems.
Receiving unhandled NULL exception
Launching bug reporter
Obtained 36 stack frames.
#0 0x00000000ebc862 in UI::Canvas::GetRenderMode() const
#1 0x00000000ec3b57 in UI::CompareFunc(ListNodeUI::Canvas const&, ListNodeUI::Canvas const&)
#2 0x00000000ec21ae in void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<UI::Canvas**, std::vector<UI::Canvas*, std::allocatorUI::Canvas* > >, UI::Canvas*, bool ()(ListNodeUI::Canvas const&, ListNodeUI::Canvas const&)>(__gnu_cxx::__normal_iterator<UI::Canvas**, std::vector<UI::Canvas , std::allocatorUI::Canvas* > >, UI::Canvas*, bool ()(ListNodeUI::Canvas const&, ListNodeUI::Canvas const&))
#3 0x00000000ebf8d8 in void std::sort<__gnu_cxx::__normal_iterator<UI::Canvas**, std::vector<UI::Canvas , std::allocatorUI::Canvas* > >, bool ()(ListNodeUI::Canvas const&, ListNodeUI::Canvas const&)>(__gnu_cxx::__normal_iterator<UI::Canvas**, std::vector<UI::Canvas , std::allocatorUI::Canvas* > >, __gnu_cxx::__normal_iterator<UI::Canvas**, std::vector<UI::Canvas*, std::allocatorUI::Canvas* > >, bool ()(ListNodeUI::Canvas const&, ListNodeUI::Canvas const&))
#4 0x00000000ec3bfe in UI::CanvasManager::SortList()
#5 0x00000000ebba81 in UI::Canvas::AwakeFromLoad(AwakeFromLoadMode)
#6 0x000000009e58f9 in AwakeFromLoadQueue::InvokePersistentManagerAwake(AwakeFromLoadQueue::Item , unsigned int, AwakeFromLoadMode, void ()(Object&, TypeTree const&))
#7 0x000000009e54eb in AwakeFromLoadQueue::PersistentManagerAwakeFromLoad(AwakeFromLoadMode, void ( )(Object&, TypeTree const&))
#8 0x000000009f0b9d in PersistentManager::IntegrateAllThreadedObjectsStep2(AwakeFromLoadQueue&)
#9 0x000000008c795b in CompleteAwakeSequence(std::string const&, AwakeFromLoadQueue&)
#10 0x000000008c788f in PostLoadLevelAdditive(std::string const&, AwakeFromLoadQueue&)
#11 0x0000000086cb63 in PreloadLevelOperation::IntegrateMainThread()
#12 0x0000000086b72d in PreloadManager::UpdatePreloadingSingleStep(bool)
#13 0x0000000086c0f6 in PreloadManager::UpdatePreloading()
#14 0x00000000868d73 in PlayerLoop(bool, bool, IHookEvent*)
#15 0x0000000149ffc9 in Application::UpdateScene(bool)
#16 0x0000000149c599 in Application::UpdateSceneIfNeeded()
#17 0x0000000149b5d5 in Application::TickTimer()
#18 0x0000000168aee8 in -[EditorApplication TickTimer]
#19 0x00000096582a2b in __NSFireTimer
#20 0x000000935e4ea6 in CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
#21 0x000000935e4863 in __CFRunLoopDoTimer
#22 0x0000009365f06d in __CFRunLoopDoTimers
#23 0x0000009359c353 in __CFRunLoopRun
#24 0x0000009359b9ea in CFRunLoopRunSpecific
#25 0x0000009359b84b in CFRunLoopRunInMode
#26 0x0000009589db5d in RunCurrentEventLoopInMode
#27 0x0000009589d8e2 in ReceiveNextEventCommon
#28 0x0000009589d6bd in _BlockUntilNextEventMatchingListInModeWithFilter
#29 0x00000099699349 in _DPSNextEvent
#30 0x00000099698870 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#31 0x0000009968b15c in -[NSApplication run]
#32 0x00000099673ff8 in NSApplicationMain
#33 0x0000000169e69b in EditorMain(int, char const**)
#34 0x0000000169edd8 in main
#35 0x00000000002d75 in start
*** Launching bug reporter due to crashbug.
Obtained 41 stack frames.
0 Unity 0x016831f1 _Z17LaunchBugReporter13BugReportMode + 1073
1 Unity 0x009418d5 _Z12HandleSignaliP9__siginfoPv + 53
2 libmono.0.dylib 0x04413836 mono_chain_signal + 76
3 libmono.0.dylib 0x0435e716 mono_sigsegv_signal_handler + 234
4 libsystem_platform.dylib 0x922ccdeb _sigtramp + 43
5 ??? 0xffffffff 0x0 + 4294967295
6 Unity 0x00ec3b57 ZN2UI11CompareFuncERK8ListNodeINS_6CanvasEES4 + 39
7 Unity 0x00ec21ae ZSt25__unguarded_linear_insertIN9__gnu_cxx17__normal_iteratorIPPN2UI6CanvasESt6vectorIS4_SaIS4_EEEES4_PFbRK8ListNodeIS3_ESD_EEvT_T0_T1 + 94
8 Unity 0x00ebf8d8 ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN2UI6CanvasESt6vectorIS4_SaIS4_EEEEPFbRK8ListNodeIS3_ESD_EEvT_SG_T0 + 152
9 Unity 0x00ec3bfe _ZN2UI13CanvasManager8SortListEv + 46
10 Unity 0x00ebba81 _ZN2UI6Canvas13AwakeFromLoadE17AwakeFromLoadMode + 49
11 Unity 0x009e58f9 _ZN18AwakeFromLoadQueue28InvokePersistentManagerAwakeEPNS_4ItemEj17AwakeFromLoadModePFvR6ObjectRK8TypeTreeE + 297
12 Unity 0x009e54eb _ZN18AwakeFromLoadQueue30PersistentManagerAwakeFromLoadE17AwakeFromLoadModePFvR6ObjectRK8TypeTreeE + 91
13 Unity 0x009f0b9d _ZN17PersistentManager32IntegrateAllThreadedObjectsStep2ER18AwakeFromLoadQueue + 125
14 Unity 0x008c795b _ZL21CompleteAwakeSequenceRKSsR18AwakeFromLoadQueue + 75
15 Unity 0x008c788f _Z21PostLoadLevelAdditiveRKSsR18AwakeFromLoadQueue + 31
16 Unity 0x0086cb63 _ZN21PreloadLevelOperation19IntegrateMainThreadEv + 291
17 Unity 0x0086b72d _ZN14PreloadManager26UpdatePreloadingSingleStepEb + 445
18 Unity 0x0086c0f6 _ZN14PreloadManager16UpdatePreloadingEv + 262
19 Unity 0x00868d73 _Z10PlayerLoopbbP10IHookEvent + 547
20 Unity 0x0149ffc9 _ZN11Application11UpdateSceneEb + 457
21 Unity 0x0149c599 _ZN11Application19UpdateSceneIfNeededEv + 73
22 Unity 0x0149b5d5 _ZN11Application9TickTimerEv + 2037
23 Unity 0x0168aee8 -[EditorApplication TickTimer] + 24
24 Foundation 0x96582a2b __NSFireTimer + 117
25 CoreFoundation 0x935e4ea6 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 22
26 CoreFoundation 0x935e4863 __CFRunLoopDoTimer + 1395
27 CoreFoundation 0x9365f06d __CFRunLoopDoTimers + 349
28 CoreFoundation 0x9359c353 __CFRunLoopRun + 1779
29 CoreFoundation 0x9359b9ea CFRunLoopRunSpecific + 394
30 CoreFoundation 0x9359b84b CFRunLoopRunInMode + 123
31 HIToolbox 0x9589db5d RunCurrentEventLoopInMode + 259
32 HIToolbox 0x9589d8e2 ReceiveNextEventCommon + 526
33 HIToolbox 0x9589d6bd _BlockUntilNextEventMatchingListInModeWithFilter + 92
34 AppKit 0x99699349 _DPSNextEvent + 1602
35 AppKit 0x99698870 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
36 AppKit 0x9968b15c -[NSApplication run] + 727
37 AppKit 0x99673ff8 NSApplicationMain + 1165
38 Unity 0x0169e69b _Z10EditorMainiPPKc + 1339
39 Unity 0x0169edd8 main + 24
40 Unity 0x00002d75 start + 53
couple questions, it looks like your on a android device, does it happen in editor as well? Also what beta version are you on?
This is only in the editor. I have not yet attempted to reproduce this on either Android or iOS on-device.
4.6b20
Hmm ok please report a bug with your use case, we’d love to fix any crashes.