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 702279 - Crash due to undefined SmallSet abstract methods
Crash due to undefined SmallSet abstract methods
Status: RESOLVED NOTABUG
Product: folks
Classification: Platform
Component: general
git master
Other Linux
: High critical
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks: 664946
 
 
Reported: 2013-06-14 17:45 UTC by Chandni Verma
Modified: 2013-06-18 09:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
folks-generics.vapi: say what we override in the C code (1.17 KB, patch)
2013-06-16 20:53 UTC, Simon McVittie
none Details | Review

Description Chandni Verma 2013-06-14 17:45:47 UTC
It looks like a folks/gee error:
Try my branch on gnome-chess here: https://git.gnome.org/browse/gnome-chess/log/?h=chess-telepathy-networking-support-664946-communicate where src/gnome-chess crashes with the following error + backtrace:

(gnome-chess:22278): folks-WARNING **: backend-store.vala:409: Error preparing Backend 'ofono': GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
[New Thread 0xa1effb40 (LWP 22286)]

** (gnome-chess:22278): CRITICAL **: Type `FolksSmallSet' does not implement abstract method `gee_abstract_collection_iterator'

** (gnome-chess:22278): CRITICAL **: gee_iterator_next: assertion `self != NULL' failed

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt full
  • #0 ??
  • #1 gee_abstract_collection_get_size
    from /usr/lib/i386-linux-gnu/libgee.so.2
  • #2 gee_collection_get_size
    from /usr/lib/i386-linux-gnu/libgee.so.2
  • #3 _folks_individual_aggregator_personas_changed_cb
    at /home/chandni/src/GIT/gnome/folks/folks/individual-aggregator.vala line 1556
  • #4 _folks_individual_aggregator_backend_persona_store_removed_cb
    at /home/chandni/src/GIT/gnome/folks/folks/individual-aggregator.vala line 979
  • #5 __folks_individual_aggregator_backend_persona_store_removed_cb_folks_backend_persona_store_removed
    at /home/chandni/src/GIT/gnome/folks/folks/individual-aggregator.vala line 789
  • #6 g_cclosure_marshal_VOID__OBJECTv
    at gmarshal.c line 1312
  • #7 _g_closure_invoke_va
    at gclosure.c line 840
  • #8 g_signal_emit_valist
    at gsignal.c line 3234
  • #9 g_signal_emit_by_name
    at gsignal.c line 3424
  • #10 _folks_backends_tp_backend_remove_store
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/tp-backend.vala line 267
  • #11 _folks_backends_tp_backend_store_removed_cb
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/tp-backend.vala line 277
  • #12 __folks_backends_tp_backend_store_removed_cb_folks_persona_store_removed
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/tp-backend.vala line 255
  • #13 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #14 g_closure_invoke
    at gclosure.c line 777
  • #15 signal_emit_unlocked_R
    at gsignal.c line 3584
  • #16 g_signal_emit_valist
    at gsignal.c line 3328
  • #17 g_signal_emit_by_name
    at gsignal.c line 3424
  • #18 _tpf_persona_store_remove_store
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/lib/tpf-persona-store.vala line 459
  • #19 _tpf_persona_store_notify_connection_cb_async_co
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/lib/tpf-persona-store.vala line 773
  • #20 _tpf_persona_store_notify_connection_cb_async_ready
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/lib/tpf-persona-store.vala line 759
  • #21 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #22 complete_in_idle_cb
    at gsimpleasyncresult.c line 789
  • #23 g_idle_dispatch
    at gmain.c line 5205
  • #24 g_main_dispatch
    at gmain.c line 3054
  • #25 g_main_context_dispatch
    at gmain.c line 3630
  • #26 g_main_context_iterate
    at gmain.c line 3701
  • #27 g_main_context_iteration
    at gmain.c line 3762
  • #28 g_application_run
    at gapplication.c line 1623
  • #29 gnome_chess_main
    at gnome-chess.c line 189
  • #30 main
    at gnome-chess.c line 200
(gdb)
Comment 1 Chandni Verma 2013-06-16 16:36:44 UTC
I could not produce this error with folks_0_7_3. Its new with folks 0.9.1.1.20130520
Comment 2 Philip Withnall 2013-06-16 20:18:47 UTC
Simon, this is SmallSet stuff. Any ideas?
Comment 3 Simon McVittie 2013-06-16 20:29:38 UTC
> ** (gnome-chess:22278): CRITICAL **: Type `FolksSmallSet' does
> not implement abstract method `gee_abstract_collection_iterator'

Er, it looks to me as though it does?

  static void
  folks_small_set_class_init (FolksSmallSetClass *cls)
  {
  ...
    GeeAbstractCollectionClass *ac_class = GEE_ABSTRACT_COLLECTION_CLASS (cls);
  ...
    ac_class->iterator = folks_small_set_iterator;

Chandni, what versions of Gee and Vala are you using? If you compiled Gee yourself, which version of Vala did you use for that? If you got it from a distribution, which one?
Comment 4 Simon McVittie 2013-06-16 20:32:19 UTC
It's possible that folks-generics.vapi ought to say which methods it overrides, but I would have thought that would result in failure at compile-time rather than runtime...
Comment 5 Simon McVittie 2013-06-16 20:53:33 UTC
Created attachment 246983 [details] [review]
folks-generics.vapi: say what we override in the C code

---

Does this help?
Comment 6 Chandni Verma 2013-06-17 05:29:16 UTC
(In reply to comment #3)
> Chandni, what versions of Gee and Vala are you using? If you compiled Gee
> yourself, which version of Vala did you use for that? If you got it from a
> distribution, which one?

I have gee-0.8 version 0.10.0 built using Vala 0.20.1.14-b942
Comment 7 Simon McVittie 2013-06-17 11:23:08 UTC
(In reply to comment #5)
> folks-generics.vapi: say what we override in the C code

Please try applying that to Folks. If that doesn't work, also try recompiling your application against the patched Folks.
Comment 8 Chandni Verma 2013-06-17 12:41:05 UTC
I tried but I still get the same error and backtrace. Just a query, libfolks-internal.la is a noinst_LTLIBRARIES so it won't be installed. Are you sure it should remain such?
Comment 9 Simon McVittie 2013-06-17 13:21:07 UTC
(In reply to comment #8)
> Just a query,
> libfolks-internal.la is a noinst_LTLIBRARIES so it won't be installed. Are you
> sure it should remain such?

Yes. It's an uninstalled static library (a libtool "convenience library") which gets copied into the main library (libfolks.la).
Comment 10 Simon McVittie 2013-06-17 13:22:04 UTC
Please get a backtrace with G_DEBUG=fatal-criticals so we can see where the critical warning comes from?
Comment 11 Simon McVittie 2013-06-17 13:28:11 UTC
It looks likely to be this (in the generated C code):

static GeeIterator* gee_abstract_collection_real_iterator (GeeAbstractCollection* self) {
        g_critical ("Type `%s' does not implement abstract method `gee_abstract_collection_iterator'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
        return NULL;
}

GeeIterator* gee_abstract_collection_iterator (GeeAbstractCollection* self) {
        g_return_val_if_fail (self != NULL, NULL);
        return GEE_ABSTRACT_COLLECTION_GET_CLASS (self)->iterator (self);
}

... but we definitely do set GeeAbstractCollectionClass.iterator, as quoted above? So I don't know why gee_abstract_collection_real_iterator() would ever be called...
Comment 12 Chandni Verma 2013-06-17 13:55:43 UTC
backtrace with G_DEBUG=fatal-criticals :

(gnome-chess:2690): folks-WARNING **: backend-store.vala:409: Error preparing Backend 'ofono': GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files

** (gnome-chess:2690): CRITICAL **: Type `FolksSmallSet' does not implement abstract method `gee_abstract_collection_iterator'

Program received signal SIGTRAP, Trace/breakpoint trap.
0xb6d2f5eb in g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_CRITICAL, 
    format=0xb7322820 "Type `%s' does not implement abstract method `gee_abstract_collection_iterator'", args=0xbfffdafc "\200\005\024\267")
    at gmessages.c:974
974			G_BREAKPOINT ();
(gdb) bt full
  • #0 g_logv
    at gmessages.c line 974
  • #1 g_log
    at gmessages.c line 1010
  • #2 ??
    from /usr/lib/i386-linux-gnu/libgee.so.2
  • #3 gee_abstract_collection_iterator
    from /usr/lib/i386-linux-gnu/libgee.so.2
  • #4 gee_iterable_iterator
    from /usr/lib/i386-linux-gnu/libgee.so.2
  • #5 _folks_individual_aggregator_personas_changed_cb
    at /home/chandni/src/GIT/gnome/folks/folks/individual-aggregator.vala line 1546
  • #6 _folks_individual_aggregator_backend_persona_store_removed_cb
    at /home/chandni/src/GIT/gnome/folks/folks/individual-aggregator.vala line 979
  • #7 __folks_individual_aggregator_backend_persona_store_removed_cb_folks_backend_persona_store_removed
    at /home/chandni/src/GIT/gnome/folks/folks/individual-aggregator.vala line 789
  • #8 g_cclosure_marshal_VOID__OBJECTv
    at gmarshal.c line 1312
  • #9 _g_closure_invoke_va
    at gclosure.c line 840
  • #10 g_signal_emit_valist
    at gsignal.c line 3234
  • #11 g_signal_emit_by_name
    at gsignal.c line 3424
  • #12 _folks_backends_tp_backend_remove_store
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/tp-backend.vala line 267
  • #13 _folks_backends_tp_backend_store_removed_cb
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/tp-backend.vala line 277
  • #14 __folks_backends_tp_backend_store_removed_cb_folks_persona_store_removed
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/tp-backend.vala line 255
  • #15 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 85
  • #16 g_closure_invoke
    at gclosure.c line 777
  • #17 signal_emit_unlocked_R
    at gsignal.c line 3584
  • #18 g_signal_emit_valist
    at gsignal.c line 3328
  • #19 g_signal_emit_by_name
    at gsignal.c line 3424
  • #20 _tpf_persona_store_remove_store
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/lib/tpf-persona-store.vala line 459
  • #21 _tpf_persona_store_notify_connection_cb_async_co
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/lib/tpf-persona-store.vala line 773
  • #22 _tpf_persona_store_notify_connection_cb_async_ready
    at /home/chandni/src/GIT/gnome/folks/backends/telepathy/lib/tpf-persona-store.vala line 759
  • #23 g_simple_async_result_complete
    at gsimpleasyncresult.c line 777
  • #24 complete_in_idle_cb
    at gsimpleasyncresult.c line 789
  • #25 g_idle_dispatch
    at gmain.c line 5205
  • #26 g_main_dispatch
    at gmain.c line 3054
  • #27 g_main_context_dispatch
    at gmain.c line 3630
  • #28 g_main_context_iterate
    at gmain.c line 3701
  • #29 g_main_context_iteration
    at gmain.c line 3762
  • #30 g_application_run
    at gapplication.c line 1623
  • #31 gnome_chess_main
    at gnome-chess.c line 189
  • #32 main
    at gnome-chess.c line 200

Comment 13 Simon McVittie 2013-06-17 14:08:56 UTC
(In reply to comment #6)
> (In reply to comment #3)
> > Chandni, what versions of Gee and Vala are you using? If you compiled Gee
> > yourself, which version of Vala did you use for that? If you got it from a
> > distribution, which one?
> 
> I have gee-0.8 version 0.10.0 built using Vala 0.20.1.14-b942

Are you sure you're using your self-built libgee? The backtrace says

> #3  0xb72eacdf in gee_abstract_collection_iterator () from
> /usr/lib/i386-linux-gnu/libgee.so.2

which looks a lot like Debian or Ubuntu libgee 0.6.x to me...

Ah, in fact, I think I might see the problem. I think your process has ended up with both libgee 0.6.x and 0.8+ in its process space, because one of your dependencies is linked against one and another is linked against the other. You can verify this with "libtool --mode=execute ldd gnome-chess" (or whatever your executable is called). If I'm right, you'll see both libgee.so.2 and libgee-0.8.so.2 in the ldd output.

If that's the case, then this is NOTOURBUG, and you will need to recompile any of your application's dependencies that currently use libgee.so.2 (libgee 0.6) against "libgee-0.8" (Gee 0.8+); this might require source changes to those dependencies, because Gee broke ABI and API between 0.6 and 0.8.
Comment 14 Simon McVittie 2013-06-17 14:12:44 UTC
(Confusingly, the pkg-config name for libgee 0.6.x is "gee-1.0". Don't be fooled: that's actually older than libgee 0.8 and 0.10, whose pkg-config name is "gee-0.8".)
Comment 15 Chandni Verma 2013-06-17 15:18:32 UTC
yes, I have both libgee.so.2 and libgee-0.8.so.2 in the ldd output. This is confusing.
Comment 16 Simon McVittie 2013-06-17 15:29:19 UTC
Gee has made an ABI transition and your development environment is apparently halfway through it. You'll need to find any libraries used by your application that are linked to libgee.so.2, and compile a version of those libraries that uses libgee-0.8 instead (this might mean jhbuild'ing more things, for instance).

Strictly speaking, I think this might mean Folks should have bumped its SONAME when it moved from Gee 0.6 to 0.8. (It returns objects that used to conform to the Gee 0.6 ABI, but now conform to the Gee 0.8 ABI.)
Comment 17 Simon McVittie 2013-06-17 20:06:50 UTC
Here's your bug, I think:

>    PKG_CHECK_MODULES([GEE], [gee-1.0])

You need to use the same ABI of Gee that Folks is using: Folks < 0.9.0 used gee-1.0, Folks >= 0.9.0 use gee-0.8.
Comment 18 Chandni Verma 2013-06-18 09:05:54 UTC
That solves it. Thanks a lot!