Reproducible Editor Crash - 4.6

Hi there,

I’ve got a reproducible editor crash that’s preventing me from getting work done; the crash occurs when switching scenes (the initial scene last edited loads correctly, however loading any other scene, or hitting ‘New Scene’ will crash the editor with a Visual C++ Library error, “R6025 - Pure virtual function call”) - I have a open bug ticket for this as well (ticket #718287), project is not included as it is 54gb, however I am happy to run debuggers, et al if need be.

I am running on a slightly older editor build - 4.6.0f3; I have not upgraded as unfortunately we have another reproducible error on 4.6.1 onwards (specifically - prefabs wont save to disk, despite saving in the editor - a somewhat serious bug, which has been open for a while. [ticket #655942 incase anyone wants to look into that one - also quite reproducible!])

I suspect it’s related to a Gizmo script misbehaving; however there hasn’t been any changes to our scenes that we know about prior to this bug being triggered.

I have attached an editor log in the original ticket, however I have crashed unity over and over again while trying to debug this; the common thread is the stack traces seem to always be consistently the same; crashing occurring inside of Camera::PrepareSceneCullingParameters.

Received abort signal from the operating system

*** Launching bug reporter due to fatal error!
Full stack trace:
StackWalker::ShowCallstackSimple
GetStacktrace
PrintStackTrace
LaunchBugReporter
HandleAbort
abort
Camera::PrepareSceneCullingParameters
Camera::CustomCull
Camera::RenderEditorCamera
Handles_CUSTOM_Internal_DrawCameraWithGrid
 (wrapper managed-to-native) UnityEditor.Handles:Internal_DrawCameraWithGrid (UnityEngine.Camera,int,UnityEditor.DrawGridParameters&) + 0x50 (23068CB0 23068D50) [0BCF6BD0 - Unity Child Domain]
 UnityEditor.Handles:smile:rawCameraImpl (UnityEngine.Rect,UnityEngine.Camera,UnityEditor.DrawCameraMode,bool,UnityEditor.DrawGridParameters,bool) + 0x3da (23045D80 230461F6) [0BCF6BD0 - Unity Child Domain]
 UnityEditor.Handles:smile:rawCameraStep1 (UnityEngine.Rect,UnityEngine.Camera,UnityEditor.DrawCameraMode,UnityEditor.DrawGridParameters) + 0xb2 (23045CA8 23045D71) [0BCF6BD0 - Unity Child Domain]
 UnityEditor.SceneView:OnGUI () + 0x26a5 (230348E0 23037B41) [0BCF6BD0 - Unity Child Domain]
 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0x8f (0B44BD90 0B44BEEA) [0BCF6BD0 - Unity Child Domain]
mono_jit_runtime_invoke
mono_runtime_invoke
mono_runtime_invoke_array
ves_icall_InternalInvoke
 (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) + 0x90 (0B42A3F8 0B42A4C8) [0BCF6BD0 - Unity Child Domain]
 System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) + 0x370 (0B428FC0 0B429418) [0BCF6BD0 - Unity Child Domain]
 System.Reflection.MethodBase:Invoke (object,object[]) + 0x4d (0B4E7E50 0B4E7EA8) [0BCF6BD0 - Unity Child Domain]
 UnityEditor.HostView:Invoke (string,object) + 0x6d (22FD0AC8 22FD0B4C) [0BCF6BD0 - Unity Child Domain]
 UnityEditor.HostView:Invoke (string) + 0x2f (22FD0A70 22FD0AB6) [0BCF6BD0 - Unity Child Domain]
 UnityEditor.DockArea:OnGUI () + 0x1edd (2302A398 2302C48E) [0BCF6BD0 - Unity Child Domain]
 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0x8f (0B44BD90 0B44BEEA) [0BCF6BD0 - Unity Child Domain]
mono_jit_runtime_invoke
mono_runtime_invoke
scripting_method_invoke
ScriptingInvocationNoArgs::Invoke
MonoBehaviour::smile:oGUI
GUIView::OnInputEvent
GUIView::smile:oPaint
GUIView::RepaintAll
Application::UpdateScene
Application::NewScene
ExecuteStandardMenuItem
ExecuteMenuItemWithID
ProcessMainWindowMessages
ContainerWindow::ContainerWndProc
CallNextHookEx
CallNextHookEx
CallNextHookEx
CallNextHookEx
KiUserCallbackDispatcher
MainMessageLoop
WinMain
__tmainCRTStartup
BaseThreadInitThunk
RtlInitializeExceptionChain
RtlInitializeExceptionChain

Any help in either being able to debug, work-around or otherwise mitigate this would be appreciated.

Thanks,

Adam

Interesting note; I tried loading a scene without the editor view active, and while it still crashed - the stack trace did change subtly. It’s still crashing in PrepareSceenCullingParameters, however - it’s doing so via a different path; which seems to rule out it being something gizmo/etc related.

*** Launching bug reporter due to fatal error!
Full stack trace:
StackWalker::ShowCallstackSimple
GetStacktrace
PrintStackTrace
LaunchBugReporter
HandleAbort
abort
Camera::PrepareSceneCullingParameters
Camera::CustomCull
Camera::Cull
RenderManager::RenderCameras
RenderGameViewCameras
EditorGUIUtility_CUSTOM_INTERNAL_CALL_RenderGameViewCameras
 (wrapper managed-to-native) UnityEditor.EditorGUIUtility:INTERNAL_CALL_RenderGameViewCameras (UnityEngine.Rect&,bool,bool) + 0x52 (23DD4E48 23DD4EEA) [09846D20 - Unity Child Domain]
 UnityEditor.EditorGUIUtility:RenderGameViewCameras (UnityEngine.Rect,bool,bool) + 0x2e (23DD4DF0 23DD4E35) [09846D20 - Unity Child Domain]
 UnityEditor.GameView:OnGUI () + 0x8a9 (23DD1D20 23DD2D0C) [09846D20 - Unity Child Domain]
 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0x8f (1B98C1F8 1B98C352) [09846D20 - Unity Child Domain]
mono_jit_runtime_invoke
mono_runtime_invoke
mono_runtime_invoke_array
ves_icall_InternalInvoke
 (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) + 0x90 (1B97A3F8 1B97A4C8) [09846D20 - Unity Child Domain]
 System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) + 0x370 (1B978FC0 1B979418) [09846D20 - Unity Child Domain]
 System.Reflection.MethodBase:Invoke (object,object[]) + 0x4d (1BA236D8 1BA23730) [09846D20 - Unity Child Domain]
 UnityEditor.HostView:Invoke (string,object) + 0x6d (0AD5F4E0 0AD5F564) [09846D20 - Unity Child Domain]
 UnityEditor.HostView:Invoke (string) + 0x2f (0AD5F488 0AD5F4CE) [09846D20 - Unity Child Domain]
 UnityEditor.DockArea:OnGUI () + 0x1edd (289A7790 289A9886) [09846D20 - Unity Child Domain]
 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0x8f (1B98C1F8 1B98C352) [09846D20 - Unity Child Domain]
mono_jit_runtime_invoke
mono_runtime_invoke
scripting_method_invoke
ScriptingInvocationNoArgs::Invoke
MonoBehaviour::smile:oGUI
GUIView::OnInputEvent
GUIView::smile:oPaint
GUIView::RepaintAll
Application::UpdateScene
Application::NewScene
ExecuteStandardMenuItem
ExecuteMenuItemWithID
ProcessMainWindowMessages
ContainerWindow::ContainerWndProc
CallNextHookEx
CallNextHookEx
CallNextHookEx
CallNextHookEx
KiUserCallbackDispatcher
MainMessageLoop
WinMain
__tmainCRTStartup
BaseThreadInitThunk
RtlInitializeExceptionChain
RtlInitializeExceptionChain

Taking that a step further, I removed both Scene View & Game View tabs from my editor, and I was able to load another scene successfully. However, the moment I added the Scene view back, the editor instantly crashed again.

This bug appears to be fixed in 4.6.7 (or the act of installing the newer version fixed it - I did also suspect it could also be a vcredist issue), so this thread can b perhaps be closed. Issue #655942 involving prefabs not saving correctly also tentatively appears to be fixed as well (we last tested up to 4.6.5).