Menu

#413 Duplicated procedure throws an exception  Edit

compiler
open
None
2025-11-30
2023-08-26
No

When accidentally defining a procedure twice, the compiler throwas an exception an termintes with the message "null".

The culprit is here:

java.lang.NullPointerException
    at org.openpearl.compiler.SymbolTableVisitor.differsOnlyInSpcDcl(SymbolTableVisitor.java:2147)
    at org.openpearl.compiler.SymbolTableVisitor.visitProcedureDeclaration(SymbolTableVisitor.java:409)
    at org.openpearl.compiler.SymbolTableVisitor.visitProcedureDeclaration(SymbolTableVisitor.java:81)
    at org.openpearl.compiler.OpenPearlParser$ProcedureDeclarationContext.accept(OpenPearlParser.java:3467)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at org.openpearl.compiler.OpenPearlBaseVisitor.visitProblem_part(OpenPearlBaseVisitor.java:89)
    at org.openpearl.compiler.OpenPearlParser$Problem_partContext.accept(OpenPearlParser.java:924)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at org.openpearl.compiler.SymbolTableVisitor.visitModule(SymbolTableVisitor.java:139)
    at org.openpearl.compiler.SymbolTableVisitor.visitModule(SymbolTableVisitor.java:81)
    at org.openpearl.compiler.OpenPearlParser$ModuleContext.accept(OpenPearlParser.java:401)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at org.openpearl.compiler.OpenPearlBaseVisitor.visitProgram(OpenPearlBaseVisitor.java:26)
    at org.openpearl.compiler.OpenPearlParser$ProgramContext.accept(OpenPearlParser.java:340)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at org.openpearl.compiler.Compiler.main(Compiler.java:180)

java.lang.NullPointerException
    at org.openpearl.compiler.SymbolTableVisitor.differsOnlyInSpcDcl(SymbolTableVisitor.java:2147)
    at org.openpearl.compiler.SymbolTableVisitor.visitProcedureDeclaration(SymbolTableVisitor.java:409)
    at org.openpearl.compiler.SymbolTableVisitor.visitProcedureDeclaration(SymbolTableVisitor.java:81)
    at org.openpearl.compiler.OpenPearlParser$ProcedureDeclarationContext.accept(OpenPearlParser.java:3467)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at org.openpearl.compiler.OpenPearlBaseVisitor.visitProblem_part(OpenPearlBaseVisitor.java:89)
    at org.openpearl.compiler.OpenPearlParser$Problem_partContext.accept(OpenPearlParser.java:924)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at org.openpearl.compiler.SymbolTableVisitor.visitModule(SymbolTableVisitor.java:139)
    at org.openpearl.compiler.SymbolTableVisitor.visitModule(SymbolTableVisitor.java:81)
    at org.openpearl.compiler.OpenPearlParser$ModuleContext.accept(OpenPearlParser.java:401)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
    at org.openpearl.compiler.OpenPearlBaseVisitor.visitProgram(OpenPearlBaseVisitor.java:26)
    at org.openpearl.compiler.OpenPearlParser$ProgramContext.accept(OpenPearlParser.java:340)
    at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
    at org.openpearl.compiler.Compiler.main(Compiler.java:180)

Discussion

  • Rainer Müller

    Rainer Müller - 2023-10-21
    • status: open --> accepted
    • assigned_to: Rainer Müller
     
  • Rainer Müller

    Rainer Müller - 2023-10-21
    • status: accepted --> open
    • assigned_to: Rainer Müller --> nobody
     
  • Rainer Müller

    Rainer Müller - 2023-10-21

    I could not reproduce the effect
    --> ticket is open and not assigned

     
  • Anonymous

    Anonymous - 2024-01-15
    • status: open --> accepted
    • assigned_to: Marcel Schaible
     
  • Marcel Schaible

    Marcel Schaible - 2025-11-30
    • status: accepted --> open
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB