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

Segmentation fault when using upower and playerctl interfaces #301

Open
VentGrey opened this issue Oct 24, 2022 · 1 comment
Open

Segmentation fault when using upower and playerctl interfaces #301

VentGrey opened this issue Oct 24, 2022 · 1 comment

Comments

@VentGrey
Copy link

Hello lgi development team. I've encounteded an issue with both lua and luajit when trying to use the playerctl and upower interfaces. The output itself is not very descriptive as the command line only reads `Segmentation fault".

I don't even know where to start as it is easy to get lost, I've made the following upower example code to explain:

local upower = require("lgi").require("UPowerGlib")
local devices = upower.Client():get_devices()

The same happens with playerctl:

local lgi = require("lgi")
local Playerctl = lgi.Playerctl
local player = Playerctl.Player{}

print(player:get_title())

I think I have all the needed introspection objects needed. Placing such code inside a GLib main loop doesn't change the output at all. Any ideas on what might be happening?

@ntd
Copy link
Contributor

ntd commented May 7, 2023

local upower = require("lgi").require("UPowerGlib")
local devices = upower.Client():get_devices()

Here it works without any segmentation fault (lua 5.4.4, lgi master).

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

No branches or pull requests

2 participants