Hey all,
I just stumbled on a weird problem:
see the attached test case which simply creates a broker object,
requests a dictionary object and frees BOTH again.
When running this code once, there is no problem. But I got weird DBus
warnings and similar code in my app actually causes a segfault when
the sample code is ran twice (therefore the for loop around it).
I know that Enchant isn't linked to GTK and this is what makes it weird.
Details:
Compile the sample code this way:
gcc -o "test" -Wall "enchant_test.c" `pkg-config --cflags --libs
enchant`
And run the binary
./enchant_test 1
./enchant_test 3
And this should work. But now, compile the code this way (notice the
added gtk+-2.0 package):
gcc -o "test" -Wall "enchant_test.c" `pkg-config --cflags --libs
enchant gtk+-2.0`
And running
./enchant_test 1
is still fine but once you keep the loop running more than once, there
will happen strange things:
enrico@endor ;-): /misc$ ./enchant_test 2
finished
(process:18884): GLib-GObject-WARNING **: cannot register existing type
`DBusGProxy'
(process:18884): GLib-GObject-CRITICAL **: g_type_set_qdata: assertion
`node != NULL' failed
(process:18884): GLib-GObject-CRITICAL **:
g_boxed_type_register_static: assertion `g_type_from_name (name) == 0'
failed
(process:18884): GLib-GObject-CRITICAL **: g_type_set_qdata: assertion
`node != NULL' failed
(process:18884): GLib-GObject-WARNING **: cannot register existing type
`DBusGProxy'
(process:18884): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed finished
Again, this only happens when the application is linked against GTK.
And it seems it only happens when the "zemberek" provider is used.
This is another thing which seems strange to me:
when I choose a non-sense dictionary name like "nonsense123" I would
expect enchant gives me an error saying that the dictionary doesn't
exist. Instead, it returns a valid dictionary object from the
"zemberek" provider. It seems this provider is used for tr-dictionaries?
When I choose another dictionary like "de" or "en" which both are
provided by aspell (on my system), the above example code works fine,
even when called multiple times.
So, am I doing something wrong or might there be a problem in the
"zemberek" provider code?
Regards,
Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
This archive was generated by hypermail 2.1.8 : Sun Aug 03 2008 - 20:50:03 CEST