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 598325 - libchamplain bindings
libchamplain bindings
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-10-13 20:17 UTC by Tomaz Vajngerl
Modified: 2010-04-10 21:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
champlain bindings (8.12 KB, application/x-compressed-tar)
2009-10-13 20:21 UTC, Tomaz Vajngerl
Details
ChamplainExample.vala (759 bytes, text/x-vala)
2009-10-19 15:08 UTC, Tomaz Vajngerl
Details

Description Tomaz Vajngerl 2009-10-13 20:17:11 UTC
Bindings for libchamplain and libchamplain-gtk.
Comment 1 Tomaz Vajngerl 2009-10-13 20:21:15 UTC
Created attachment 145375 [details]
champlain bindings
Comment 2 Martin Olsson 2009-10-18 19:24:52 UTC
I was about to write up a small Vala sample code snippet that uses this VAPI binding but it seems that as soon as I use this VAPI then valac executes some buggy code path which prints "critical warnings" to the console. I'm unsure whether this is a bug in the VAPI binding or a bug in valac though?


mnemo@kingfish:~/projs/howto/vala/libchamplain$ cat main.vala
int main (string[] args)
{
	stdout.printf ("hello world\n");
	return 0;
}
mnemo@kingfish:~/projs/howto/vala/libchamplain$ valac main.vala
mnemo@kingfish:~/projs/howto/vala/libchamplain$ valac main.vala --pkg=champlain-0.4 --vapidir=../../../vala/vapi_bindings
** (valac:18892): CRITICAL **: vala_class_add_hidden_method: assertion `self != NULL' failed
** (valac:18892): CRITICAL **: vala_class_add_hidden_method: assertion `self != NULL' failed
** (valac:18892): CRITICAL **: vala_class_add_hidden_method: assertion `self != NULL' failed
** (valac:18892): CRITICAL **: vala_class_add_hidden_method: assertion `self != NULL' failed
** (valac:18892): CRITICAL **: vala_class_add_hidden_method: assertion `self != NULL' failed
mnemo@kingfish:~/projs/howto/vala/libchamplain$ gdb --args env G_DEBUG=fatal-warnings valac main.vala --pkg=champlain-0.4 --vapidir=../../../vala/vapi_bindings
Reading symbols from /usr/bin/env...(no debugging symbols found)...done.
(gdb) r
Executing new program: /usr/bin/valac
** CRITICAL **: vala_class_add_hidden_method: assertion `self != NULL' failed
aborting...
Program received signal SIGABRT, Aborted.
0x00007ffff71624b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
	in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
  • #0 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 *__GI_abort
    at abort.c line 92
  • #2 IA__g_logv
    at /build/buildd/glib2.0-2.22.2/glib/gmessages.c line 549
  • #3 IA__g_log
    at /build/buildd/glib2.0-2.22.2/glib/gmessages.c line 569
  • #4 vala_signal_real_check
    at valasignal.c line 762
  • #5 vala_interface_real_check
    at valainterface.c line 1776
  • #6 vala_class_real_check
    at valaclass.c line 2132
  • #7 vala_field_real_check
    at valafield.c line 739
  • #8 vala_struct_real_check
    at valastruct.c line 1862
  • #9 vala_field_real_check
    at valafield.c line 739
  • #10 vala_struct_real_check
    at valastruct.c line 1862
  • #11 vala_formal_parameter_real_check
    at valaformalparameter.c line 549
  • #12 vala_signal_real_check
    at valasignal.c line 721
  • #13 vala_class_real_check
    at valaclass.c line 2286
  • #14 vala_class_real_check
    at valaclass.c line 2132
  • #15 vala_class_real_check
    at valaclass.c line 2132
  • #16 vala_source_file_check
    at valasourcefile.c line 686
  • #17 vala_code_context_accept
    at valacodecontext.c line 473
  • #18 vala_semantic_analyzer_analyze
    at valasemanticanalyzer.c line 1651
  • #19 vala_compiler_run
    at valacompiler.c line 630
  • #20 vala_compiler_main
    at valacompiler.c line 1041
  • #21 __libc_start_main
    at libc-start.c line 220
  • #22 _start
    at ../sysdeps/x86_64/elf/start.S line 113

Comment 3 Martin Olsson 2009-10-18 19:26:08 UTC
So basically when I run valac without this VAPI it works but as soon as I add the --pkg=champlain-0.4 --vapidir=../../../vala/vapi_bindings parameters as well the GLib critical errors appear.
Comment 4 Martin Olsson 2009-10-18 20:00:52 UTC
Tomaz do you have a small sample program that uses this VAPI btw? That would be useful for validating the correctness of the VAPI with respect to memory leaks etc (i.e. using valgrind).
Comment 5 Tomaz Vajngerl 2009-10-19 15:08:36 UTC
Created attachment 145788 [details]
ChamplainExample.vala
Comment 6 Tomaz Vajngerl 2009-10-19 15:17:54 UTC
Hi.

I have now attached an example.

To compile I used: 
valac \
 --thread \
 --pkg clutter-1.0 \
 --pkg gtk+-2.0 \
 --pkg champlain-0.4 \
 --pkg champlain-gtk-0.4 \
 --vapidir=./ \
 ChamplainExample.vala  -o ChamplainExample

At compiling I also get: 
** (valac:27815): CRITICAL **: vala_class_add_hidden_method: assertion `self != NULL' failed

I don't know what is wrong here, but I get the same also with clutter-gtk bindings. However the compilation finishes without other errors and produces an executable.

When starting I get: 
(<unknown>:27874): ClutterGLX-CRITICAL **: Unable to make the stage window 0x5a0002b the current GLX drawable

But this is probably related to clutter initialization. If I use clutter-gtk init everything is fine, but clutter-gtk bindings are also not yet included in vala.

regards, 
Tomaž
Comment 7 Pierre-Luc Beaudoin 2009-10-26 21:01:37 UTC
I'd be happy to get these integrated in the source tree of libchamplain.  Provide me with a patch that installs everything using autotools and it'll be cool :) Actually, I did look for documentation on how to do that, or another project that installs vala bindings, but couldn't find any.
Comment 8 Evan Nemerson 2010-02-03 09:11:31 UTC
Tomaz,

Anything going on with this? IMHO it would be better to get the bindings distributed upstream, if you're comfortable with that.

Just not sure if I should close the bug or not.
Comment 9 Tomaz Vajngerl 2010-02-03 09:41:25 UTC
Yes, the bindings will be distributed upstream - I hope when the next stable and unstable versions comes out.. if Pierre-Luc agrees. :)
Comment 10 Pierre-Luc Beaudoin 2010-02-03 18:05:33 UTC
Yes, if having the bindings upstream is the way to go, then I agree. I'll wait for the updated patch or git branch against libchamplain 0.4.4.
Comment 11 Tomaz Vajngerl 2010-04-10 21:00:14 UTC
Hi,

The bindings have been now added upstream so this bug can be closed.

regards, Tomaž