Comment 4 for bug 950087

Revision history for this message
Martin Pitt (pitti) wrote : Re: python2.7 crashed with SIGSEGV in g_object_newv() when using gi binding for xklavier (gir1.2-xkl-1.0)

This is not a bug. The API does not publicly expose the constructor, i. e. Xkl.Engine.new() does not exist. Xkl.Engine() invokes the GObject constructor on it, which we cannot hide unfortunately.

The API documentation [1] shows that you need to use the singleton function Xkl.Engine.get_instance(display) for this. This works fine, the upstream code has a test script for all this, which you might steal from [2].

[1] http://xlibs.freedesktop.org/xkbdesc/doc/libxklavier-xkl-engine.html#xkl-engine-get-instance
[2] http://cgit.freedesktop.org/libxklavier/tree/tests/test_gi.py