Skip to content

Linux: Segmentation fault when running lua code from file #3

Description

@igorlfs

Hello,

While investigating #2, I ran into another issue: when I run a Lua program directly from the shell, I get a segmentation fault.

Environment:

[EMMY] version: 1.9.0, lua version: 55

Linux 6.19.11
neovim with nvim-dap

Configuration:

        {
            "type": "emmylua",
            "request": "launch",
            "name": "EmmyLua",
            "host": "localhost",
            "port": 9967,
            "sourcePaths": [
                "${workspaceFolder}"
            ],
            "ext": [
                ".lua",
                ".lua.txt",
                ".lua.bytes"
            ],
            "ideConnectDebugger": true
        }

Sample file:

local emmy_path = "/home/dev/.local/share/mise/installs/github-emmy-lua-emmy-lua-debugger/latest/?.so"

package.cpath = package.cpath .. ";" .. emmy_path

-- Initialize the debugger
local dbg = require("emmy_core")
dbg.tcpListen("localhost", 9967)

-- Optional: Wait for IDE connection
dbg.waitIDE()

dbg.breakHere()

for i = 1, 10 do
	local x = i * i
	print(x)
end

Reproduction:

  1. lua file.lua
  2. Attach debugger
  3. Continue
  4. Message with "core dumped" shows up on the console

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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