qorf / quorum-language

The primary repository for the Quorum Programming Language
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

Compiler Crash in InputOpcode: WriteJavaScript #55

Closed alleew closed 1 year ago

alleew commented 1 year ago

A crash occurred while running the compiler online. This is the stack trace:

Stack Trace Error: The object being referenced is undefined. file: InputOpcode.quorum, class: Libraries.Language.Compile.Translate.InputOpcode, action: WriteJavaScript, line: 47 file: TextToIntegerCast.quorum, class: Libraries.Language.Compile.Translate.TextToIntegerCast, action: WriteJavaScript, line: 24 file: IntegerPrimitiveToObjectCast.quorum, class: Libraries.Language.Compile.Translate.IntegerPrimitiveToObjectCast, action: WriteJavaScript, line: 23 file: ActionCallOpcode.quorum, class: Libraries.Language.Compile.Translate.ActionCallOpcode, action: WriteJavaScript, line: 523 file: ChainedActionCallOpcode.quorum, class: Libraries.Language.Compile.Translate.ChainedActionCallOpcode, action: WriteJavaScript, line: 102 file: BlockOpcode.quorum, class: Libraries.Language.Compile.Translate.BlockOpcode, action: WriteJavaScript, line: 94 file: LoopOpcode.quorum, class: Libraries.Language.Compile.Translate.LoopOpcode, action: WriteJavaScript, line: 177 file: BlockOpcode.quorum, class: Libraries.Language.Compile.Translate.BlockOpcode, action: WriteJavaScript, line: 94 file: ActionOpcode.quorum, class: Libraries.Language.Compile.Translate.ActionOpcode, action: WriteJavaScript, line: 219 file: ClassOpcode.quorum, class: Libraries.Language.Compile.Translate.ClassOpcode, action: WriteJavaScript, line: 1810 file: Compiler.quorum, class: Libraries.Language.Compile.Compiler, action: CompileToJavaScript, line: 1098 file: Compiler.quorum, class: Libraries.Language.Compile.Compiler, action: Compile, line: 591 file: Main.quorum, class: Libraries.Language.Compile.Main, action: ResponseReceived, line: 489 file: HttpHandlerWrapper.java, class: plugins.quorum.Libraries.Network.HttpHandlerWrapper, action: handle, line: 25

andreas-stefik commented 1 year ago

Fixed in 83459886b. This particular bug is likely fixed by this commit, but because I couldn't immediately see the code that triggered the problem, while the solution seemed obvious, it is possible there is some other issue here lingering that was not as clear.