GNOME Bugzilla – Bug 609696
Gtranslator raise a "segfault" error trying to load a file with wrong formatted headers
Last modified: 2012-04-24 09:25:11 UTC
Trying to load a file with some of the pofile headers wrongly formatted causes a "segfault". This could be catched by showing a popup window that informs about this issue or just saying "This file has the headers part wrongly formatted"
Could you give more info? Which profile headers?
Try to load a file with just this content (I know has wrong format...): format" msgstr "O documento DVI ten un formato incorrecto" #: ../backend/dvi/dvidocument.evince-backend.in.h:1 msgid "DVI Documents" msgstr "Documentos DVI" #: ../backend/pdf/ev-poppler.cc:571 msgid "This work is in the Public Domain" msgstr "Este traballo está en dominio público" #. translators: this is the document security state #: ../backend/pdf/ev-poppler.cc:824 msgid "Yes" msgstr "Si" This is showed on error output: leela.Descargas >gtranslator evince.master.gl.po zsh: segmentation fault gtranslator evince.master.gl.po
(In reply to comment #1) > Could you give more info? Which profile headers? For example, in this .po file header : "Project-Id-Version: gtkmm-documentation master\n" "POT-Creation-Date: 2010-07-20 22:25+0000\n" "PO-Revision-Date: 2010-09-23 18:41+0200\n" "Last-Translator: Gérard Baylard <Geodebay@gmail.com>\n" "Language-Team: français <GNOME French Team <gnomefr@traduc.org>>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" the item "Report-Msgid-Bugs-To: \n" is missing. It is common. Then when you try to save the file, from file menu or automatically, the gtranslator window close unexpectedly - without saving anything. You must add the missing item. If you do so, it works fine. If you forgot, you lost all translation work.
same problem(then trying to save) if header is "POT-Creation-Date: 2010-07-20 22:25+0000\n" "PO-Revision-Date: 2010-09-23 18:41+0200\n" "Last-Translator: Gérard Baylard <Geodebay@gmail.com>\n" "Language-Team: français <GNOME French Team <gnomefr@traduc.org>>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "Project-Id-Version: gtkmm-documentation master\n" and not "Project-Id-Version: gtkmm-documentation master\n" "POT-Creation-Date: 2010-07-20 22:25+0000\n" "PO-Revision-Date: 2010-09-23 18:41+0200\n" "Last-Translator: Gérard Baylard <Geodebay@gmail.com>\n" "Language-Team: français <GNOME French Team <gnomefr@traduc.org>>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" poedit not sees problem with such header, msgfmt --check-header too don't sees any problems...
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. The rewrite of header handling fixed at least one of the above problems. I committed a patch last night that should fix the last one. If you experienced this problem in the past, please test and verify that it's fixed. Please reopen this bug if it persists.
tested everything works:) if file don't has header, gtranslator adds it.
Tested here with gtranslator from repository. All works like a charm. Tks