After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757235 - Error creation of a devicemonitor [JS]
Error creation of a devicemonitor [JS]
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: dont know
unspecified
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-28 08:11 UTC by iacopodeenosee
Modified: 2015-10-31 11:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test APP JS (3.15 KB, application/javascript)
2015-10-28 08:11 UTC, iacopodeenosee
Details

Description iacopodeenosee 2015-10-28 08:11:27 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
Comment 1 Tim-Philipp Müller 2015-10-28 17:43:54 UTC
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.
Comment 2 iacopodeenosee 2015-10-30 11:28:20 UTC
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
Comment 3 Tim-Philipp Müller 2015-10-30 21:20:01 UTC
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");
------------------------------------------------------------
Comment 4 iacopodeenosee 2015-10-31 08:07:46 UTC
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 :)
Comment 5 Tim-Philipp Müller 2015-10-31 11:50:18 UTC
Alright, thanks. Closing then, but feel free to re-open and move it into the right product (or just clone it).