GNOME Bugzilla – Bug 684370
crashes with KeyError if annotations refer to invalid namespaces
Last modified: 2015-02-07 16:49:08 UTC
When building the current libsocialweb (http://ftp.acc.umu.se/pub/GNOME/sources/libsocialweb/0.25/) with g-i 2.33.10, it fails with Traceback (most recent call last):
+ Trace 230874
sys.exit(scanner_main(sys.argv))
final.validate()
self._namespace.walk(self._introspectable_callable_analysis)
node.walk(callback, [])
self._walk(callback, chain)
sig.walk(callback, chain)
res = callback(self, chain)
if not self._type_is_introspectable(param.type):
return self._type_is_introspectable(typeval.element_type)
target = self._transformer.lookup_typenode(typeval)
return self.lookup_giname(typeobj.target_giname)
include = self._includes[ns]
It works fine with g-i 2.32.1, so that's a regression in 2.33.x. For now I narrowed this down to this command (needs a built tree): cd libsocialweb-client/ g-ir-scanner -v --namespace SocialWebClient --identifier-prefix=Sw -I.. --include=GLib-2.0 --include=Gio-2.0 --library=libsocialweb-client.la --warn-all --output SocialWebClient-0.25.gir.tmp sw-client-item-view.h sw-client-item-view.c This .h/.c seems to expose the problem. When I remove this one and keep all others, it works.
Yeah, but this was really not intentionally-exposed functionality. See http://git.gnome.org/browse/libsocialweb/commit/?id=c1791e96182815449781fcda6007b69cd88cf7bf
Now we should clearly not crash; for 3.7 I'll add a better error message. But I'm not feeling a lot of motivation to bring this back. The basic issue is that you have two choices for how to refer to something: 1) C style - SwFooBar 2) GI style - SocialWeb.FooBar Sw only exists at the C level, so doing Sw.FooBar is a mix of C and GI.
Ah, thanks for the pointer! So it seems libsocialweb just needs a release (last one was 10 months ago). Adjusting bug title accordingly.
*** Bug 686536 has been marked as a duplicate of this bug. ***
We warn now and continue to function in this scenario, instead of crashing.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]