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 793370 - vapicheck: CRITICAL **: assertion 'self != NULL' failed
vapicheck: CRITICAL **: assertion 'self != NULL' failed
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: general
0.39.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-12 01:33 UTC by Paul Wise
Modified: 2018-05-22 16:00 UTC
See Also:
GNOME target: ---
GNOME version: 3.25/3.26


Attachments
build: Don't install vapicheck (1.08 KB, patch)
2018-02-12 10:07 UTC, Rico Tzschichholz
committed Details | Review

Description Paul Wise 2018-02-12 01:33:55 UTC
Forwarding https://bugs.debian.org/890209

The vapicheck program prints four assertions no matter which file is loaded. I believe these are defects in vapicheck itself rather than the files that vapicheck is checking.

$ vapicheck
Usage: vapicheck library.gidl
$ touch foo.gidl
$ vapicheck foo.gidl

** (process:31239): CRITICAL **: vala_collection_get_size: assertion 'self != NULL' failed

** (process:31239): CRITICAL **: vala_list_get: assertion 'self != NULL' failed

** (process:31239): CRITICAL **: vala_code_context_get_report: assertion 'self != NULL' failed

** (process:31239): CRITICAL **: vala_report_err: assertion 'self != NULL' failed
$ apt-file search -I dsc .gidl
poppler: /glib/poppler.gidl
$ apt source -qq poppler
...
$ vapicheck poppler-0.62.0/glib/poppler.gidl 

** (process:722): CRITICAL **: vala_collection_get_size: assertion 'self != NULL' failed

** (process:722): CRITICAL **: vala_list_get: assertion 'self != NULL' failed

** (process:722): CRITICAL **: vala_code_context_get_report: assertion 'self != NULL' failed

** (process:722): CRITICAL **: vala_report_err: assertion 'self != NULL' failed
Comment 1 Rico Tzschichholz 2018-02-12 09:54:11 UTC
While this is tool doesn't do what the name suggests, it might be better to simply not install it at all.

vapicheck is meant to work on the gidl files which are basically only present in vala's git repo, therefore it can be considered an internal tool which is not used anywhere else.

Nonetheless those criticals deserve a look.
Comment 2 Rico Tzschichholz 2018-02-12 10:07:20 UTC
Created attachment 368252 [details] [review]
build: Don't install vapicheck

This tool can't be used to check the syntax of vapi files as the name
suggests. So better drop it until it gets some fixing.
Comment 3 Al Thomas 2018-02-12 11:19:52 UTC
(In reply to Paul Wise from comment #0)
> $ apt-file search -I dsc .gidl
> poppler: /glib/poppler.gidl

Is Poppler the only Debian package distributing a GIDL file? In the case of Poppler the GIDL file should be removed. At present the poppler-glib.vapi file is distributed with Vala. See https://git.gnome.org/browse/vala/tree/vapi/poppler-glib.vapi

If you really need to generate your own VAPI then Poppler uses GObject instrospection. A GObject Introspection Repository (GIR) file is generated by Poppler's CMake build system. The GIR is Poppler-0.18.gir. You can then use this with the Vala vapigen tool to generate the VAPI:

vapigen --library poppler-glib --pkg cairo --pkg gio-2.0 --metadatadir my_metadata_directory Poppler-0.18.gir

The generation of the VAPI needs some tweaks with a metadata file. See:
https://git.gnome.org/browse/vala/tree/vapi/metadata/Poppler-0.18.metadata

The VAPI should be named poppler-glib.vapi to match the .pc file name. The --library option sets this.
Comment 4 Paul Wise 2018-02-12 13:11:48 UTC
(In reply to Al Thomas from comment #3)
> Is Poppler the only Debian package distributing a GIDL file?

As far as I can tell, yes.

> In the case of Poppler the GIDL file should be removed.

Could you file a bug about this on poppler upstream? (I have nothing to do with poppler).
Comment 5 Paul Wise 2018-02-12 13:22:16 UTC
To clarify, poppler is only distributing that .gidl file in the source package.
Comment 6 Al Thomas 2018-02-12 15:30:34 UTC
(In reply to Paul Wise from comment #4)
> Could you file a bug about this on poppler upstream?
Done so:
https://bugs.freedesktop.org/show_bug.cgi?id=105062
Comment 7 Al Thomas 2018-02-12 15:35:22 UTC
Review of attachment 368252 [details] [review]:

I think vapicheck can be dropped completely. The main () function in vapigen/valavapicheck.vala explicitly only accepts files with the .gidl file extension. There are no files with that extension in the Vala repository and GObject Introspection dropped support for GIDL back in 2008:
https://gitlab.gnome.org/GNOME/gobject-introspection/commit/d021397ade02d776dcced172e9a39325e8e26e24

Some Vala bindings in mainline use the .gi extension. Maybe that is the same XML format as GIDL was, but nothing in the Vala build system would use vapicheck. .gi is not accepted as a valid extension by vapicheck.
Comment 8 Rico Tzschichholz 2018-02-12 15:49:00 UTC
Basically this tool needs a rewrite, but dropping its source completely isn't necessary imo.
Comment 9 Rico Tzschichholz 2018-02-12 17:57:45 UTC
Comment on attachment 368252 [details] [review]
build: Don't install vapicheck

Attachment 368252 [details] pushed as fbb944d - build: Don't install vapicheck
Comment 10 GNOME Infrastructure Team 2018-05-22 16:00:13 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/vala/issues/616.