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 781890 - Signature editor doesn't set correct format
Signature editor doesn't set correct format
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Composer
3.24.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2017-04-28 10:20 UTC by Milan Crha
Modified: 2017-04-28 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Crha 2017-04-28 10:20:57 UTC
Using Edit->Preferences->Composer Preferences->Signatures->Edit for an HTML signature while also having off "Composer Preferences->General->[ ] Format messages in HTML, can lead to an issue where the HTML signature is opened as a plain text in the editor, which is wrong.

It's about timing, where the below backtrace shows the issue. Notice the e_content_editor_set_html_mode() being called twice, first time with FALSE, to obey the option from General tab, the second time with 1, to set the format as the signature has saved, but this is done in recursion. The timing is crucial, because I've not been able to reproduce this with valgrind, which slows down things significantly.

  • #0 webkit_editor_set_html_mode
    at .../src/modules/webkit-editor/e-webkit-editor.c line 1678
  • #1 webkit_editor_set_property
    at .../src/modules/webkit-editor/e-webkit-editor.c line 5302
  • #2 object_set_property
    at gobject.c line 1423
  • #3 g_object_set_valist
    at gobject.c line 2167
  • #4 g_object_set
    at gobject.c line 2277
  • #5 e_content_editor_set_html_mode
    at .../src/e-util/e-content-editor.c line 704
  • #6 mail_signature_editor_loaded_cb
    at .../src/e-util/e-mail-signature-editor.c line 153
  • #7 g_simple_async_result_complete
    at gsimpleasyncresult.c line 801
  • #8 complete_in_idle_cb_for_thread
    at gsimpleasyncresult.c line 872
  • #9 g_idle_dispatch
    at gmain.c line 5545
  • #10 g_main_dispatch
    at gmain.c line 3203
  • #11 g_main_context_dispatch
    at gmain.c line 3856
  • #12 g_main_context_iterate
    at gmain.c line 3929
  • #13 g_main_context_iteration
    at gmain.c line 3990
  • #14 e_util_invoke_g_dbus_proxy_call_sync_wrapper_full
    at .../src/e-util/e-misc-utils.c line 3815
  • #15 e_util_invoke_g_dbus_proxy_call_sync_wrapper_with_error_check
    at .../src/e-util/e-misc-utils.c line 3744
  • #16 webkit_editor_set_html_mode
    at .../src/modules/webkit-editor/e-webkit-editor.c line 1681
  • #17 webkit_editor_set_property
    at .../src/modules/webkit-editor/e-webkit-editor.c line 5302
  • #18 object_set_property
    at gobject.c line 1423
  • #19 g_object_set_valist
    at gobject.c line 2167
  • #20 g_object_set
    at gobject.c line 2277
  • #21 e_content_editor_set_html_mode
    at .../src/e-util/e-content-editor.c line 704
  • #22 mail_shell_backend_window_added_cb
    at .../src/modules/mail/e-mail-shell-backend.c line 533
  • #27 <emit signal ??? on instance 0x6eb050 [EShell]>
    at gsignal.c line 3447
  • #32 <emit signal ??? on instance 0x4355940 [EMailSignatureManager]>
    at gsignal.c line 3447
  • #33 mail_signature_manager_emit_editor_created
    at .../src/e-util/e-mail-signature-manager.c line 80
  • #34 mail_signature_manager_editor_created_edit_signature_cb
    at .../src/e-util/e-mail-signature-manager.c line 486
  • #35 e_simple_async_result_complete
    at .../src/e-util/e-simple-async-result.c line 216
  • #36 mail_signature_editor_html_editor_created_cb
    at .../src/e-util/e-mail-signature-editor.c line 783
  • #37 e_simple_async_result_complete
    at .../src/e-util/e-simple-async-result.c line 216
  • #38 e_html_editor_content_editor_initialized
    at .../src/e-util/e-html-editor.c line 928
  • #39 web_extension_proxy_created_cb
    at .../src/modules/webkit-editor/e-webkit-editor.c line 593
  • #40 g_task_return_now
    at gtask.c line 1121
  • #41 g_task_return
    at gtask.c line 1179
  • #42 g_task_return_boolean
    at gtask.c line 1680
  • #43 init_second_async_cb
    at gdbusproxy.c line 1808
  • #44 g_task_return_now
    at gtask.c line 1121
  • #45 g_task_return
    at gtask.c line 1179
  • #46 g_task_return_pointer
    at gtask.c line 1574
  • #47 async_init_get_all_cb
    at gdbusproxy.c line 1443
  • #48 g_task_return_now
    at gtask.c line 1121
  • #49 g_task_return
    at gtask.c line 1179
  • #50 g_task_return_pointer
    at gtask.c line 1574
  • #51 g_dbus_connection_call_done
    at gdbusconnection.c line 5708
  • #52 g_task_return_now
    at gtask.c line 1121
  • #53 complete_in_idle_cb
    at gtask.c line 1135
  • #54 g_idle_dispatch
    at gmain.c line 5545
  • #55 g_main_dispatch
    at gmain.c line 3203
  • #56 g_main_context_dispatch
    at gmain.c line 3856
  • #57 g_main_context_iterate
    at gmain.c line 3929
  • #58 g_main_loop_run
    at gmain.c line 4125
  • #59 gtk_main
  • #60 main
    at .../src/shell/main.c line 667

Comment 1 Milan Crha 2017-04-28 10:58:33 UTC
I changed the code to load signature into the editor only after the editor is fully setup, not in its constructed(), which avoids this "race condition".

Created commit 4808599 in evo master (3.25.2+)
Created commit c83f5ce in evo gnome-3-24 (3.24.2+)