Skip to content

Conversation

@E-Fir
Copy link

@E-Fir E-Fir commented Oct 31, 2022

Problem: MobDebug crashes when debugging using IntelliJ-EmmyLua.
Example:

line:   EXEC return {
line:         get = 'GET_single-senders-senderId';

./apis/nmos.lua:309: /usr/share/lua/5.4/mobdebug.lua:812: bad argument #2 to 'sub' (number expected, got nil) stack traceback:
        [C]: in function 'error'
        /usr/share/lua/5.4/mobdebug.lua:719: in hook '?'
        ...

Solution: wrap string.sub in pcall.

line:   EXEC return {
line:         get = 'GET_single-senders-senderId';

./apis/nmos.lua:309: /usr/share/lua/5.4/mobdebug.lua:812: bad argument #2 to 'sub' (number expected, got nil)
stack traceback:
        [C]: in function 'error'
        /usr/share/lua/5.4/mobdebug.lua:719: in hook '?'
        ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant