Unhandled exception in SQL Prompt 3.5.0.333

andy.candy.c Posts: 11
edited August 8, 2007 11:58AM in SQL Prompt Previous Versions
Hi there,

I have been using a licensed version of SQL Prompt 3.5.0.333 for a few days. It is a great tool but I found that SQL Prompt was throwing unhandled exceptions when I was trying to modify a couple of production procs in ssms.
I was able to reproduce the problem (at least on my machine). It seems that a sequence of a carriage return, line feed and a carriage return will cause SQL Prompt to throw a unhandled exception.

I am not sure how this character combination found its way into some of our production procs but it seems that SQL Prompt definately does not like it.

Configuration:

Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.085.1117.00(xpsp_sp2_rtm.040803-2158)
Microsoft MSXML 2.6 3.0 5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600

/*

This script will create a proc that will break sql prompt when you attempt to modify the proc itself in ssms.

A combination of a Carriage Return, Line Feed and then a Carriage Return will cause an unhandled exception in SQL Prompt 3.5.0.333 
This will force you to kill ssms via the Task Manager.


The proc created looks like this:


CREATE PROCEDURE [dbo].[break_sql_prompt] AS 


 SELECT
    NULL col1
   ,NULL col2
*/

DECLARE @sql_string nvarchar(1024)

if(object_id('dbo.break_sql_prompt') IS NOT NULL)
BEGIN
	DROP PROCEDURE dbo.break_sql_prompt
END

SET @sql_string = 'CREATE PROCEDURE dbo.break_sql_prompt AS' +
NCHAR(0x20) + 
NCHAR(0x0D) + -- This combination of a Carriage Return, 
NCHAR(0x0A) + -- Line Feed and then a 
NCHAR(0x0D) + -- Carriage Return will break sql prompt
NCHAR(0x20) + 
NCHAR(0x53) + 
NCHAR(0x45) + 
NCHAR(0x4C) + 
NCHAR(0x45) + 
NCHAR(0x43) + 
NCHAR(0x54) + 
NCHAR(0x0D) + 
NCHAR(0x0A) + 
NCHAR(0x20) +
NCHAR(0x20) +
NCHAR(0x20) +
NCHAR(0x20) +
NCHAR(0x4E) + 
NCHAR(0x55) + 
NCHAR(0x4C) + 
NCHAR(0x4C) + 
NCHAR(0x20) + 
NCHAR(0x63) + 
NCHAR(0x6F) + 
NCHAR(0x6C) + 
NCHAR(0x31) + 
NCHAR(0x0D) + 
NCHAR(0x0A) + 
NCHAR(0x20) + 
NCHAR(0x20) + 
NCHAR(0x20) + 
NCHAR(0x2C) + 
NCHAR(0x4E) + 
NCHAR(0x55) + 
NCHAR(0x4C) + 
NCHAR(0x4C) + 
NCHAR(0x20) + 
NCHAR(0x63) + 
NCHAR(0x6F) + 
NCHAR(0x6C) + 
NCHAR(0x32)


EXEC(@sql_string)

Comments

  • Bart ReadBart Read Posts: 997 Silver 1
    Hi Andy,


    Thanks for reporting this, and thanks for the example. That's certainly quite a bizarre character combination.

    I've used your script to create the SP and have then tried modifying it after using Prompt's ALTER PROC completion to pull in the SQL, and by scripting as a CREATE script using SSMS but I can't reproduce the problem. Any chance you could send through the full content of the error dialog that pops up when the problem occurs please because at the moment I'm still at a bit of a loss?

    I have made some changes in the SQL Prompt 3.6 branch so it's possible I may have inadvertently fixed this bug, however I'd like to be sure so the stack trace (albeit obfuscated) would be really useful.

    Last question: is there some specific operation that you perform to get it to crash, such as inserting a table name, or do you just have to type? And do you have to make the modification on a particular line or in a particular position for it to happen? I've tried various combinations of the above but thus far unfortunately with no luck.


    Thanks,
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • Hi Bart,

    Here is the stack trace that I get:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
    Parameter name: startIndex
    at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
    at _142._1(String , _137 , Element )
    at _142.PopulateCandidateLists(_137 astMap, Element statementAst, Element ast)
    at RedGate.SqlPrompt.Engine.SqlPromptEngine.UpdateCandidateLists()
    at RedGate.SqlPrompt.Engine.SqlPromptEngine._1(Boolean )
    at RedGate.SqlPrompt.Engine.SqlPromptEngine.SetAsCurrentEngine()
    at RedGate.SQLPrompt.CommonUI.Editor.EditorWindowBase.OnSetFocus()
    at RedGate.SQLPrompt.CommonVS.Editor.VSEditorWindow.OnTextViewSetFocus(VSTextView textView)


    ************** 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
    AppIDPackage
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/AppIDPackage.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
    Microsoft.SqlServer.SqlTools.VSIntegration
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.SqlTools.VSIntegration.DLL
    Microsoft.VisualStudio.Shell.Interop
    Assembly Version: 7.1.40304.0
    Win32 Version: 7.0.4054
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.Shell.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Shell.Interop.dll
    Microsoft.VisualStudio.OLE.Interop
    Assembly Version: 7.1.40304.0
    Win32 Version: 7.0.4054
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.OLE.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.OLE.Interop.dll
    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
    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
    Microsoft.SqlServer.SqlTDiagM
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.1399.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.SqlTDiagM/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.SqlTDiagM.dll
    SqlWorkbench.Interfaces
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/SqlWorkbench.Interfaces.DLL
    Microsoft.DataWarehouse.SQM
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.DataWarehouse.SQM.DLL
    Microsoft.SqlServer.Instapi
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.1399.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.Instapi/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.Instapi.dll
    RedGate.SQLPrompt.SSMSUI
    Assembly Version: 3.5.0.333
    Win32 Version: 3.5.0.333
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLPrompt.SSMSUI.dll
    RedGate.SQLPrompt.CommonVS
    Assembly Version: 3.5.0.333
    Win32 Version: 3.5.0.333
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLPrompt.CommonVS.DLL
    Extensibility
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.00.9466
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Extensibility/7.0.3300.0__b03f5f7f11d50a3a/Extensibility.dll
    EnvDTE
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC/EnvDTE/8.0.0.0__b03f5f7f11d50a3a/EnvDTE.dll
    Microsoft.VisualStudio.TextManager.Interop
    Assembly Version: 7.1.40304.0
    Win32 Version: 7.0.4054
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.TextManager.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.TextManager.Interop.dll
    RedGate.SqlPrompt.Engine
    Assembly Version: 3.5.0.333
    Win32 Version: 3.5.0.333
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SqlPrompt.Engine.DLL
    RedGate.SQLPrompt.CommonUI
    Assembly Version: 3.5.0.333
    Win32 Version: 3.5.0.333
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLPrompt.CommonUI.DLL
    log4net
    Assembly Version: 1.2.10.0
    Win32 Version: 1.2.10.0
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/log4net.DLL
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.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
    RedGate.Licensing.Client
    Assembly Version: 1.3.3.2
    Win32 Version: 1.3.3.2
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.Licensing.Client.DLL
    RedGate.SQL.Shared
    Assembly Version: 6.0.0.95
    Win32 Version: 6.0.0.95
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQL.Shared.DLL
    RedGate.Shared.Utils
    Assembly Version: 6.0.0.95
    Win32 Version: 6.0.0.95
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.Shared.Utils.DLL
    Microsoft.SqlServer.Management.Reports
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Management.Reports.DLL
    EnvDTE80
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC/EnvDTE80/8.0.0.0__b03f5f7f11d50a3a/EnvDTE80.dll
    RedGate.SQLPrompt.vsmso
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.0.0
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLPrompt.vsmso.DLL
    CustomMarshalers
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
    RedGate.SqlPrompt.Engine.Gatekeeper
    Assembly Version: 3.5.0.333
    Win32 Version: 3.5.0.333
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SqlPrompt.Engine.Gatekeeper.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.SQLCompare.Engine
    Assembly Version: 5.8.1.31
    Win32 Version: 5.8.1.31
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLCompare.Engine.DLL
    RedGate.Refactoring.AddIn
    Assembly Version: 1.1.0.97
    Win32 Version: 1.1.0.97
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/RedGate.Refactoring.AddIn.dll
    RedGate.Licensing.Client
    Assembly Version: 1.3.1.6
    Win32 Version: 1.3.1.6
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/RedGate.Licensing.Client.DLL
    RedGate.Licensing.Helper
    Assembly Version: 1.3.1.0
    Win32 Version: 1.3.1.6
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/RedGate.Licensing.Helper.DLL
    RedGate.Refactoring.vsmso
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.0.0
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/RedGate.Refactoring.vsmso.DLL
    RedGate.SQLCompare.Rewriter
    Assembly Version: 5.9.0.17
    Win32 Version: 5.9.0.17
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/RedGate.SQLCompare.Rewriter.DLL
    RedGate.SQLCompare.ASTParser
    Assembly Version: 5.9.0.17
    Win32 Version: 5.9.0.17
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/RedGate.SQLCompare.ASTParser.DLL
    ActiproSoftware.Wizard.Net20
    Assembly Version: 3.0.121.0
    Win32 Version: 3.0.121.0
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/ActiproSoftware.Wizard.Net20.DLL
    RedGate.SQLCompare.Engine
    Assembly Version: 5.9.0.17
    Win32 Version: 5.9.0.17
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/RedGate.SQLCompare.Engine.DLL
    ObjectExplorer
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/ObjectExplorer.DLL
    SqlMgmt
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/SqlMgmt.DLL
    ConnectionDlg
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/ConnectionDlg.DLL
    Microsoft.VisualStudio
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 built by: RTM
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio/2.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.dll
    Microsoft.VisualStudio.Shell
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Shell/2.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Shell.dll
    Microsoft.VisualStudio.Shell.Interop.8.0
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.Shell.Interop.8.0/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Shell.Interop.8.0.dll
    System.Drawing.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing.Design/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
    Microsoft.VisualStudio.Designer.Interfaces
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.Designer.Interfaces/1.0.5000.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Designer.Interfaces.dll
    Microsoft.SqlServer.Smo
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.Smo/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.Smo.dll
    Microsoft.SqlServer.RegSvrEnum
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.RegSvrEnum/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.RegSvrEnum.dll
    Microsoft.SqlServer.ConnectionInfo
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.ConnectionInfo/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.ConnectionInfo.dll
    System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
    Microsoft.SqlServer.SmoEnum
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.SmoEnum/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.SmoEnum.dll
    System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    Microsoft.NetEnterpriseServers.ExceptionMessageBox
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.NetEnterpriseServers.ExceptionMessageBox/9.0.242.0__89845dcd8080cc91/Microsoft.NetEnterpriseServers.ExceptionMessageBox.dll
    Microsoft.SqlServer.SqlEnum
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.SqlEnum/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.SqlEnum.dll
    Microsoft.SqlServer.BatchParser
    Assembly Version: 9.0.242.0
    Win32 Version: 2005.090.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/Microsoft.SqlServer.BatchParser/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.BatchParser.dll
    msvcm80
    Assembly Version: 8.0.50727.762
    Win32 Version: 8.00.50727.762
    CodeBase: file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700/msvcm80.dll
    RedGate.Refactoring.AddIn.ServicePack2
    Assembly Version: 1.1.0.97
    Win32 Version: 1.1.0.97
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Refactor/RedGate.Refactoring.AddIn.ServicePack2.DLL
    ObjectExplorerReplication
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.1399.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/ObjectExplorerReplication.DLL
    SQLEditors
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/SQLEditors.DLL
    _xij8msi
    Assembly Version: 9.0.242.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
    7ubfvi-_
    Assembly Version: 9.0.242.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.SQLCompare.ASTParser
    Assembly Version: 5.8.1.31
    Win32 Version: 5.8.1.31
    CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt%203/RedGate.SQLCompare.ASTParser.DLL
    Microsoft.VisualStudio.Package.LanguageService
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Package.LanguageService/2.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Package.LanguageService.dll
    Microsoft.SqlServer.CustomControls
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.CustomControls/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.CustomControls.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
    Microsoft.SqlServer.GridControl
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.3042.00
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.GridControl/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.GridControl.dll
    Microsoft.SqlServerCe.Client
    Assembly Version: 9.0.242.0
    Win32 Version: 3.0.5300.0
    CodeBase: file:///C:/Program%20Files/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServerCe.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.
  • Bart ReadBart Read Posts: 997 Silver 1
    Excellent, thanks Andy! That explains exactly why I couldn't reproduce it: I fixed in this morning, which is a relief. The stack trace is the same as this one:

    http://www.red-gate.com/MessageBoard/vi ... php?t=5423

    It's weird because just over the past few days we've had a rash of reports about this, but this test case will come in useful as a safeguard against regressions.

    Thanks again!


    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
  • Thanks for your help on this Bart.

    One work-around that you could try if you have any procs with that strange character combination would be this:

    1. Disable SQL Prompt
    2. Format the SP using SQL Refactor
    3. Re-enable SQL Prompt

    For the SP created in the script above the character combination was removed and then SQL Prompt was able to process the SP just fine.

    It seems however that the production procs that SQL Prompt was having problems with were already run through SQL Refactor but the character combination remained.
  • Bart ReadBart Read Posts: 997 Silver 1
    That's very odd. I'm surprised SQL Refactor didn't clean up those line-endings the first time round, still, SQL Prompt chucking an exception isn't a great way for us to deal with it. We're aiming to get the next version out in early September so in the meantime I'd suggest your workaround is probably the best option.
    Thanks,
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
Sign In or Register to comment.