Forums

Cobra Internal Error on def init

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Cobra Internal Error on def init

Postby dennis » Wed Feb 20, 2008 6:37 pm

I received an error:

Code: Select all
error: COBRA INTERNAL ERROR / IndexOutOfRangeException / Index was outside the bounds of the array.


so, by process of elimination, I whittled the code down to this:

class Abc

def init(_ghi as int)


When I compile just this, I also get the internal error.

The source of the problem is the underscore, but the compiler should handle this better.
dennis
 
Posts: 21

Re: Cobra Internal Error on def init

Postby Charles » Wed Feb 20, 2008 6:50 pm

Confirmed and will fix for next release (expected some time next week).

As you pointed out, the work around is to remove the underscore.

I think I can also improve Cobra to give the line number of the last AST node it processed meaning that in the future such errors will be easier to find. There is actually code for this, but it doesn't work in enough circumstances.

Thanks for the report.
Charles
 
Posts: 2510
Location: Los Angeles, CA

Re: Cobra Internal Error on def init

Postby dennis » Wed Feb 20, 2008 8:42 pm

I had hoped the verbosity switch might help me track down the error message. I almost certainly won't try 5 again. :lol:

Would it be possible to turn on verbose output only for a particular phase of compilation? For example, I didn't want to see all the types, etc., scrolling by.

I'm sorry, I'm not well-versed on compiler technology.
dennis
 
Posts: 21

Re: Cobra Internal Error on def init

Postby Charles » Wed Feb 20, 2008 9:45 pm

We could certainly put labels on various types of output and then specify those on the command line. Maybe that is something people can work after the source is opened up next week because I imagine I'll be too busy on fixes and gaps to get to this any time soon.

I get by alright with putting in temporary "trace" statements where I suspect they are needed.
Charles
 
Posts: 2510
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: Charles and 4 guests