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 773420 - Prevent crash when e_content_editor_get_content() returns NULL
Prevent crash when e_content_editor_get_content() returns NULL
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Composer
3.22.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: Tomas Popela
Evolution QA team
: 782747 783022 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-10-24 13:49 UTC by Sam Morris
Modified: 2017-05-30 09:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
complete backtrace (163.52 KB, text/plain)
2016-10-24 13:49 UTC, Sam Morris
Details
evolution message log (105.31 KB, text/x-vhdl)
2016-10-25 12:33 UTC, Sam Morris
Details

Description Sam Morris 2016-10-24 13:49:12 UTC
Created attachment 338343 [details]
complete backtrace

Evolution crashed after I tried to send an email. I was in another workspace at the time so I don't know exactly how far it got through the process.

Log messages:
Oct 24 13:19:51 wintermute evolution[6807]: Event already in progress.
Oct 24 13:19:52 wintermute evolution[6807]: Event already in progress.
Oct 24 13:19:52 wintermute evolution[6807]: Event already in progress.
Oct 24 13:20:11 wintermute evolution[6807]: Event already in progress.
Oct 24 13:20:12 wintermute evolution[6807]: Event already in progress.
Oct 24 13:20:12 wintermute evolution[6807]: Event already in progress.
Oct 24 13:20:14 wintermute evolution[6807]: Failed to call a DBus Proxy method org.gnome.Evolution.WebExtension.EWebKitEditor::DOMGetContent: Timeout was reached
Oct 24 13:20:39 wintermute evolution[6807]: Failed to call a DBus Proxy method org.gnome.Evolution.WebExtension.EWebKitEditor::DOMGetContent: Timeout was reached
Oct 24 13:20:39 wintermute evolution[6807]: e_html_editor_get_content_editor: assertion 'E_IS_HTML_EDITOR (editor)' failed
Oct 24 13:20:39 wintermute evolution[6807]: e_content_editor_get_content: assertion 'E_IS_CONTENT_EDITOR (editor)' failed

Backtrace:

  • #0 strlen
    at ../sysdeps/x86_64/strlen.S line 106
  • #1 composer_build_message
  • #2 e_msg_composer_get_message
    at e-msg-composer.c line 5082
  • #3 e_msg_composer_send
    at e-msg-composer.c line 4072
  • #7 <emit signal ??? on instance 0x5562c3edbad0 [GtkAction]>
    at ././gobject/gsignal.c line 3447
  • #8 _gtk_action_emit_activate
    at ././gtk/deprecated/gtkaction.c line 909
  • #9 closure_accel_activate
    at ././gtk/deprecated/gtkaction.c line 1865
  • #13 <emit signal accel-activate:<Primary>Return on instance 0x5562c388d0a0 [GtkAccelGroup]>
    at ././gobject/gsignal.c line 3447
  • #14 gtk_accel_group_activate
    at ././gtk/gtkaccelgroup.c line 910
  • #15 gtk_accel_groups_activate
    at ././gtk/gtkaccelgroup.c line 948
  • #16 gtk_window_activate_key
    at ././gtk/gtkwindow.c line 11779
  • #17 gtk_window_key_press_event
    at ././gtk/gtkwindow.c line 8005
  • #18 msg_composer_key_press_event
    at e-msg-composer.c line 2698
  • #19 _gtk_marshal_BOOLEAN__BOXEDv
    at ././gtk/gtkmarshalers.c line 131
  • #20 _g_closure_invoke_va
    at ././gobject/gclosure.c line 867
  • #21 g_signal_emit_valist
    at ././gobject/gsignal.c line 3300
  • #22 g_signal_emit
    at ././gobject/gsignal.c line 3447
  • #23 gtk_widget_event_internal
    at ././gtk/gtkwidget.c line 7721
  • #24 propagate_event
    at ././gtk/gtkmain.c line 2658
  • #25 gtk_main_do_event
    at ././gtk/gtkmain.c line 1888
  • #26 _gdk_event_emit
    at ././gdk/gdkevents.c line 73
  • #27 gdk_event_source_dispatch
    at ././gdk/x11/gdkeventsource.c line 367
  • #28 g_main_context_dispatch
    at ././glib/gmain.c line 3203
  • #29 g_main_context_dispatch
    at ././glib/gmain.c line 3856
  • #30 g_main_context_iterate
    at ././glib/gmain.c line 3929
  • #31 g_main_loop_run
    at ././glib/gmain.c line 4125
  • #32 gtk_main
    at ././gtk/gtkmain.c line 1299
  • #33 main
    at main.c line 662

Comment 1 Milan Crha 2016-10-25 12:21:56 UTC
Thanks for a bug report. That "Event already in progress" is new to me, I do not recall seeing it any time recently. I see it in the code, thus it comes from the evolution itself. The rest of the runtime warnings basically mean that the corresponding WebKitWebProcess process got stuck on something and didn't respond on time. It would be nice to know what it got stuck on, if you can reproduce this crash anyhow.

The composer_build_message() can be fixed to not call strlen() on a NULL text, but it'll only fix the consequence of the issue, not the root cause of it.
Comment 2 Sam Morris 2016-10-25 12:30:56 UTC
I've not had any luck reproducing the problem. IIRC I was replying to a particular email, and noticed evolution was rather slow to respond to inputs. While that email was an HTML one, it isn't a particularly big one, and composing a reply to the same message today doesn't cause evolution to exhibit the same sluggish behaviour.
Comment 3 Sam Morris 2016-10-25 12:33:34 UTC
Created attachment 338399 [details]
evolution message log

Here's everything logged by evolution. I notice there's a bunch of messages complaining about timeouts from webkit.
Comment 4 Milan Crha 2016-10-25 12:43:49 UTC
(In reply to Sam Morris from comment #3)
> Here's everything logged by evolution. I notice there's a bunch of messages
> complaining about timeouts from webkit.

Thanks for the update. There happened something quite bad. It can be the WebKitWebProcess thing, all the timeouts are about it. Please, once you'll notice it again, get a backtrace of the WebKitWebProcess, to see what it does. There should be shown two of them, one for the message display, the other for the composer. I do not know which of the two is exhibiting the issue, neither how to recognize from `ps ax | grep WebProcess` which it is, thus get a backtrace for both and we'll see. Thanks in advance.
Comment 5 Tomas Popela 2017-04-28 11:48:41 UTC
No response provided so I'm closing this bug. If you hit the problem again, feel free to reopen it.
Comment 6 Milan Crha 2017-05-18 09:35:46 UTC
*** Bug 782747 has been marked as a duplicate of this bug. ***
Comment 7 Milan Crha 2017-05-18 10:45:19 UTC
According to the place of the crash it looks like e_content_editor_get_content() returned NULL for whatever reason. I think we can add at least a workaround to use an empty string instead of NULL in such cases, thus the code will not crash. Such workaround can hide the real issue and its cause, but it will be better than crashing the whole application.
Comment 8 Milan Crha 2017-05-18 11:06:09 UTC
The below change avoids the crash and claims on the console when it happened. Other usages of the function did check for non-NULL values already.

Created commit a2dfd08 in evo master (3.25.2+)
Created commit da122f2 in evo gnome-3-24 (3.24.3+)
Comment 9 Milan Crha 2017-05-22 09:35:47 UTC
*** Bug 782747 has been marked as a duplicate of this bug. ***
Comment 10 Milan Crha 2017-05-30 09:02:32 UTC
*** Bug 783022 has been marked as a duplicate of this bug. ***