Comments
5 comments
-
Ouch! That's no good. Sorry about this. It looks like your snippets file may have been corrupted, but we ought to handle the situation a little better than than.
You have two options:
(i) Just delete the snippets file (not really recommended if you've added some custom snippets of your own).
(ii) Rename the snippets file and then start SSMS or QA. A new snippets file will be created. Open the old one in a text editor then use the Options dialog to re-add any custom snippets by copying and pasting from the old file in the text editor.
You'll find the snippets file under
%USERPROFILE%\Local Settings\Application Data\Red Gate\SQL Prompt 3
It's called
SQL Prompt 3 Snippets.xml
Again sorry for the hassle, and hope this sorts you out.
Thanks,
Bart -
Thanks that did it. I didn't have any snippets so I just deleted the file. I closed SQL Prompt and stared it again, then opened QA. QA had some error and closed immediately so I opened it again and it worked.
So far so good.
thanks. -
Excellent. Glad that sorted you out. Thanks for letting me know. I've also now fixed that problem so it shouldn't happen with the final release.
Cheers,
Bart -
Had this happen to me. File size was 0 bytes. Ouch, all those snippits down the tubes
-
I think I know why this is happening. We rely on the ProcessExit event for saving the snippets, however the total execution time for all handlers for this event is limited to 3 seconds. We could probably up this for QA since we host the CLR ourselves, however this doesn't really solve the problem because we can't do it for SSMS. It looks like sometimes the snippets aren't saved before the 3 seconds has elapsed, so we basically need to make sure we save them whenever a change is made rather than being lazy.
Clearly this would also apply to other items such as the EngineOptions.xml file. I'm surprised we've never seen this kind of behaviour with any of our other applications, however comparing the .NET 1.1 documentation with the .NET 2.0 documentation I notice that no mention is made of this for 1.1. Now this could mean that the behaviour changed from 1.1 to 2.0... or it could just mean that the behaviour wasn't documented under 1.1. Take your pick, but I'll certainly be making people aware of this issue from now on.
We'll have this fixed for the final release.
Thanks,
Bart
Add comment
Please sign in to leave a comment.
I closed SQL Prompt and restarted it and I am still having this problem so it won't work anymore.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.ReadStartElement(String name)
at RedGate.SqlPrompt.Engine.Snippets.SnippetManager.FromXml(XmlReader reader)
at RedGate.SqlPrompt.Engine.Snippets.SnippetManager.LoadSnippets(String filename)
at RedGate.SqlPrompt.Engine.Snippets.SnippetManager._1()
at RedGate.SqlPrompt.Engine.Snippets.SnippetManager..ctor(String storageDirectory)
at RedGate.SqlPrompt.Engine.Snippets.SnippetManager.GetSnippetManager()
at RedGate.SQLPrompt.CommonUI.Forms.OptionsForm.RefreshSnippetListView()
at RedGate.SQLPrompt.CommonUI.Forms.OptionsForm..ctor(Licence licence, UIOptions uiOptions)
at _14.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
RedGate.SQLPrompt.QueryAnalyzerUI
Assembly Version: 3.0.0.768
Win32 Version: 3.0.0.768
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLPrompt.QueryAnalyzerUI.exe
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
RedGate.SQLPrompt.CommonUI
Assembly Version: 3.0.0.768
Win32 Version: 3.0.0.768
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLPrompt.CommonUI.DLL
RedGate.Licensing.Client
Assembly Version: 1.3.0.25
Win32 Version: 1.3.0.25
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.Licensing.Client.DLL
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
RedGate.Licensing.Helper
Assembly Version: 1.3.0.25
Win32 Version: 1.3.0.25
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.Licensing.Helper.DLL
RedGate.SqlPrompt.Engine
Assembly Version: 3.0.0.768
Win32 Version: 3.0.0.768
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SqlPrompt.Engine.DLL
RedGate.SQL.Shared
Assembly Version: 5.3.0.1
Win32 Version: 5.3.0.1
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQL.Shared.DLL
RedGate.SqlPrompt.Engine.Gatekeeper
Assembly Version: 3.0.0.768
Win32 Version: 3.0.0.768
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SqlPrompt.Engine.Gatekeeper.DLL
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
RedGate.Shared.Utils
Assembly Version: 5.3.0.1
Win32 Version: 5.3.0.1
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.Shared.Utils.DLL
RedGate.SQLCompare.Engine
Assembly Version: 5.8.0.50
Win32 Version: 5.8.0.50
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLCompare.Engine.DLL
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
RedGate.Update.Client
Assembly Version: 1.2.0.3
Win32 Version: 1.2.0.3
CodeBase: file:///D:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.Update.Client.DLL
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.