GNOME Bugzilla – Bug 591587
Gtranslator crashed after clicked save button
Last modified: 2010-01-31 19:11:25 UTC
I loaded a .po file, added a new profile, translated some strings, I altered the header to use the informations in my new profile, translated more strings and when I clicked in the save button, gtranslator crashed and all informations were lost(unsaved). Distribution: Fedora release 11 (Leonidas) Gnome Release: 2.26.3 2009-07-07 (Red Hat, Inc) BugBuddy Version: 2.26.0 System: Linux 2.6.29.6-217.2.3.fc11.i586 #1 SMP Wed Jul 29 15:46:46 EDT 2009 i686 X Vendor: The X.Org Foundation X Vendor Release: 10601901 Selinux: Permissive Accessibility: Disabled GTK+ Theme: Nodoka Icon Theme: Fedora GTK+ Modules: canberra-gtk-module, pk-gtk-module, gnomebreakpad Memory status: size: 0 vsize: 0 resident: 0 share: 0 rss: 0 rss_rlim: 0 CPU usage: start_time: 0 rtime: 0 utime: 0 stime: 0 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 0 ---- Critical and fatal warnings logged during execution ---- ** Gdk **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed ** Gdk **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed ** gtranslator **: gtranslator_header_get_nplurals: assertion `profile' failed ----------- .xsession-errors --------------------- ** Message: End (gtranslator:2626): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed (gtranslator:2626): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed (gtranslator:2626): gtranslator-CRITICAL **: gtranslator_header_get_nplurals: assertion `profile' failed (gtranslator:2626): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gtranslator:2626): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated (gtranslator:2626): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated ** Message: Is 'Alternate Language' configurable? undefinedundefinedXlib: extension "RANDR" missing on display ":0.0". --------------------------------------------------
Can you attach the file that causes the crash?
Created attachment 142657 [details] [review] Proposed patch Most of the crashes so far was due to empty fields in profiles. So I just added a wrapper for po_header_set_field() api of gettext in gtranslator. That fixes all crashes so far. I'd recommend adding this patch to gtranslator until header part (which is the culprit of most of crashes) to be rewritten. This patch adds gtranslator_po_header_set_field() wrapper api for po_header_set_field(). It checks for "value" and if it's NULL it recreates it as empty string. Also it changes all usage of po_header_set_field() to gtranslator_po_header_set_field () instead. Since this kind of crashes data loss and most of time really annoying, I'd recommend it as a workaround as soon as possible.
Thanks Baris, the patch was added to master. Licio, could you confirm if this patch fix your problem in order to close the bug? Thank you.
Pablo, I'm gonna check this.
bug 594575, bug 598866 are dupes ?
*** Bug 594575 has been marked as a duplicate of this bug. ***
*** Bug 598866 has been marked as a duplicate of this bug. ***
I think this should be fixed now, can someone check with latest git?
(In reply to comment #8) > I think this should be fixed now, can someone check with latest git? Yes it seems fixed. I've checked with it.po from Rhythmbox: gtranslator 1.9.6 provided with Ubuntu 9.10 crashed every time I opened that file, the latest git at least is able open it with no crash. But give me one week to test more PO and editing before closing this bug. OT: any reason to keep this bug status to unconfirmed? also could you update the patch status to committed?
Well the status of the bug is not something that I care too much. About the patch I didn't applied, I reworked all the header management myself. So please lemme know if I need to change something else in the header.
I tried gtranslator master on several PO files that previously made it crash, and it seems fine. IMHO this bug could be closed.
Thanks for the testing. Closing this as FIXED.