Scene automatically loads the backup scene

When I switch scene, the scene won’t load itself but load the backup from Temp directory.

And I don’t know if this is the reason, but my Unity Editor crash few seconds after when I hit play.
(Crash only happen in this scene that is backuped.)

Below is the Editor.log. (I attached the comprehensive log)

Please help me. I couldn’t find the solution for 5 days now.

Loaded scene ‘Assets/_Scenes/MainGame.unity’
Deserialize: 17.806 ms
Integration: 384.321 ms
Integration of assets: 0.787 ms
Thread Wait Time: 23.124 ms
Total Operation Time: 426.038 ms
Unloading 479 unused Assets / (18.0 MB). Loaded Objects now: 30814.
Memory consumption went from 1.01 GB to 0.99 GB.
Total: 103.479084 ms (FindLiveObjects: 1.137834 ms CreateObjectMapping: 0.469834 ms MarkObjects: 100.918208 ms DeleteObjects: 0.952709 ms)
[Licensing::Client] Successfully resolved entitlement details
[remote] Dropped touch events: 1
Unloading 10 Unused Serialized files (Serialized files now loaded: 0)
MainUI Disable
#0 GetStacktrace(int)
#1 DebugStringToFile(DebugStringToFileData const&)
#2 DebugLogHandler_CUSTOM_Internal_Log(LogType, LogOption, BindingsManagedSpan*, void*)
#3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log_Injected (UnityEngine.LogType,UnityEngine.LogOption,UnityEngine.Bindings.ManagedSpanWrapper&,intptr)
#4 (Mono JIT Code) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
#5 (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[ ])
#6 (Mono JIT Code) [Logger.cs:61] UnityEngine.Logger:Log (UnityEngine.LogType,object)
#7 (Mono JIT Code) [Debug.bindings.cs:102] UnityEngine.Debug:Log (object)
#8 (Mono JIT Code) [MainUI.cs:146] MainUI:OnDisable ()
#9 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
#10 mono_jit_runtime_invoke
#11 do_runtime_invoke
#12 mono_runtime_invoke
#13 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#14 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
#15 ScriptingInvocation::InvokeChecked(ScriptingExceptionPtr*)
#16 SerializableManagedRef::CallMethod(Object&, ScriptingMethodPtr)
#17 MonoBehaviour::RemoveFromManager()
#18 GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&)
#19 GameObject::ActivateAwakeRecursivelyInternal(DeactivateOperation, AwakeFromLoadQueue&)
#20 GameObject::ActivateAwakeRecursively(DeactivateOperation)
#21 GameObject::smile:eactivate(DeactivateOperation)
#22 DestroyObjectHighLevel_Internal(Object*, bool)
#23 DestroyObjectHighLevel(Object*, bool)
#24 UnloadGameScene()
#25 SingleSceneLoadPre()
#26 LoadSceneOperation::IntegrateMainThread()
#27 PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int)
#28 PreloadManager::UpdatePreloading()
#29 InitPlayerLoopCallbacks()::EarlyUpdateUpdatePreloadingRegistrator::Forward()
#30 ExecutePlayerLoop(NativePlayerLoopSystem*)
#31 ExecutePlayerLoop(NativePlayerLoopSystem*)
#32 PlayerLoop()
#33 EditorPlayerLoop::Execute()
#34 PlayerLoopController::InternalUpdateScene(bool, bool)
#35 PlayerLoopController::UpdateSceneIfNeededFromMainLoop()
#36 Application::TickTimer()
#37 -[EditorApplication onEditorUpdatesTickTimer]
#38 __NSFireTimer
#39 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
#40 __CFRunLoopDoTimer
#41 __CFRunLoopDoTimers
#42 __CFRunLoopRun
#43 CFRunLoopRunSpecific
#44 RunCurrentEventLoopInMode
#45 ReceiveNextEventCommon
#46 _BlockUntilNextEventMatchingListInModeWithFilter
#47 DPSNextEvent
#48 -[NSApplication(NSEventRouting) nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#49 -[NSApplication run]
#50 NSApplicationMain
#51 EditorMain(int, char const**)
#52 main
#53 start
UnloadTime: 7.974125 ms
ShowTooltipUI : EditTargetTownObjectTooltip
#0 GetStacktrace(int)
#1 DebugStringToFile(DebugStringToFileData const&)
#2 DebugLogHandler_CUSTOM_Internal_Log(LogType, LogOption, BindingsManagedSpan*, void*)
#3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log_Injected (UnityEngine.LogType,UnityEngine.LogOption,UnityEngine.Bindings.ManagedSpanWrapper&,intptr)
#4 (Mono JIT Code) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
#5 (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[ ])
#6 (Mono JIT Code) [Logger.cs:61] UnityEngine.Logger:Log (UnityEngine.LogType,object)
#7 (Mono JIT Code) [Debug.bindings.cs:102] UnityEngine.Debug:Log (object)
#8 (Mono JIT Code) [UIManager.cs:237] UIManager:ShowTooltipUI<T_REF> (string)
#9 (Mono JIT Code) [TownEditModeManager.cs:61] TownEditModeManager:Awake ()
#10 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this
(object,intptr,intptr,intptr)
#11 mono_jit_runtime_invoke
#12 do_runtime_invoke
#13 mono_runtime_invoke
#14 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#15 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
#16 ScriptingInvocation::InvokeChecked(ScriptingExceptionPtr*)
#17 SerializableManagedRef::CallMethod(Object&, ScriptingMethodPtr)
#18 MonoBehaviour::CallAwake()
#19 MonoBehaviour::AddToManager()
#20 AwakeFromLoadQueue::InvokePersistentManagerAwake(AwakeFromLoadQueue::Item*, unsigned int, AwakeFromLoadMode, bool)
#21 AwakeFromLoadQueue::PersistentManagerSingleQueueAwakeFromLoad(int, AwakeFromLoadMode)
#22 AwakeFromLoadQueue::PersistentManagerAwakeFromLoad_NoChecks(AwakeFromLoadMode)
#23 LoadSceneOperation::CompleteAwakeSequence()
#24 LoadSceneOperation::IntegrateMainThread()
#25 PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int)
#26 PreloadManager::UpdatePreloading()
#27 InitPlayerLoopCallbacks()::EarlyUpdateUpdatePreloadingRegistrator::Forward()
#28 ExecutePlayerLoop(NativePlayerLoopSystem*)
#29 ExecutePlayerLoop(NativePlayerLoopSystem*)
#30 PlayerLoop()
#31 EditorPlayerLoop::Execute()
#32 PlayerLoopController::InternalUpdateScene(bool, bool)
#33 PlayerLoopController::UpdateSceneIfNeededFromMainLoop()
#34 Application::TickTimer()
#35 -[EditorApplication onEditorUpdatesTickTimer]
#36 __NSFireTimer
#37 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
#38 __CFRunLoopDoTimer
#39 __CFRunLoopDoTimers
#40 __CFRunLoopRun
#41 CFRunLoopRunSpecific
#42 RunCurrentEventLoopInMode
#43 ReceiveNextEventCommon
#44 _BlockUntilNextEventMatchingListInModeWithFilter
#45 _DPSNextEvent
#46 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#47 -[NSApplication run]
#48 NSApplicationMain
#49 EditorMain(int, char const**)
#50 main
#51 start
Loaded scene ‘Temp/__Backupscenes/0.backup’
Deserialize: 4.746 ms
Integration: 263.502 ms
Integration of assets: 0.091 ms
Thread Wait Time: 10.698 ms
Total Operation Time: 279.037 ms
NullReferenceException: Object reference not set to an instance of an object
at TownManager.LocalToCell (UnityEngine.Vector3 localPosition) [0x00000] in /Users/hongin/Projects/hoosik-game/Assets/_Assets/Scripts/Managers/HoosigiTown/TownManager.cs:159
at TownObject.get_Area () [0x0002d] in /Users/hongin/Projects/hoosik-game/Assets/_Assets/Scripts/Controllers/HoosigiTown/TownObject.cs:30
at TownManager.SpawnAllTownObject () [0x0007f] in /Users/hongin/Projects/hoosik-game/Assets/_Assets/Scripts/Managers/HoosigiTown/TownManager.cs:194
at TownManager.Start () [0x00000] in /Users/hongin/Projects/hoosik-game/Assets/_Assets/Scripts/Managers/HoosigiTown/TownManager.cs:65
(Filename: Assets/_Assets/Scripts/Controllers/HoosigiTown/TownObject.cs Line: 30)
Unloading 58 unused Assets / (26.1 KB). Loaded Objects now: 29811.
Memory consumption went from 0.93 GB to 0.93 GB.
Total: 99.364042 ms (FindLiveObjects: 0.940333 ms CreateObjectMapping: 0.331750 ms MarkObjects: 97.973834 ms DeleteObjects: 0.117750 ms)

9856554–1419534–Editor.txt (1.43 MB)

This is not an editor crash, at least not the usual where you get “Crash!!!” logged to the editor.log.
Are you perhaps mistaking an Exception for a crash? There is an important difference between the two, the former leaves the editor running, the latter will force it to close.

I suggest to attach the debugger and then hit play to check where and why the crash occurs.

I never noticed Unity automatically loading a “backup” scene of sorts. I can only assume this means the scene is unsaved and the scene under backup is the scene Unity saves on your behalf so it can be loaded in its current state without forcing the scene to be saved in the editor.

Thanks, I figured out the first crash issue, but still having backupscene load.