Red Gate forums :: View topic - NoViableAltException & IndexOutOfRangeException
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

NoViableAltException & IndexOutOfRangeException

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
hemantgaur



Joined: 16 Dec 2009
Posts: 20

PostPosted: Mon Aug 23, 2010 6:46 pm    Post subject: NoViableAltException & IndexOutOfRangeException Reply with quote

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
Back to top
View user's profile Send private message
slaphead99



Joined: 10 Mar 2010
Posts: 93

PostPosted: Thu Aug 26, 2010 3:07 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
hemantgaur



Joined: 16 Dec 2009
Posts: 20

PostPosted: Thu Aug 26, 2010 3:21 pm    Post subject: NoViableAltException & IndexOutOfRangeException Reply with quote

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.
Back to top
View user's profile Send private message
simon.jackson



Joined: 08 Jan 2009
Posts: 45

PostPosted: Thu Aug 26, 2010 3:24 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
hemantgaur



Joined: 16 Dec 2009
Posts: 20

PostPosted: Thu Aug 26, 2010 3:27 pm    Post subject: NoViableAltException & IndexOutOfRangeException Reply with quote

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!!
Back to top
View user's profile Send private message
simon.jackson



Joined: 08 Jan 2009
Posts: 45

PostPosted: Thu Aug 26, 2010 3:28 pm    Post subject: Reply with quote

The exceptions are expected, so you can just ignore them!
Back to top
View user's profile Send private message
hemantgaur



Joined: 16 Dec 2009
Posts: 20

PostPosted: Thu Aug 26, 2010 3:32 pm    Post subject: NoViableAltException & IndexOutOfRangeException Reply with quote

Thank you Simon. Smile

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

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

Would really be ever grateful. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group