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 783578 - Introspection problem, an opaque object.
Introspection problem, an opaque object.
Status: RESOLVED OBSOLETE
Product: libgnome-volume-control
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: libgnome-volume-control-maint
libgnome-volume-control-maint
Depends on:
Blocks:
 
 
Reported: 2017-06-09 03:40 UTC by Lester Carballo
Modified: 2019-03-20 10:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
An extension to visualized the instrospection issue (4.00 KB, application/x-compressed-tar)
2017-06-11 19:11 UTC, Lester Carballo
Details

Description Lester Carballo 2017-06-09 03:40:05 UTC
Not way to access to the profiles for gjs, this work on python very well with the Mint fork, but not with gjs:

Gjs-WARNING **: JS ERROR: Error: Can't create a Javascript object for MixerCardProfile; no way to copy

This appear to be an opaque object.
Comment 1 Bastien Nocera 2017-06-09 10:24:27 UTC
I don't know what you're trying to do, or how you're trying to integrate this. My guess is that you're doing it wrongly as the API is already successfully used in gnome-shell and a number of extensions.
Comment 2 Lester Carballo 2017-06-09 17:18:11 UTC
What I'm doing is not directly relate with the shell but is related with the gnome-setting instead. So, I'm doing another complete different thing, not present or used by gnome shell currently. The gnome shell developers don't need to access to an instance of the MixerCardProfile object, because they used gnome-settings to configure the audio, and that's then not matter form him, at less for now.

I'm porting the Cinnamon settings from Python+Gtk to Gjs+Gtk. Mint migrate the audio control of the gnome-settings to python from the c original code (https://github.com/linuxmint/Cinnamon/commit/9fabe6df5a6cba68acae2c0abfa7dcc3b94aabb0) and they create a fork of libgnome-volume-control (https://lazka.github.io/pgi-docs/Cvc-1.0/index.html) as a share library, to be possible use the library outside the shell-muffin (mutter) process.

What I'm doing is porting again the code, but now from python to gjs as i'm porting cinnamon to be running inside gnome shell, that include the cinnamon settings and i will not used of course the Mint fork (as i'm on gnome), but also the Mint fork have this problem, so not way.

This issue about opaque objects with the gjs introspection is know by gnome shell developers. You can find some relate issues with other libraries. The error come from here: https://github.com/GNOME/gjs/blob/master/gi/boxed.cpp#L1235-L1246

The issues is because to export the object, the object need to be represented in a way that can be copy by gjs to then be shared. In most commond escenarios this is associate with an struct https://github.com/GNOME/libgnome-volume-control/blob/master/gvc-mixer-card.h#L52

I'm also read your comments when Giovanni port the library as a separate module of the shell. So, i understand that probably, this is a thing with a low priority to you.

I don't know how can i provide more information, but you can tell me, what is needed.

Thanks.
Comment 3 Bastien Nocera 2017-06-11 00:23:09 UTC
(In reply to Lester Carballo from comment #2)
> What I'm doing is not directly relate with the shell but is related with the
> gnome-setting instead. So, I'm doing another complete different thing, not
> present or used by gnome shell currently. The gnome shell developers don't
> need to access to an instance of the MixerCardProfile object, because they
> used gnome-settings to configure the audio, and that's then not matter form
> him, at less for now.

We don't use "gnome-settings" to configure audio. We don't use gnome-settings-daemon for that either.

<snip>

It would be easier if you provided a minimal test program, though a patch would be better. You probably just need to make it a boxed type, and add the necessary annotations.
Comment 4 Lester Carballo 2017-06-11 05:01:53 UTC
Thanks for trust, but a patch is too much for me... This type of issue could be resolved changing the interface of the struct to let copy the object and this will impact inside three big areas of gnome. I do not have the knowledge to know that I will break.
Comment 5 Lester Carballo 2017-06-11 19:11:20 UTC
Created attachment 353577 [details]
An extension to visualized the instrospection issue

The libgnome-volume-control is used as a submodule of gnome-shell, so this is a gnome shell extension that try to access to the MixerCardProfile of a device.

Just enable the extension as a normal shell extension and see the output (journalctl -f) of gnome shell, when we request the profiles from the device.
Comment 6 Lester Carballo 2018-05-17 15:43:36 UTC
Just to reference this bug from where is detecting in the gjs side:
https://gitlab.gnome.org/GNOME/gjs/issues/109

Also please, see the Giovanni Campagna recommendation in this thread, about a possible solution to this problematic from inside this library:
https://gitlab.gnome.org/GNOME/gjs/issues/109#note_47332
Comment 7 GNOME Infrastructure Team 2019-03-20 10:37:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgnome-volume-control/issues/5.