Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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