Skip to content

fix crash in some circumstances when debugging using IntelliJ-EmmyLua#76

Open
E-Fir wants to merge 1 commit intopkulchenko:masterfrom
logiceditor-com:avr/9596/fix-emmylua-debugging
Open

fix crash in some circumstances when debugging using IntelliJ-EmmyLua#76
E-Fir wants to merge 1 commit intopkulchenko:masterfrom
logiceditor-com:avr/9596/fix-emmylua-debugging

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