GNOME Bugzilla – Bug 774142
Crash on synchronizing notes, only with French language
Last modified: 2016-11-16 21:22:57 UTC
Created attachment 339386 [details] Stacktrace of the gnote crash Steps to reproduce : - open Gnote with French language (LANG=fr_FR.UTF-8) - in preferences->synchronisation, configure a local folder - click on save, and confirm that you'd like to synchronize your notes now - Gnote crashes with the following error message : terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::io::bad_format_string> >' what(): boost::bad_format_string: format-string is ill-formed After that, if you restart gnote, it crashes with the same error whenever you ask it to synchronize the notes. If you follow the same steps with LANG=C, it does not crash and synchronization works well. This behavior looks similar to https://bugzilla.gnome.org/show_bug.cgi?id=580868 So I had a look at the translation strings, and might have found the cause : it looks like the following translation string is wrong because of a space before the second '%' (and the translation itself is wrong, too) : #: ../src/synchronization/syncdialog.cpp:531 msgid "%1% note updated." msgid_plural "%1% notes updated." msgstr[0] "%1 % des notes mise à jour." msgstr[1] "%1 % des notes mise à jour." I think it should be replaced by something like : #: ../src/synchronization/syncdialog.cpp:531 msgid "%1% note updated." msgid_plural "%1% notes updated." msgstr[0] "%1% note mise à jour." msgstr[1] "%1% notes mises à jour."
Created attachment 339387 [details] [review] Proposed patch Here is a patch to fix the translation string. Please note that I did not test it so far
NB : the patch is against the master branch, where I suspect the issue to be still there. I experienced the crash on Ubuntu 16.04.1, with Gnote 3.81.1-1 (from Ubuntu repos), on x64 architecture
First time I see %1% as a substitution variable form and I'm not surprised the translator got confused by it. For the record, it's a thing that comes from the boost library. I asked the maintainer to remove them or add a translator comment in bug 774262.
Review of attachment 339387 [details] [review]: In the meantime, your patch looks good to me. Please push.
Alexandre, as I suspected, I don't seem to have the right to push the patch on git myself (which is no surprise as I never commited on Gnome so far). I suppose a Gnome developer will have to do it? Regarding the %1% syntax, it seems to be used in some other translation strings in Gnote.
(In reply to mossroy from comment #5) > Alexandre, as I suspected, I don't seem to have the right to push the patch > on git myself (which is no surprise as I never commited on Gnome so far). > I suppose a Gnome developer will have to do it? No problem, I just pushed it as commit 62ef4ec. > Regarding the %1% syntax, it seems to be used in some other translation > strings in Gnote. Yes, and it's an issue for all of them.
This patch should also be committed to the 3.22 branch.
(In reply to Hubert Figuiere (:hub) from comment #7) > This patch should also be committed to the 3.22 branch. Done.
So far, I did not manage to compile and run Gnote correctly (with or without the patch). Which means I could not test my patch (as I mentioned in Comment #1). Where could I find instructions or help to properly compile Gnote on Ubuntu 16.04? The IRC channel mentioned in https://wiki.gnome.org/Apps/Gnote seems to be empty for now. The README in source code does not give more instructions than "./configure && make && make install". Here is what I did : - get the source from git://git.gnome.org/gnote, and switch to branch 3.18.1 (the version packaged with Ubuntu 16.04) - install the packages mentioned in control file from http://archive.ubuntu.com/ubuntu/pool/universe/g/gnote/gnote_3.18.1-1.debian.tar.xz - ./autogen.sh (which seems to run ./configure itself) - make make fails with the following message : make[2] : on entre dans le répertoire « /home/mossroy/git/gnote/help » Makefile:562: *** missing separator. Arrêt. The corresponding line in help/Makefile is : @YELP_HELP_RULES@ If I comment this line, Gnote successfully compiles. But when I run src/gnote , it displays many errors like : (140010929773184) ERROR: get_icon - Failed to load icon (note, 22): L'icône « note » n'est pas présente dans le thème ubuntu-mono-dark All the UI is in English, with missing colors and icons, and I can't configure synchronization because the option is greyed out in the Settings, with mention "Not configurable" This is certainly because I did not do things correctly. Please excuse me if it's a trivial mistake but I did not find what's wrong. My goals are to : 1) test my patch 2) be able to synchronize my notes on ubuntu 16.04