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 561188 - [plugins] evolution crash or hangs whenever I try to enabled extrenal editor if no geditor installed
[plugins] evolution crash or hangs whenever I try to enabled extrenal editor ...
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Plugins
2.24.x (obsolete)
Other All
: Normal critical
: ---
Assigned To: Milan Crha
Evolution QA team
: 571268 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-11-17 11:42 UTC by Peter
Modified: 2009-05-19 08:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
no error message in error dialog (340.96 KB, image/png)
2008-11-17 11:42 UTC, Peter
  Details
org-gnome-external-editor-errors.xml (565 bytes, text/plain)
2008-11-17 13:52 UTC, Peter
  Details
proposed evo patch (10.03 KB, patch)
2009-02-26 13:29 UTC, Milan Crha
accepted-commit_now Details | Review
proposed evo patch ][ (20.39 KB, patch)
2009-04-20 19:32 UTC, Milan Crha
committed Details | Review

Description Peter 2008-11-17 11:42:01 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


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:
Comment 1 Peter 2008-11-17 11:42:56 UTC
Created attachment 122839 [details]
no error message in error dialog
Comment 2 Matthew Barnes 2008-11-17 12:54:30 UTC
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.)
Comment 3 Peter 2008-11-17 13:52:27 UTC
Created attachment 122843 [details]
org-gnome-external-editor-errors.xml

Yes I do have such file. See attachment for its contents.
Comment 4 Milan Crha 2009-02-26 13:29:57 UTC
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
Comment 5 Srinivasa Ragavan 2009-04-20 08:03:55 UTC
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.
Comment 6 Bharath Acharya 2009-04-20 09:01:16 UTC
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.

Comment 7 Milan Crha 2009-04-20 10:19:38 UTC
(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 :)

Comment 8 Bharath Acharya 2009-04-20 11:34:36 UTC
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.
Comment 9 Milan Crha 2009-04-20 19:32:54 UTC
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.
Comment 10 Srinivasa Ragavan 2009-04-27 05:57:06 UTC
Milan, I think you must add the .error.xml file, which is missing in hte patch and commit to master.
Comment 11 Milan Crha 2009-04-27 09:36:54 UTC
Created commit 0f7060e in master.

Those "missing" files, it's the way how svn diff shows renamed.
Comment 12 Akhil Laddha 2009-05-19 08:18:48 UTC
*** Bug 571268 has been marked as a duplicate of this bug. ***