Prompt crashes in VS and SSMS
taylor
Posts: 7
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, 6.3.0.344.
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, 6.3.0.344.
Comments
I'm sorry you're getting crashes here!
Would it be possible to send over the script to my email address: david.priddle@red-gate.com ?
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,
David
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 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:
BEGIN TRAN;
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!
David
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.
David
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,
David