DB Pro 2005: System.ArgumentException: Unable to create AST

OliwaOliwa Posts: 42 Bronze 2
edited September 21, 2009 5:59AM in SQL Prompt Previous Versions
I am trying to do a Schema Compare between my project and the dev database and VS 2005 crashes when it gets to the part "Comparing Databases". I can compare the test database to the dev database, but as soon as my project is involved it crashes.

After disabling all Add Ins I discovered SQL Prompt v4.0 was the offender. With it enabled schema compares fail, with it disabled they work.

[Pid=7532;Tid=1;Time=14:38:47]: Verbose: 8: Entering SchemaCompareVirtualTreeControl.Initialize(...): sourceDBName = MyDB(Source Project), targetDBName = devserver.MyDB.dbo (Target Database).
[Pid=7532;Tid=1;Time=14:38:47]: Verbose: 8: Entering SchemaCompareTree constructor.
[Pid=7532;Tid=1;Time=14:38:47]: Verbose: 8: Entering SchemaCompareEditorPane.PopulateStatusStrip().
[Pid=7532;Tid=1;Time=14:38:47]: Verbose: 8: Entering SchemaCompareEditorPane.UpdateAndShowSyncScript(bool).
[Pid=7532;Tid=12;Time=14:39:22]: Verbose: 4: Entering DataPackage.Sqm (getter).
[Pid=7532;Tid=12;Time=14:39:22]: Warning: 64: Exception Caught in JobManager.RunImpl(object): System.ArgumentException: Unable to create AST Node Type: 'antlr.CommonAST' ---> System.InvalidCastException: Unable to cast object of type 'antlr.CommonAST' to type 'antlr.collections.AST'.
at antlr.ASTFactory.createFromNodeTypeObject(Type nodeTypeObject)
--- End of inner exception stack trace ---
at antlr.ASTFactory.createFromNodeTypeObject(Type nodeTypeObject)
at antlr.ASTFactory.createFromNodeType(Int32 nodeTypeIndex)
at antlr.ASTFactory.create(IToken tok)
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.constant()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.subExpression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.mulExpression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.addExpression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.expression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.subSearchCondition()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.searchConditionNOT()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.searchConditionAND()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.searchCondition()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.subExpression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.mulExpression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.addExpression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.expression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.subSearchCondition()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.searchConditionNOT()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.searchConditionAND()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.searchCondition()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ConstraintParser.parseExpression()
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.ParserHelper.TextEqualWithExtraParantheses(String text1, String text2, Options options)
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.Default.DefaultTextEquals(String text, String targetText, Options options)
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.Field.Equals(Field targetField, Options options)
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.Table.Equals(IDatabaseObject targetObject, Options options)
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.Database.CompareWith(Differences differences, IDatabaseObjects objects, IDatabaseObjects targetObjects, Options options, Int32 targetDBMajorVersion, Int64 totalCount, Int64& count, Int32& percentage)
at Microsoft.VisualStudio.TeamSystem.Data.Compare.Schema.Database.CompareWith(Database targetDatabase, Options options)
at Microsoft.VisualStudio.TeamSystem.Data.SchemaAndDataCompare.UI.Editors.SchemaCompareDataPopulationJob.Run()
at Microsoft.VisualStudio.TeamSystem.Data.Common.Threading.JobManager.JobBase.<Microsoft.VisualStudio.TeamSystem.Data.Common.Threading.JobManager.IManageableJob.RunImpl>b__0(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at Microsoft.VisualStudio.TeamSystem.Data.Common.Threading.JobManager.JobBase.Microsoft.VisualStudio.TeamSystem.Data.Common.Threading.JobManager.IManageableJob.RunImpl(Object dummyArg)

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Woops!!

    I cam accross this exception for first time, till now no one has encountered this issue!!

    Can you try reinstalling SQL Prompt and check whether the issue still persists?
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • OliwaOliwa Posts: 42 Bronze 2
    Just uninsteall/reinstall? Or should I do some manual cleanup before reinstalling?
  • Anu DAnu D Posts: 876 Silver 3
    Yes you can follow below mentioned steps:

    1. Uninstall SQL Prompt 3.9 from the machine
    2. Navigate to the following path in the registry using the Windows Registry Editor (by typing 'regedit' in the run window):
    HKEY_Local_Machine/Software/Microsoft/Microsoft SQL Server/90 (where ever you have your SQL server installed)/Tools/Shell/AddIns
    If you find any registry values starting with "RedGate" in this key, follow these steps:
    · Delete the "RedGate" values.
    · Close the registry editor window
    · Run SqlWb.exe /setup to re-initialize Management Studio's interface
    · Check again by opening SSMS

    3. And check if still you are getting the same issue.

    4. Now Install SQL Prompt 4.0 on your machine.

    5. And check if still you are getting the same issue.

    Kindly let us know if this fixes the issue.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
Sign In or Register to comment.