SQL Prompt 6.0.0.412 EAP - Object reference not set

Provides intelligent code completion for SQL Server editors.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Paul Stephenson, Michelle Taylor, Mike Upton, justin.caldicott, Aaron Law

SQL Prompt 6.0.0.412 EAP - Object reference not set

Postby atompkins » Tue Aug 27, 2013 4:19 pm

Object reference not set to an instance of an object. (Microsoft.VisualStudio.Editor.Implementation)

SSMS 2012 11.0.3128.0


I use solutions and projects within those solutions. The one I'm currently working on has 13 projects. If I open a .sql script file from a project, close it and then try to open it again I get the above error. If I close the solution and reopen I can open the .sql file once again but only once. I am going to have to go back to using v5 as this is limiting.

I am wondering if this has anything to do with the new Tab History button. It seems quite useful except that it opens individual .sql files on startup instead of the solution/project they belong to. SSMS creates a blank/fake solution file for them all to live in. They get closed when I open my solution anyway.
atompkins
 
Posts: 13
Joined: Tue Jul 05, 2011 10:45 am

Postby blitzd » Tue Aug 27, 2013 9:02 pm

I'm also having this issue, I just tracked it back to SQL Prompt 6 EAP mere moments ago. I am also using a solution, with many projects.

I have found that the tab history option appears to make a mess of things when the tabs you may have had open were a part of a solution, as it does NOT re-open the old solution, and instead adds them to the new default solution that SSMS creates. When this occurs to scripts that are in solutions/projects under source control it gets very messy - and that seems to be where the object references errors are coming from for me most of the time.
blitzd
 
Posts: 32
Joined: Fri Nov 26, 2010 7:30 pm

Postby ahmannj » Tue Aug 27, 2013 9:57 pm

Also seeing this problem today in SSMS 2012, also with a solution with several projects. This happens for me when reopening a file within one of those projects that was modified outside of SSMS (in VS, actually)
ahmannj
 
Posts: 13
Joined: Fri Jan 06, 2006 5:05 pm
Location: Minneapolis, MN. USA

Postby Aaron Law » Wed Aug 28, 2013 9:24 am

Thanks for reporting this – I can recreate it and will look into a fix for you.

In the meantime if this is interfering with your work you can disable the tab history feature by seting the <Enabled> variable to false in
%localappdata%\\SQL Prompt 6\\RedGate_SQLPrompt_CommonUI_Options_TabMagicOptions.xml
Aaron Law
 
Posts: 250
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby atompkins » Wed Aug 28, 2013 12:08 pm

Workaround confirmed, thanks Aaron.
atompkins
 
Posts: 13
Joined: Tue Jul 05, 2011 10:45 am

Postby Aaron Law » Thu Aug 29, 2013 8:54 am

I've just uploaded 6.0.0.435 which has a fix for the null reference exception. You can get it from check for updates in prompt or download from here.

Blitzd: we've also changed the behaviour so prompt won't automatically reopen queries belonging to a project/solution on startup.
Aaron Law
 
Posts: 250
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software


Return to SQL Prompt 5

Who is online

Users browsing this forum: No registered users and 0 guests