Unity 2020.1 crashes when loading a specific scene in editor


  • Unity 2020.1
  • macOS Catalina 10.15.4

I ported my project from Unity 2019.4 to 2020.1. In the project, there are 10 scenes and the editor crashes 100% of the times when loading scene 0. Loading all the other scenes doesn’t create any problem.

Here’s the log:

UnityEngine.UIElements.UIEventRegistration:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:74)
UnityEngine.UIElements.<>c:<.cctor>b__1_2(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:28)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
[./Runtime/Scripting/ManagedReference/SerializableManagedRef.cpp line 115]
(Filename: /Users/builduser/buildslave/unity/build/Modules/AssetDatabase/Editor/ScriptBindings/AssetDatabase.bindings.cs Line: 234)
Loaded scene 'Assets/_Scenes/Lobby/Lobby.unity'
    Deserialize:            90.551 ms
    Integration:            261.606 ms
    Integration of assets:  5.098 ms
    Thread Wait Time:       17.903 ms
    Total Operation Time:   375.158 ms
System memory in use before: 438.3 MB.
System memory in use after: 439.0 MB.
Unloading 4 unused Assets to reduce memory usage. Loaded Objects now: 5474.
Total: 32.649901 ms (FindLiveObjects: 0.690053 ms CreateObjectMapping: 0.188748 ms MarkObjects: 31.748189 ms  DeleteObjects: 0.022191 ms)
gi::BakeBackendSwitch: Clear() active clients.
[EnlightenBakeManager] m_Clear = false;
[00:00:00] Enlighten: Precompute started.
Obtained 32 stack frames.
#0  0x0000010d8db970 in GameObject::QueryComponentByType(Unity::Type const*) const
#1  0x0000010d281c7a in UI::AddRenderersToCanvas(JobFence&, Transform const*, UI::Canvas*, int&)
#2  0x0000010d282138 in UI::AddRenderersToCanvas(JobFence&, Transform const*, UI::Canvas*, int&)
#3  0x0000010d282138 in UI::AddRenderersToCanvas(JobFence&, Transform const*, UI::Canvas*, int&)
#4  0x0000010d281b93 in UI::Canvas::UpdateBatchOrder()
#5  0x0000010d281691 in UI::Canvas::UpdateBatches(bool)
#6  0x0000010d25919b in UI::CanvasManager::WillRenderCanvases()
#7  0x0000010d25b939 in UI::InitializeCanvasManager()::UIEventsWillRenderCanvasesRegistrator::Forward()
#8  0x0000010e108f20 in InitPlayerLoopCallbacks()::PostLateUpdatePlayerUpdateCanvasesRegistrator::Forward()
#9  0x0000010e0ebb6e in ExecutePlayerLoop(NativePlayerLoopSystem*)
#10 0x0000010e0ebbda in ExecutePlayerLoop(NativePlayerLoopSystem*)
#11 0x0000010e0ebe7c in PlayerLoop()
#12 0x0000010f5f6f12 in PlayerLoopController::UpdateScene(bool)
#13 0x0000010f5e8dd7 in PlayerLoopController::UpdateSceneIfNeeded()
#14 0x0000010f5e65ba in Application::TickTimer()
#15 0x000001118cfd45 in -[EditorApplication TickTimer]
#16 0x007fff39d663ca in __NSFireTimer
#18 0x007fff3768f51f in __CFRunLoopDoTimer
#19 0x007fff3768f007 in __CFRunLoopDoTimers
#20 0x007fff37673daa in __CFRunLoopRun
#21 0x007fff37672ffe in CFRunLoopRunSpecific
#22 0x007fff362a6abd in RunCurrentEventLoopInMode
#23 0x007fff362a66f4 in ReceiveNextEventCommon
#24 0x007fff362a6579 in _BlockUntilNextEventMatchingListInModeWithFilter
#25 0x007fff348f1c99 in _DPSNextEvent
#26 0x007fff348f04e0 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#27 0x007fff348e21ee in -[NSApplication run]
#28 0x007fff348b3ff6 in NSApplicationMain
#29 0x0000011190dd37 in EditorMain(int, char const**)
#30 0x0000011190ded9 in main
#31 0x007fff715bbcc9 in start
Launching bug reporter
[Unity Package Manager (Upm)]
Parent process [36994] was terminated
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QObject(0x7fb6af073cf0), parent's thread is QThread(0x7fb6aa50b690), current thread is Thread(0x7fb6af0a3960)

Seems like the problem is connected to Enlighten but I’m not sure how can I change it since I need to access the scene in the editor to update the Lighting settings. Maybe I can edit directly a file?

I’m having the same problem. Have you found the solution?