NoViableAltException & IndexOutOfRangeException

In the immediate window gets bombarded with the following message:

A first chance exception of type 'antlr.NoViableAltException' occurred in RedGate.SQLCompare.ASTParser.DLL

These series of messages appear while it is executing RegisterForDataCompare statement.

If I scan the series of above messages, in the immediate window, I would at random, see the following message as well:

A first chance exception of type 'System.IndexOutOfRangeException' occurred in RedGate.SQLCompare.ASTParser.DLL

Comments

  • This is on the SDK forum, so I assume you have written a custom application.

    How do the supplied examples work for you? It is a lot easier to comment on what might be happing when I know what source is being used.

    If the supplied examples work- can you describe what is different about your code as clearly the issue will be with this code...
  • Hi slaphead,

    This is a custom application, yes. I started with the supplied examples and then modified it to suit my requirement. I hope I was not clear in my earlier reporting, but I am debugging my application in Visual Studio. I put a break point on "db.RegisterForDataCompare" statement. When I step to the next executable statement, I look at my immediate window and I get series of "NoViableAltException" exceptions. In between these exceptions I see a few of 'System.IndexOutOfRangeException' exceptions. The process does not terminate, it continues executing, but just want to know what is going on, as it tells me something is not perfect and it might raise its head some where later.

    Also as an additional information, if it might help, the entire red gate operation is implemented in a WCF service. Might or might not be related, but just wanted to throw that in.
  • Hi,
    The exceptions are occurring within our parser.
    The antlr parser generator ( http://www.antlr.org/ ) produces code which uses exceptions for backtracking. They should all be caught within the RegisterForDataCompare method.

    The only exceptions I would expect to see for this reason are NoViableAltException and System.IndexOutOfRangeException.
  • Thank you Simon.

    So what are you exactly saying? That this is Ok and I should ignore it? If so, I am cool with it, I just want to make sure I am not doing anything wrong.

    Thank you!!
  • The exceptions are expected, so you can just ignore them!
  • Thank you Simon. :-)

    Really appreciate your promptness. Can you please look into my out of disk space issue also, that I have logged right after this one? :roll:

    That one is a real show stopper and I cannot test further because of that.

    Would really be ever grateful. Thanks.
Sign In or Register to comment.