This project has moved and is read-only. For the latest updates, please go here.

Irony crash with SQL grammar

Jul 25, 2009 at 4:11 PM

entering this string in the IronyGrammarExplorer sample (latest Irony build as of now, 25/7/2009), with SQL syntax, crashes the application:

select to_char('

(as soon as I press the "'" char).

I don't know how to debug this. Can you help?

Jul 25, 2009 at 4:54 PM

Does it really crash (exit with error), or it throws internal exception that stops you in debugger? If this is the second case (stops in debugger) then disable "stop on exception" in Exceptions dialog in Debug menu in VS. Looks like it is editor highlighter code, it does not handle well incomplete code - yet. If this doesn't help, then disable highlighter by commenting out the call to StartHighlighter in line 268, file fmGrammarExplorer.cs

Jul 25, 2009 at 5:23 PM
Edited Jul 25, 2009 at 5:24 PM

I've found (and work-arounded) the code that makes Irony crash.

It's in the StringLiteral.cs module, in this function:


override bool ConvertValue(CompoundTokenDetails details) {
string value = details.Body;

value is null after I enter that string, "select to_char('".



Jul 26, 2009 at 6:32 AM


thanks for the update. I have trouble reproducing the crash and this "value==null" moment. Can you please provide more details? what is the exception, where it happens?