GNOME Bugzilla – Bug 757235
Error creation of a devicemonitor [JS]
Last modified: 2015-10-31 11:50:18 UTC
Created attachment 314288 [details] test APP JS when i try to implement into a gnome-shell extension a Gst.DeviceMonitor this makes crash gnome-shell, as was suggested to me I created a test app in JS to recreate the error, the code seems correct and I think the problem is in the binding of the library to JS. LOG of the test app: http://pastebin.com/PRVrHwxY LOG of the extension: http://pastebin.com/i5DKq48w
The first two issues can be solved by adding Gst.init(null) in a strategic place ;) The last one g_object_class_find_property: assertion 'G_IS_OBJECT_CLASS (class)' failed I don't know where that comes from, what line of js code triggers it. Perhaps you could ask some people familiar with gnome-shell or gjs how to debug this further (they probably have an environment where they can see more information and figure out what js call causes this). I put printfs around all other gst calls, so it might not be gstreamer-related.
this is the line makes this issue: this.dmBus = this.deviceMonitor.get_bus(); and this is the LOG: ott 29 07:52:17 ArchBox gnome-session[1043]: (gnome-shell:1120): GLib-GObject-CRITICAL **: g_object_class_find_property: assertion 'G_IS_OBJECT_CLASS (class)' failed ott 29 07:52:18 ArchBox systemd-coredump[1788]: Process 1120 (gnome-shell) of user 1000 dumped core. ott 29 07:52:18 ArchBox gnome-session-binary[1043]: WARNING: Application 'gnome-shell.desktop' killed by signal 11 ott 29 07:52:18 ArchBox gnome-session[1043]: gnome-session-binary[1043]: WARNING: Application 'gnome-shell.desktop' killed by signal 11 and this the coredump: http://pastebin.com/vWCbvhCC
If I set a breakpoint in gdb, it doesn't even end up gst_device_monitor_get_bus(), so the issue is likely somewhere in the bindings layer. However, if I do this: let device_monitor = new Gst.DeviceMonitor; instead of let device_monitor = Gst.DeviceMonitor.new(); then it all seems to work fine at first glance: ------------------------------------------------------------ #!/usr/bin/gjs const Gst = imports.gi.Gst; Gst.init(null); let device_monitor = new Gst.DeviceMonitor; log("get_bus"); let bus = device_monitor.get_bus(); log("start"); device_monitor.start(); log("stop"); device_monitor.stop(); log("done"); ------------------------------------------------------------
you're right, I used the function NEW as the documentation is shown as the only obj constructor in any case I'll open a bug report in the bindings section, thanks for your time :)
Alright, thanks. Closing then, but feel free to re-open and move it into the right product (or just clone it).