Project

General

Profile

Actions

Bug #8694

closed

Parsing an empty *.mmu file causes NullPointerException

Added by Alexander Kamkin almost 7 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
MMU Plugin
Target version:
Start date:
01/30/2018
Due date:
% Done:

100%

Estimated time:
Detected in build:
svn
Platform:
Published in build:
2.5.1-beta-200127

Description

java.lang.NullPointerException
    at org.antlr.runtime.tree.BaseTreeAdaptor.isNil(BaseTreeAdaptor.java:73)
    at org.antlr.runtime.tree.CommonTreeNodeStream.nextElement(CommonTreeNodeStream.java:104)
    at org.antlr.runtime.misc.LookaheadStream.fill(LookaheadStream.java:113)
    at org.antlr.runtime.misc.LookaheadStream.syncAhead(LookaheadStream.java:107)
    at org.antlr.runtime.misc.LookaheadStream.LT(LookaheadStream.java:129)
    at org.antlr.runtime.tree.CommonTreeNodeStream.LA(CommonTreeNodeStream.java:151)
    at ru.ispras.microtesk.mmu.translator.grammar.MmuTreeWalker.startRule(MmuTreeWalker.java:240)
    at ru.ispras.microtesk.mmu.translator.MmuTranslator.start(MmuTranslator.java:124)
    at ru.ispras.microtesk.translator.Translator.translate(Translator.java:201)
    at ru.ispras.microtesk.MicroTESK.translate(MicroTESK.java:162)
    at ru.ispras.microtesk.MicroTESK.runTask(MicroTESK.java:135)
    at ru.ispras.microtesk.MicroTESK.main(MicroTESK.java:73)

Files

empty_test.mmu (0 Bytes) empty_test.mmu Alexander Kamkin, 01/30/2018 04:27 PM
Actions #1

Updated by Alexander Kamkin almost 7 years ago

Test case

Actions #2

Updated by Alexander Kamkin almost 5 years ago

  • Target version changed from 2.4 to 2.5

Added ru.ispras.microtesk.mmu.translator.EmptyTestCase.

Actions #3

Updated by Alexander Kamkin almost 5 years ago

  • Assignee changed from Andrei Tatarnikov to Alexander Kamkin

nML translator has the same problem. TreeWalker's startRule does not return anything if code is empty.

Actions #4

Updated by Alexander Kamkin almost 5 years ago

  • Assignee changed from Alexander Kamkin to Artem Kotsynyak
Actions #5

Updated by Artem Kotsynyak almost 5 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Alexander Kamkin almost 5 years ago

  • Status changed from Resolved to Closed
  • Published in build set to 2.5.1-beta-200127
Actions

Also available in: Atom PDF