Competition: What’s your favorite Redgate tool? Enter now.

Prompt crashes in VS and SSMS

taylortaylor Posts: 7
edited April 28, 2014 9:28AM in SQL Prompt
When opening a particular SQL file, one that is nearly 4300 lines of code, in either application will crash the application if SQL Prompt is enabled. If SQL Prompt is not enabled, there is no crash.

The actual error in Windows refers to .NET 4.0 and specifies the file clr.dll. I do believe it is SQL Prompt that is triggering the crash. I have even tried "repairing" .NET, opened various SQL projects and files in VS while Prompt was enabled, and there was no problem. I had another user try it on his machine and the same .NET error happened.

While the error I receive seems to be a generic .NET error, I believe the issue lies with this single file for the possible reasons: there are incomplete statements in the code so Prompt may be tripping up on highlighting the particular code, and for the most likely reason, the fact the file is nearly 4300 lines of code.

I should mention that we have the latest version of SQL Prompt,


  • Hi Taylor,

    I'm sorry you're getting crashes here!

    Would it be possible to send over the script to my email address: [email protected] ?

    Does the crash happen as soon as you open the file? Or do you have to click around a few times or type before it crashes?

    Best regards,

  • It does seem to take about 5 seconds before crashing the application. I imagine it's during the parsing of the file that it bugs out.
  • Thanks Taylor!

    This was instantly reproducible on my end. We're looking into this now, and we'll let you know when we've gotten some more information.

    Best regards,

  • David, I sent you another file to take a look at. It's only one piece of the code sent to you earlier.
  • Hi Taylor,

    I have a workaround for the second script. I'm working through trying to get this fixed but it's taking some time.

    If you put the begin transaction before the if statement, the script shouldn't crash SSMS any more:

    IF EXISTS(SELECT * from ... AND AssetID =
    UPDATE ...

    Not ideal I know, but I'll get there!

    It seems to be a combination of the AssetID =, BEGIN TRAN; and UPDATE. When you remove one of these it works correctly again.

    Thanks for your patience!

  • Thanks for taking a look. I have already modified the code that was causing the trouble but it's still worth looking into why it would crash.
  • Hi Taylor,

    Not a problem. I'll let you know once I've got some more detail on this, but this is definitely a priority for us.

  • Hi Taylor,

    We've just released a new version of SQL Prompt 6.3 with (hopefully) a fix to your issue. It now shouldn't crash SSMS or VS!

    The update is available through the website or Check for Updates.

    Please let us know if it doesn't work for you, or if you find any more issues.

    Best regards,

Sign In or Register to comment.