Hello.
When I close SSMS (latest - 19.3) it automatically restarts instead of staying closed. In Windows Logs I see 3 errors:
Warning 1 - SSMS Integration Pack 3
ngWrapper.LogManager
#1:Unhandled Exception: Object reference not set to an instance of an object.. IsTerminating : True
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SQLSourceControl.Engine.LinkedDatabaseStore.TryGetLinkedDatabase(DatabaseId databaseId, ILinkedDatabase& linkedDatabase)
at RedGate.SQLSourceControl.Engine.Diff.LinkedDatabaseConfigStore.TryGetLinkedDatabase(DatabaseId databaseId, ILinkedDatabase& linkedDatabase)
at RedGate.SQLSourceControl.Engine.Diff.LinkedDatabaseConfigStore.TryGetLinkedDatabase(DatabaseId databaseId, ILinkedDatabaseDetails& linkedDatabase)
at RedGate.SQLSourceControl.Engine.Diff.Controller.TryGetLinkedDatabase(DatabaseId databaseId, ILinkedDatabaseDetails& linkedDatabase)
at RedGate.SQLSourceControl.CommonUI.DatabaseViewController.TryGetCurrentLinkedDatabase(ILinkedDatabaseDetails& linkedDatabase)
at RedGate.SQLSourceControl.CommonUI.DatabaseViewController.get_IsFlywayProject()
at RedGate.SQLSourceControl.CommonUI.ViewController.get_IsFlywayProject()
at RedGate.SQLSourceControl.CommonUI.Controls.DatabaseAndBranchNameControl.UpdateFlywayWarningVisibility()
at RedGate.SQLSourceControl.CommonUI.Controls.Commit.ToCommitTabControl.EnableControls(Boolean haveSelectedChanges)
at RedGate.SQLSourceControl.CommonUI.Controls.Commit.ToCommitTabControl.OperationChanged(Object sender, EventArgs e)
at RedGate.SQLSourceControl.CommonUI.Controls.ChangeSetViewerControl.RefreshChangeSet()
at RedGate.SQLSourceControl.CommonUI.Controls.ChangeSetViewerControl.ManagedVisibleChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Error 2 - .NET Runtime
Application: Ssms.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at RedGate.SQLSourceControl.Engine.LinkedDatabaseStore.TryGetLinkedDatabase(RedGate.SQLSourceControl.Engine.Model.Comparison.DatabaseId, RedGate.SQLSourceControl.Engine.Interfaces.Comparison.ThreeDatabase.ILinkedDatabase ByRef)
at RedGate.SQLSourceControl.Engine.Diff.LinkedDatabaseConfigStore.TryGetLinkedDatabase(RedGate.SQLSourceControl.Engine.Model.Comparison.DatabaseId, RedGate.SQLSourceControl.Engine.Interfaces.Comparison.ThreeDatabase.ILinkedDatabase ByRef)
at RedGate.SQLSourceControl.Engine.Diff.LinkedDatabaseConfigStore.TryGetLinkedDatabase(RedGate.SQLSourceControl.Engine.Model.Comparison.DatabaseId, RedGate.SQLSourceControl.Engine.Interfaces.Comparison.ThreeDatabase.ILinkedDatabaseDetails ByRef)
at RedGate.SQLSourceControl.Engine.Diff.Controller.TryGetLinkedDatabase(RedGate.SQLSourceControl.Engine.Model.Comparison.DatabaseId, RedGate.SQLSourceControl.Engine.Interfaces.Comparison.ThreeDatabase.ILinkedDatabaseDetails ByRef)
at RedGate.SQLSourceControl.CommonUI.DatabaseViewController.TryGetCurrentLinkedDatabase(RedGate.SQLSourceControl.Engine.Interfaces.Comparison.ThreeDatabase.ILinkedDatabaseDetails ByRef)
at RedGate.SQLSourceControl.CommonUI.DatabaseViewController.get_IsFlywayProject()
at RedGate.SQLSourceControl.CommonUI.ViewController.get_IsFlywayProject()
at RedGate.SQLSourceControl.CommonUI.Controls.DatabaseAndBranchNameControl.UpdateFlywayWarningVisibility()
at RedGate.SQLSourceControl.CommonUI.Controls.Commit.ToCommitTabControl.EnableControls(Boolean)
at RedGate.SQLSourceControl.CommonUI.Controls.Commit.ToCommitTabControl.OperationChanged(System.Object, System.EventArgs)
at RedGate.SQLSourceControl.CommonUI.Controls.ChangeSetViewerControl.RefreshChangeSet()
at RedGate.SQLSourceControl.CommonUI.Controls.ChangeSetViewerControl.ManagedVisibleChanged(System.Object, System.EventArgs)
at System.EventHandler.Invoke(System.Object, System.EventArgs)
at System.Windows.Forms.Control.OnVisibleChanged(System.EventArgs)
at System.Windows.Forms.ScrollableControl.OnVisibleChanged(System.EventArgs)
at System.Windows.Forms.Control.WmShowWindow(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)
Error 3 - Application Error
Faulting application name: Ssms.exe, version: 2024.190.3.4, time stamp: 0x659e4c7f
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x3f23775f
Faulting process id: 0x0x5F08
Faulting application start time: 0x0x1DA4AE3A114B8A6
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Ssms.exe
Faulting module path: unknown
Report Id: 48740288-d50b-4570-b00a-61419766be6f
Faulting package full name:
Faulting package-relative application ID:
It appears to be linked to SQL Source Control. I have the latest version of it (SQLSourceControl_7.7.1.18312.exe). I also have the latest version of SQL Prompt. I uninstalled/reinstalled SQL Source Control.
The weird restart happens when I have at least 2 instances of SSMS opened and I close one of them that had a procedure (or any object) opened.
I always have multiple SSMS instances opened. If I close more instances all of them are restarting. It's very annoying.
Thank you.
Later edit: it happens even if I have only one instance of SSMS with a procedura opened even if I don't modify anything and that database is not under source control.
When I close SSMS (latest - 19.3) it automatically restarts instead of staying closed. In Windows Logs I see 3 errors:
Warning 1 - SSMS Integration Pack 3
ngWrapper.LogManager
Error 2 - .NET Runtime
Error 3 - Application Error
It appears to be linked to SQL Source Control. I have the latest version of it (SQLSourceControl_7.7.1.18312.exe). I also have the latest version of SQL Prompt. I uninstalled/reinstalled SQL Source Control.
The weird restart happens when I have at least 2 instances of SSMS opened and I close one of them that had a procedure (or any object) opened.
I always have multiple SSMS instances opened. If I close more instances all of them are restarting. It's very annoying.
Thank you.
Later edit: it happens even if I have only one instance of SSMS with a procedura opened even if I don't modify anything and that database is not under source control.