Skip to content

Invalid lua can trigger assertion and affect future commandΒ #1079

@prvyk

Description

@prvyk

Describe the bug

EVAL "return 'hello lua" 0

(mismatched quote)

(error) Compilation error: [string "return 'hello lua"]:1: unfinished string near

EVAL "return 'hello lua'" 0

(now the quoting is correct)

(error) ERR Lua encountered an error: attempt to call a nil value

EVAL "return 'hello lua'" 0

(exact same as above, quoting is correct)

"hello lua"

  1. EVAL "return 'hello lua" 0
    (exact same as 1st, so mismatched quote)

"hello lua"

The first command triggers an assertion in LuaStateWrapper.cs:372 **, and also affects processing of next command and so on.

** It's not particular to that specific command, the assertion will be triggered also on other failures like 'EVAL foo 0'.

Steps to reproduce the bug

EVAL foo 0
EVAL "return bar" 0
EVAL "return bar" 0
EVAL foo 0

Expected behavior

No response

Screenshots

No response

Release version

v1.0.59

IDE

No response

OS version

No response

Additional context

No response

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions