With the following .sdf file, eclipse/spoofax throws an error about a stackoverflow:

Error messages and crashes occur after opening a .mjv (minijava) file. The errors seem to occur because of the * in the rule on line 9 and 10 (a typo to have it on both lines), but I think it shouldn’t crash the editor?

After the crash I couldn’t get eclipse to start any more, this is the error log:

After a lot of searching I “fixed” the problem by using a fresh copy of eclipse and reinstalling Spoofax/IMP, importing the old project without the attached file and then rebuilding the project.

Submitted on 27 September 2011 at 09:43

On 27 September 2011 at 17:03 Lennart Kats commented:

Normally Eclipse catches any StackOverflowError. If it doesn’t do that at startup, that’s really an Eclipse problem. Some kind of workaround might be possible, but won’t be trivial since you can’t catch StackOverflowErrors using a normal try/catch. Another workaround might be to somehow detect that Eclipse is still starting and then defer parsing. Again tricky. Although it’s really an upstream issue, I’ll leave this one open because of the impact it has…

Note that a different workaround for users is to move the offending project (or include directory in the project) to a different location when starting Eclipse.

On 27 September 2011 at 17:03 Lennart Kats tagged eclipse

On 8 January 2013 at 14:53 Eelco Visser tagged sdf

On 27 June 2014 at 22:20 Guido Wachsmuth commented:

This does not happen any longer in newer Eclipse versions. The erroneous fragment causes a StackOverflowError, which is caught by Eclipse. Eclipse recommends to restart itself, but you should not follow this recommendation. First close the editor, then restart manually. You can even fix the grammar and build the project, before you restart.

On 27 June 2014 at 22:20 Guido Wachsmuth closed this issue.

Log in to post comments