Project

General

Profile

Actions

Bug #10643

closed

Некорректная диагностика: java.lang.IllegalArgumentException: null

Added by Alexander Protsenko almost 4 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
12/25/2020
Due date:
% Done:

0%

Estimated time:
Detected in build:
git
Platform:
Published in build:

Description

Ошибка лог:

ATTENTION! An unexpected error has occurred:
java.lang.IllegalArgumentException: null

The program will be terminated. Please contact us at: 
microtesk-support@ispras.ru
We are sorry for the inconvenience.

Exception stack:

java.lang.IllegalArgumentException
    at ru.ispras.fortress.util.InvariantChecks.checkTrue(InvariantChecks.java:54)
    at ru.ispras.fortress.util.InvariantChecks.checkTrue(InvariantChecks.java:38)
    at ru.ispras.fortress.util.InvariantChecks.checkNotNull(InvariantChecks.java:95)
    at ru.ispras.microtesk.translator.nml.antlrex.TypeCast.getFortressDataType(TypeCast.java:218)
    at ru.ispras.microtesk.translator.nml.antlrex.LocationFactory.newLocationExpr(LocationFactory.java:366)
    at ru.ispras.microtesk.translator.nml.antlrex.LocationFactory.location(LocationFactory.java:85)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.locationAtom(NmlTreeWalker.java:5984)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.locationVal(NmlTreeWalker.java:5846)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.locationExpr(NmlTreeWalker.java:5725)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.atom(NmlTreeWalker.java:5213)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.numExpr(NmlTreeWalker.java:4471)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.expr(NmlTreeWalker.java:4123)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.dataExpr(NmlTreeWalker.java:4055)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.formatId(NmlTreeWalker.java:2783)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.formatIdList(NmlTreeWalker.java:2571)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.attrExpr(NmlTreeWalker.java:2510)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.imageDef(NmlTreeWalker.java:2346)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.attrDef(NmlTreeWalker.java:2152)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.attrDefList(NmlTreeWalker.java:2044)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.opSpecPart(NmlTreeWalker.java:1740)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.opDef(NmlTreeWalker.java:1629)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.procSpec(NmlTreeWalker.java:463)
    at ru.ispras.microtesk.translator.nml.grammar.NmlTreeWalker.startRule(NmlTreeWalker.java:293)
    at ru.ispras.microtesk.translator.nml.NmlTranslator.startParserAndWalker(NmlTranslator.java:181)
    at ru.ispras.microtesk.translator.nml.NmlTranslator.start(NmlTranslator.java:126)
    at ru.ispras.microtesk.translator.Translator.translate(Translator.java:201)
    at ru.ispras.microtesk.MicroTESK.translate(MicroTESK.java:150)
    at ru.ispras.microtesk.MicroTESK.runTask(MicroTESK.java:142)
    at ru.ispras.microtesk.MicroTESK.main(MicroTESK.java:80)

Ошибка:

internal op op_imm8_16_32(opcode: opcode_type, imm: IMM8_16_32)
  image  = format("%8s%s", opcode, imm)

Корректный вариант:

internal op op_imm8_16_32(opcode: opcode_type, imm: IMM8_16_32)
  image  = format("%8s%s", opcode, imm.image)

Actions #1

Updated by Alexander Kamkin almost 4 years ago

  • Status changed from New to Resolved

Error message if a location type is null.

Actions #2

Updated by Alexander Protsenko almost 4 years ago

  • Status changed from Resolved to Open

Полная ситуация (для простоты отладки, работает для любой архитектуры):

mode IMM8 (i: card(8))
  syntax = format("%d", i)
  image  = format("%8s", i)

mode IMM16 (i: card(16))
  syntax = format("%d", i)
  image  = format("%16s", i)

mode IMM8_16 = IMM8
             | IMM16

internal op op_imm8_16_32(opcode: card(8), imm: IMM8_16)
  image  = format("%8s%s", opcode, imm)

Новый вид ошибки:

 46:35 ERROR (SEMANTIC): "Location imm is of unknown type" 
 46:35 ERROR (SEMANTIC): "Failed to recognize the grammar structure (ignored): 'imm'." 
 46:11 ERROR (SEMANTIC): "Failed to recognize the grammar structure (ignored): 'imm'." 

Нужно добавить имя файла в лог ошибки, откуда эти строчки ("46").

Actions #3

Updated by Alexander Protsenko almost 4 years ago

  • Status changed from Open to Resolved

Bug #10657

Actions #4

Updated by Alexander Protsenko almost 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF