TypeCobolTeam / TypeCobol

TypeCobol is an Incremental Cobol parser for IBM Enterprise Cobol 6 for zOS syntax. TypeCobol is also an extension of Cobol 85 language which can then be converted to Cobol85.
Other
77 stars 25 forks source link

NullReference in RedefinesChecker.OnNode(DataRedefines redefinesNode) #2618

Open efr15 opened 4 months ago

efr15 commented 4 months ago

Describe the bug NullReference in RedefinesChecker.OnNode(DataRedefines redefinesNode)

at TypeCobol.Compiler.Diagnostics.RedefinesChecker.OnNode(DataRedefines redefinesNode) at TypeCobol.Compiler.Diagnostics.CrossCompleteChecker.Visit(DataRedefines dataRedefines) at TypeCobol.Compiler.Nodes.Node.AcceptASTVisitor(IASTVisitor astVisitor) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.AcceptASTVisitor(IASTVisitor astVisitor) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.AcceptASTVisitor(IASTVisitor astVisitor) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.AcceptASTVisitor(IASTVisitor astVisitor) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.AcceptASTVisitor(IASTVisitor astVisitor) at TypeCobol.Compiler.Nodes.Node.VisitChildrens(IASTVisitor astVisitor, Boolean continueVisit, IEnumerable1 childrenNodes) at TypeCobol.Compiler.Nodes.Node.AcceptASTVisitor(IASTVisitor astVisitor) at TypeCobol.Compiler.Parser.ProgramClassParserStep.CrossCheckPrograms(SourceFile root, TemporarySemanticDocument temporarySemanticDocument, TypeCobolOptions compilerOptions) at TypeCobol.Compiler.CompilationUnit.RefreshProgramClassDocumentSnapshot() at TypeCobol.LanguageServer.Workspace.RefreshSyntaxTree(FileCompiler fileCompiler, SyntaxTreeRefreshLevel refreshLevel) at TypeCobol.LanguageServer.Workspace.<>c__DisplayClass102_0.<TimerEvent>g__Refresh|0() at TypeCobol.LanguageServer.TypeCobolServerHost.MessageHandler(IMessageHandler messageHandler, TypeCobolServer typeCobolServer)

To Reproduce No idea about the source code used.

Technical Will be edited by a team member. Implementation details with the chosen solution.

How to test automatically Will be edited by a team member. Only if our current automated tests doesn't handle this.

fm-117 commented 4 months ago

Nothing can be null and produce a NullRef in RedefinesChecker.OnNode so this looks like the stacktrace is incomplete due to some inlining. This is most likely a duplicate of #2306.