Java dies with NullPointerException during comple of .ino file

OK, that also matches with the bug report I linked to above.

Can you provide a minimal sketch that will trigger the bug? Something like this:

void setup() {
  foo = 42;
}
void loop() {}