After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591587 - Gtranslator crashed after clicked save button
Gtranslator crashed after clicked save button
Status: RESOLVED FIXED
Product: gtranslator
Classification: Other
Component: Interface
HEAD
Other Linux
: High critical
: 2.0
Assigned To: gtranslator-maint
gtranslator-maint
: 594575 598866 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-12 17:42 UTC by Licio Fonseca
Modified: 2010-01-31 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.88 KB, patch)
2009-09-07 23:05 UTC, Baris Cicek
none Details | Review

Description Licio Fonseca 2009-08-12 17:42:50 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".
--------------------------------------------------
Comment 1 fpuga 2009-08-22 17:25:50 UTC
Can you attach the file that causes the crash?
Comment 2 Baris Cicek 2009-09-07 23:05:12 UTC
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.
Comment 3 Pablo Sanxiao 2009-09-09 07:08:26 UTC
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.
Comment 4 Licio Fonseca 2009-09-09 12:53:06 UTC
Pablo, I'm gonna check this.
Comment 5 Akhil Laddha 2009-10-27 06:52:51 UTC
bug 594575, bug 598866 are dupes ?
Comment 6 Ignacio Casal Quinteiro (nacho) 2010-01-28 19:04:05 UTC
*** Bug 594575 has been marked as a duplicate of this bug. ***
Comment 7 Ignacio Casal Quinteiro (nacho) 2010-01-28 19:04:18 UTC
*** Bug 598866 has been marked as a duplicate of this bug. ***
Comment 8 Ignacio Casal Quinteiro (nacho) 2010-01-28 19:04:49 UTC
I think this should be fixed now, can someone check with latest git?
Comment 9 Luca Ferretti 2010-01-29 00:05:52 UTC
(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?
Comment 10 Ignacio Casal Quinteiro (nacho) 2010-01-29 00:18:38 UTC
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.
Comment 11 Luca Ferretti 2010-01-31 19:08:27 UTC
I tried gtranslator master on several PO files that previously made it crash, and it seems fine. 

IMHO this bug could be closed.
Comment 12 Ignacio Casal Quinteiro (nacho) 2010-01-31 19:11:25 UTC
Thanks for the testing. Closing this as FIXED.