Red Gate forums :: View topic - SQL Prompt 5.3.4.1 Crashing SSMS on CTRL-K, CTRL-Y
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 5
SQL Prompt 5 forum

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

Search in SQL Prompt 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
blitzd



Joined: 26 Nov 2010
Posts: 31

PostPosted: Wed Jul 25, 2012 4:57 pm    Post subject: SQL Prompt 5.3.4.1 Crashing SSMS on CTRL-K, CTRL-Y Reply with quote

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.
Back to top
View user's profile Send private message
blitzd



Joined: 26 Nov 2010
Posts: 31

PostPosted: Thu Jul 26, 2012 2:55 pm    Post subject: Reply with quote

A complete uninstall/reinstall seems to have solved this problem.
Back to top
View user's profile Send private message
blitzd



Joined: 26 Nov 2010
Posts: 31

PostPosted: Thu Jul 26, 2012 4:21 pm    Post subject: Reply with quote

Spoke to soon - just crashed again on Format SQL and lost everything I was working on.
Back to top
View user's profile Send private message
blitzd



Joined: 26 Nov 2010
Posts: 31

PostPosted: Thu Jul 26, 2012 4:32 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
blitzd



Joined: 26 Nov 2010
Posts: 31

PostPosted: Thu Jul 26, 2012 4:46 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
blitzd



Joined: 26 Nov 2010
Posts: 31

PostPosted: Thu Jul 26, 2012 5:15 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Fri Jul 27, 2012 4:42 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
blitzd



Joined: 26 Nov 2010
Posts: 31

PostPosted: Fri Jul 27, 2012 4:58 pm    Post subject: Reply with quote

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:

Code:
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.
Back to top
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Mon Aug 06, 2012 2:47 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group