app:on_command_line() is broken
Open
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 491
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
Attempting to use the app:on_command_line signal leads to a crash:
#!/usr/bin/env lua5.1
lgi = require('lgi')
local gtk = lgi.require('Gtk', '3.0')
local gio = lgi.require('Gio', '2.0')
local app = gtk.Application {
flags = gio.ApplicationFlags.HANDLES_COMMAND_LINE,
}
function app:on_command_line(command) end
app:run { arg[0], ... } --method shown in the examples
--app:run(arg) --another method I thought might work
This script fails with:
lua5.1: /usr/share/lua/5.1/lgi/override/GObject-Value.lua:78: bad argument #3 to 'get' (number expected, got nil)
stack traceback:
[C]: in function 'get'
/usr/share/lua/5.1/lgi/override/GObject-Value.lua:78: in function 'marshaller'
/usr/share/lua/5.1/lgi/override/GObject-Closure.lua:126: in function 'marshal_cell'
/usr/share/lua/5.1/lgi/override/GObject-Closure.lua:162: in function </usr/share/lua/5.1/lgi/override/GObject-Closure.lua:144>
[C]: in function 'run'
./gtk-test.lua:12: in main chunk
[C]: ?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided gtk-test.lua reproduction with Lua 5.1 and inspect the failure through lgi/override/GObject-Value.lua and lgi/override/GObject-Closure.lua. Trace app:on_command_line during app:run and make the signal invocation complete without the reported marshalling crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100