none
SSDT Randomly Crashing on Build

    Question

  • Since the SSDT Novemeber update my VS 2012 with Update 1 randomly crashes during a build of my SSDT project. This is in the error log:

    Application: devenv.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: System.AccessViolationException

    Stack:

       at Microsoft.SqlServer.TransactSql.Compiler.Compile(Microsoft.SqlServer.TransactSql.CompileMode, Microsoft.SqlServer.TransactSql.ICompilerBatch)

       at Microsoft.SqlServer.TransactSql.ProjectBatch.Execute(Microsoft.SqlServer.TransactSql.Compiler)

       at Microsoft.SqlServer.TransactSql.ProjectBuilder.BuildStage2()

       at Microsoft.SqlServer.TransactSql.ProjectBuilder.BuildInternal(System.Collections.Generic.IEnumerable`1<Microsoft.SqlServer.TransactSql.ISqlBatch>)

       at Microsoft.SqlServer.TransactSql.ProjectBuilder.Build(Microsoft.SqlServer.TransactSql.SqlVersion, System.String, System.String, System.String, System.Collections.Generic.IEnumerable`1<Microsoft.SqlServer.TransactSql.ISqlBatch>, Microsoft.SqlServer.TransactSql.MetadataSink)

       at Microsoft.Data.Tools.Schema.Sql.Build.SemanticVerification+CompilerWrapper.VerifyBatches(System.String, System.String, Boolean, System.Collections.Generic.List`1<Microsoft.SqlServer.TransactSql.ISqlBatch>)

       at Microsoft.Data.Tools.Schema.Sql.Build.SemanticVerification.Verify(Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel, Microsoft.Data.Tools.Schema.ErrorManager, System.String, System.String)

       at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.RunExtendedValidation(System.String, System.String)

       at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteValidateModelStep()

       at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteStep(System.Func`1<Boolean>)

       at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.Execute()

       at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

       at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__20.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__20, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteInstantiatedTask>d__20 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__20, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteInstantiatedTask>d__20 ByRef)

       at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(Microsoft.Build.BackEnd.ITaskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext, Microsoft.Build.BackEnd.TaskHost, Microsoft.Build.BackEnd.ItemBucket, Microsoft.Build.BackEnd.TaskExecutionMode)

       at Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__1c.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__1c, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<InitializeAndExecuteTask>d__1c ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__1c, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<InitializeAndExecuteTask>d__1c ByRef)

       at Microsoft.Build.BackEnd.TaskBuilder.InitializeAndExecuteTask(Microsoft.Build.BackEnd.Logging.TaskLoggingContext, Microsoft.Build.BackEnd.ItemBucket, System.Collections.Generic.IDictionary`2<System.String,System.String>, Microsoft.Build.BackEnd.TaskHost, Microsoft.Build.BackEnd.TaskExecutionMode)

       at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteBucket>d__f.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<ExecuteBucket>d__f, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteBucket>d__f ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TaskBuilder+<ExecuteBucket>d__f, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteBucket>d__f ByRef)

       at Microsoft.Build.BackEnd.TaskBuilder.ExecuteBucket(Microsoft.Build.BackEnd.TaskHost, Microsoft.Build.BackEnd.ItemBucket, Microsoft.Build.BackEnd.TaskExecutionMode, System.Collections.Generic.Dictionary`2<System.String,System.String>)

       at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__5.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__5, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteTask>d__5 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__5, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteTask>d__5 ByRef)

       at Microsoft.Build.BackEnd.TaskBuilder.ExecuteTask(Microsoft.Build.BackEnd.TaskExecutionMode, Microsoft.Build.BackEnd.Lookup)

       at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__0.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__0, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteTask>d__0 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__0, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteTask>d__0 ByRef)

       at Microsoft.Build.BackEnd.TaskBuilder.ExecuteTask(Microsoft.Build.BackEnd.Logging.TargetLoggingContext, Microsoft.Build.BackEnd.BuildRequestEntry, Microsoft.Build.BackEnd.ITargetBuilderCallback, Microsoft.Build.Execution.ProjectTargetInstanceChild, Microsoft.Build.BackEnd.TaskExecutionMode, Microsoft.Build.BackEnd.Lookup, Microsoft.Build.BackEnd.Lookup, System.Threading.CancellationToken)

       at Microsoft.Build.BackEnd.TargetEntry+<ProcessBucket>d__16.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TargetEntry+<ProcessBucket>d__16, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ProcessBucket>d__16 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TargetEntry+<ProcessBucket>d__16, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ProcessBucket>d__16 ByRef)

       at Microsoft.Build.BackEnd.TargetEntry.ProcessBucket(Microsoft.Build.BackEnd.ITaskBuilder, Microsoft.Build.BackEnd.Logging.TargetLoggingContext, Microsoft.Build.BackEnd.TaskExecutionMode, Microsoft.Build.BackEnd.Lookup, Microsoft.Build.BackEnd.Lookup)

       at Microsoft.Build.BackEnd.TargetEntry+<ExecuteTarget>d__0.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TargetEntry+<ExecuteTarget>d__0, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteTarget>d__0 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TargetEntry+<ExecuteTarget>d__0, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteTarget>d__0 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.Build.BackEnd.TargetEntry+<ExecuteTarget>d__0, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ExecuteTarget>d__0 ByRef)

       at Microsoft.Build.BackEnd.TargetEntry.ExecuteTarget(Microsoft.Build.BackEnd.ITaskBuilder, Microsoft.Build.BackEnd.BuildRequestEntry, Microsoft.Build.BackEnd.Logging.ProjectLoggingContext, System.Threading.CancellationToken)

       at Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__19.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__19, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ProcessTargetStack>d__19 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__19, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ProcessTargetStack>d__19 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__19, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<ProcessTargetStack>d__19 ByRef)

       at Microsoft.Build.BackEnd.TargetBuilder.ProcessTargetStack(Microsoft.Build.BackEnd.ITaskBuilder)

       at Microsoft.Build.BackEnd.TargetBuilder+<BuildTargets>d__0.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TargetBuilder+<BuildTargets>d__0, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<BuildTargets>d__0 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.TargetBuilder+<BuildTargets>d__0, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<BuildTargets>d__0 ByRef)

       at Microsoft.Build.BackEnd.TargetBuilder.BuildTargets(Microsoft.Build.BackEnd.Logging.ProjectLoggingContext, Microsoft.Build.BackEnd.BuildRequestEntry, Microsoft.Build.BackEnd.IRequestBuilderCallback, System.String[], Microsoft.Build.BackEnd.Lookup, System.Threading.CancellationToken)

       at Microsoft.Build.BackEnd.RequestBuilder.BuildProject()

       at Microsoft.Build.BackEnd.RequestBuilder+<BuildAndReport>d__11.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.RequestBuilder+<BuildAndReport>d__11, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<BuildAndReport>d__11 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.RequestBuilder+<BuildAndReport>d__11, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<BuildAndReport>d__11 ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.Build.BackEnd.RequestBuilder+<BuildAndReport>d__11, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<BuildAndReport>d__11 ByRef)

       at Microsoft.Build.BackEnd.RequestBuilder.BuildAndReport()

       at Microsoft.Build.BackEnd.RequestBuilder+<RequestThreadProc>d__d.MoveNext()

       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.RequestBuilder+<RequestThreadProc>d__d, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<RequestThreadProc>d__d ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Threading.Tasks.VoidTaskResult, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[Microsoft.Build.BackEnd.RequestBuilder+<RequestThreadProc>d__d, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<RequestThreadProc>d__d ByRef)

       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.Build.BackEnd.RequestBuilder+<RequestThreadProc>d__d, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<RequestThreadProc>d__d ByRef)

       at Microsoft.Build.BackEnd.RequestBuilder.RequestThreadProc(Boolean)

       at Microsoft.Build.BackEnd.RequestBuilder.<StartBuilderThread>b__9()

       at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()

       at System.Threading.Tasks.Task.Execute()

       at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object)

       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)

       at System.Threading.Tasks.Task.ExecuteEntry(Boolean)

       at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork(System.Object)

       at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)

       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

       at System.Threading.ThreadHelper.ThreadStart(System.Object)

    I've tried the Decemember update but the same problem continues.

    There is a similar thread here http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/3897c82b-7181-460c-8bfb-f3c3e245965f this suggestions turning of the extended T-SQL checks. I've tried this and I haven't had a crash yet, but I then run into this bug: http://connect.microsoft.com/VisualStudio/feedback/details/765217/when-compiling-vs2010-database-project-in-vs2012-i-receive-error-sql71566 (which is another bug that reappeared in the November update).

    So I can either have a build than sometimes crashes VS or I can have a build that does work with a nonsense reason.

    Better still I should stick with VS2010 database projects, whilst not perfect at least it was stable. These "regualar updates" seem to be a way of bypassing testing.

    An SSDT lover who is becoming increasing frustrated with it.

    Simon

    Tuesday, December 18, 2012 10:41 AM

Answers

  • I spoke with Gert. Disabling extended T-SQL checks was the solution. It mean't having to remove all of the places where there was a filegroup reference on the clustered index and table (as per the connect case above). But it has solved the problem.

    • Marked as answer by Simon12345 Wednesday, January 09, 2013 10:51 AM
    Wednesday, January 09, 2013 10:51 AM

All replies

  • Does anyone know how I can rollback my SSDT installation to remove the Dec and Nov updates?

    The above problem is fully reproducable on two machines now with one specific project I have. First build is always fine, the 2nd throws an exception.

    Is this possible to rollback?

    If anyone at MSFT would like to look at the project that causes the exception please let me know (it is to big to email).

    Thanks

    Simon

    Monday, December 31, 2012 1:02 PM
  • If you send me the project I will look at it today, gertd at microsoft dot com.

    -GertD @ www.sqlproj.com

    Monday, December 31, 2012 6:31 PM
    Moderator
  • I spoke with Gert. Disabling extended T-SQL checks was the solution. It mean't having to remove all of the places where there was a filegroup reference on the clustered index and table (as per the connect case above). But it has solved the problem.

    • Marked as answer by Simon12345 Wednesday, January 09, 2013 10:51 AM
    Wednesday, January 09, 2013 10:51 AM