GNOME Bugzilla – Bug 561188
[plugins] evolution crash or hangs whenever I try to enabled extrenal editor if no geditor installed
Last modified: 2009-05-19 08:18:48 UTC
Steps to reproduce: The first time I've tried to enable extrnal editor it just crashed: peter@camobap ~ $ evolution Bonobo-Activation-Message: About to register 'OAFIID:GNOME_Evolution_Shell:2.24': 0x81dce80 Bonobo-Activation-Message: registration of 'OAFIID:GNOME_Evolution_Shell:2.24' returns (success) Bonobo-Activation-Message: Successfully registered `OAFIID:GNOME_Evolution_Shell:2.24' ** (evolution:10302): DEBUG: mailto URL command: evolution %s ** (evolution:10302): DEBUG: mailto URL program: evolution libnm_glib_nm_state_cb: dbus returned an error. (org.freedesktop.DBus.Error.ServiceUnknown) The name org.freedesktop.NetworkManager was not provided by any .service files (evolution:10302): evolution-mail-WARNING **: VFolder of VFolders not supporting. Ignoring loading this vfolder as a subfolder (evolution:10302): evolution-mail-WARNING **: VFolder of VFolders not supporting. Ignoring loading this vfolder as a subfolder camel-Message: -- camel-Message: -- camel-Message: -- ** (evolution:10302): WARNING **: Unable to launch gedit: Xlib: unexpected async reply (sequence 0xd09dc)! ** Gdk:ERROR:gdkmain-x11.c:135:gdk_x11_convert_grab_status: code should not be reached Аварийный останов ^^ Crash in Russian I've tried to reproduce this and gather backtrace but I failed - evolution just hangs since then and it does not returns into gdb. Nevertheless I've interrupted debugger with ctrl+C and get the following backtrace: [New Thread 0xb10d2b90 (LWP 11778)] ^C Program received signal SIGINT, Interrupt. [Switching to Thread 0xb7297700 (LWP 11731)] 0x42566982 in ?? () from /lib/ld-linux.so.2 (gdb) thread apply all bt full
+ Trace 209920
That's said I hope that even without backtrace it's evident where the error is: "unable to launch gedit". Relevant problem: if I start evolution --sync evolution and press enable external editor evolution tries to warn me about somthing, but no error message in dialog (see screenshot). Stack trace: Other information:
Created attachment 122839 [details] no error message in error dialog
Most error messages are read from XML files. It's possible the file was missing or misinstalled. Can you check your system for a file named: /usr/share/evolution/2.24/errors/org-gnome-external-editor-errors.xml In it should be an <error> tag with the attribute id="editor-not-launchable". (Substitute "/usr/share" with the appropriate data directory if you've installed Evolution to a different location.)
Created attachment 122843 [details] org-gnome-external-editor-errors.xml Yes I do have such file. See attachment for its contents.
Created attachment 129564 [details] [review] proposed evo patch for evolution; couple things here: - do more things in main thread in this plugin, it behaves much stable now - someone decided to write "_primary"/"_secondary" instead of "primary"/"secondary" in error files (I do not mean in this plugin only, it's, for example, in calendar too), but ee_load doesn't know these - use default window title even for empty titles, not only for NULL - do not localize already localized text
Milan, Im just not sure about the last part. '- do not localize already localized text' I see that you dont do dgettext. I just want to be too sure that we don't bring in any regressions. Apart from this, its fine.
Something to add. For all other plugins, this is what we do, LC_ALL=C /usr/bin/intltool-merge -x -u /tmp org-gnome-attachment-reminder.error.xml org-gnome-attachment-reminder.error So the localization is handled by this. For external-editor and a few other plugins, the error files are named *.errors.xml and we just dump this file into the install location, which is wrong. This is the main issue that needs to be fixed. Was waiting for git to fall in place to rename the files and modify the Makefiles. The translations need to be done as mentioned by Srini.
(In reply to comment #5) > Milan, Im just not sure about the last part. > > '- do not localize already localized text' > > I see that you dont do dgettext. I just want to be too sure that we don't bring > in any regressions. Apart from this, its fine. > It's (for example) about removing here: @@ -507,8 +511,8 @@ e_error_newv(GtkWindow *parent, const ch out = g_string_new(""); - if (e->title) { - ee_build_label(out, dgettext(table->translation_domain, e->title), args, FALSE); + if (e->title && *e->title) { + ee_build_label(out, e->title, args, FALSE); gtk_window_set_title((GtkWindow *)dialog, out->str); g_string_truncate(out, 0); } else because it's already here: - } else if (!strcmp((char *)scan->name, "title")) { + } else if (has_name (scan->name, "title")) { if ((tmp = (char *)xmlNodeGetContent(scan))) { e->title = g_strdup(dgettext(table->translation_domain, tmp)); xmlFree(tmp); so the text was localized twice. (In reply to comment #6) > ... I didn't get what is that about :)
The fix should be to have the error files named as *.error.xml and let intltool-merge to merge translations and generate a *.error file and install the .error file. The _primary and _secondary would be converted by this translation, and hence the hunks in e-util aren't needed. Attachment reminder does this the clean way. There are around 3-4 plugins which need the same change. Renaming the files is a cleaner way than emulating the behaviour differently for a few plugins.
Created attachment 132980 [details] [review] proposed evo patch ][ for evolution; oh, I see now. So here comes patch with other related plugins fix, and with smaller e-util part. Thanks for explaining the real issue, Bharath.
Milan, I think you must add the .error.xml file, which is missing in hte patch and commit to master.
Created commit 0f7060e in master. Those "missing" files, it's the way how svn diff shows renamed.
*** Bug 571268 has been marked as a duplicate of this bug. ***