Status: New Owner: ---- Labels: Type-Defect Priority-Medium
New issue 1394 by [email protected]: Segmentation fault when trying to create ibus engine from javascript
http://code.google.com/p/ibus/issues/detail?id=1394 What version of the product are you using? On what operating system? OS: Opensuse 12.1 DE: Gnome 3 Architecture: i586 IBus version: 1.4.0 Input method name and version: None Python version: 2.7.2 dbus version: 1.5.8-2.1.2 dbus-python version: 0.83.2-7.1.3 gtk version (if bug is about gtk applications):3.2.1 qt version (if bug is about qt applications): What steps will reproduce the problem? 1. create a javascript file 2. write the code below 3. run it What is the expected output? What do you see instead? Code expected to run fine. But it crashes with seg fault. Please provide any additional information below. I'm in bit of trouble using GObjectIntrospection / javascript. I tried to create an ibus engine. same code works in vala,python. but in javascript seg fault. "ibus-devel" package provides the /usr/share/gir-1.0/IBus-1.0.gir required for GObjectIntrospection. I'm tring to run the following code. __________________________________ #!/usr/bin/env gjs const IBus = imports.gi.IBus; //get the ibus bus bus = new IBus.Bus(); if(bus.is_connected()){ var factory = new IBus.Factory({ connection: bus.get_connection() }); factory.add_engine({ engine_name:"avro-phonetic", engine_type:typeof(this) }); } ______________________________ It crashes on line 12, in "new IBus.Factory". Terminal output, (gjs:13353): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion `object_path != NULL && g_variant_is_object_path (object_path)' failed Segmentation fault I can't figure out where is the problem. I tried the vala test code provided with ibus at https://github.com/ibus/ibus/blob/master/bindings/vala/test/enchant.vala It compiles and runs fine. In enchant.vala line 148. var factory = new Factory(bus.get_connection()); The code for creating Factory is same that i tried in javascript. also in python, from gi.repository import IBus from gi.repository import GLib from gi.repository import GObject IBus.init() bus = IBus.Bus() if bus.is_connected(): factory = IBus.Factory.new(bus.get_connection()) This also seems to work fine, no seg fault. But in javascript it fails everytime. Any help ? -- You received this message because you are subscribed to the Google Groups "ibus-devel" group. iBus project web page: http://code.google.com/p/ibus/ iBus dev group: http://groups.google.com/group/ibus-devel?hl=en
