SQL Prompt 5.3.4.1 Crashing SSMS on CTRL-K, CTRL-Y

blitzdblitzd Posts: 40
edited August 6, 2012 9:47AM in SQL Prompt Previous Versions
Starting this morning SQL Prompt has started crashing every time I use the CTRL-K, CTRL-Y key combinations. When I debug this is what I see:

System.NullReferenceException was unhandled
Message=Object reference not set to an instance of an object.
Source=RedGate.SqlPrompt.Engine
StackTrace:
at RedGate.SqlPrompt.Format.Layout.BackgroundDelegate.()
at RedGate.SqlPrompt.Format.Layout.BackgroundDelegate.()
at RedGate.SqlPrompt.Format.Refactoring.()
at RedGate.SqlPrompt.Format.Refactoring.()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

SSMS then closes.

I'm using the RTM version of SSMS 2012, and this feature had worked with it up until today. When the issue started occurring I did check for an update to SQL Prompt, and there was one - which I installed, but the issue persists.

Comments

  • A complete uninstall/reinstall seems to have solved this problem.
  • Spoke to soon - just crashed again on Format SQL and lost everything I was working on.
  • Also in addition to this I have noticed that the RedGate buttons on the menu bar are acting very strangely - every time I move them and re-open SSMS they're either back to their default place, or they show up twice. If I remove the buttons altogether by unchecking the RedGate option, the next time I open SSMS they're back.

    If I make any other modifications to non-RedGate buttons, they persist just fine.
  • I also noticed that after uninstalling all RedGate tools there was still a RedGate toolbar showing up, it was empty with no buttons.

    I'm doing a repair of the shared features install for SQL 2012 to see if this resolves the issue.

    If anyone from RedGate has some insight into this, it would be great to hear from you.
  • After a full uninstall of all RedGate products, a repair of SQL Management Studio 2012, and a re-install of the latest versions - I am still facing the same issues.

    The RedGate and SQL Search toolbars comes back every time I re-start SSMS, despite being unchecked in customize toolbar options, or even deleted. They don't remember the position they were placed in, and often times the buttons that show up on either one appear to be random. Sometimes the RedGate toolbare has SQL Search on it, sometimes it doesn't. Sometimes the SQL Search toolbare has SQL Source Control and SQL Test on it, sometimes it doesn't. The most annoying aspect of this particular issue though, is that I do NOT want the toolbar in it's default place - I use that space for the SQL Editor toolbar.

    What is more than an annoyance though, is the crashing - it's causing me to lose productivity. I've been using SQL Prompt for so long now that it's not even a conscious thought to reformat anymore. I hit that key combination at the end of typing any statement reflexively - and now it's causing crashes and lost work.
  • Thanks for your post. I'm not sure why it keeps crashing SSMS for you. Did it give you the chance to submit a bug report when it crashed? If it does, can you send it in with your email address?

    Could you also take a look at the log file? This can be found in SQL Prompt 5 > Help > Show log

    With regards to the problem with the toolbar, I think this is a known issue. I'll just confirm that and let you know if/when it's going to be fixed.
    Chris
  • There is no chance to submit a bug report. The Laying out SQL window pops up, the progress bar will move a bit, and then the background SSMS window goes pale (unresponsive) and the program closes. Sometimes I have the option of debugging, sometimes I do not - the stacktrace that I first provided was the immediate error that was shown when I did a debug session on ssms.exe.

    The log file shows only INFO messages when this crash occurs.

    I believe I have identified the exact problem that causes the crash, it's when I go to format a statement like the below one:
    DECLARE @Variable INT = ?
    

    The script I'm editing will be run in an SSIS Execute SQL Task, and the ? is how the parameters are passed to it. It does show in the editor as 'Incorrect Syntax' - but I wouldn't think that trying to format it should crash SSMS entirely.
  • Sorry for the delay, I've been on holiday.

    I can confirm that if you supply ? as a value for a parameter, the 'Format SQL' causes SSMS to crash.

    I've logged bug SP-4489 for our developers to take a look at.

    Thanks for finding the cause of the problem for us.
    Chris
Sign In or Register to comment.