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 772803 - Inline images cause busy loop on Reply in WebKitWebProcess
Inline images cause busy loop on Reply in WebKitWebProcess
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Composer
3.22.x (obsolete)
Other Linux
: Normal major
: ---
Assigned To: Tomas Popela
Evolution QA team
: 773539 773772 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-10-12 13:06 UTC by Benjamin Selzer
Modified: 2016-11-02 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample message (49.66 KB, application/mbox)
2016-10-13 09:34 UTC, Benjamin Selzer
Details
Empty bt.txt (25 bytes, text/plain)
2016-10-13 09:34 UTC, Benjamin Selzer
Details

Description Benjamin Selzer 2016-10-12 13:06:57 UTC
Arch Linux amd64

Broke in upgrading from Evolution 3.22.0 to 3.22.1

Composing a message from scratch opens window as appropriate.

Hitting Reply to Reply to All on a message opens new message window with the composer section blank (no original email, no signature, no active cursor).

Clicking in the window to type does nothing. Attempting to type in window does nothing.

I have -ews installed, if that makes a difference.
Comment 1 Graham 2016-10-13 02:11:50 UTC
(In reply to Benjamin Selzer from comment #0)
> Arch Linux amd64
> 
> Broke in upgrading from Evolution 3.22.0 to 3.22.1
> 
> Composing a message from scratch opens window as appropriate.
> 
> Hitting Reply to Reply to All on a message opens new message window with the
> composer section blank (no original email, no signature, no active cursor).
> 
> Clicking in the window to type does nothing. Attempting to type in window
> does nothing.
> 
> I have -ews installed, if that makes a difference.

I have the same issue after updating to 3.22.1 and I', also on Arch
Comment 2 Benjamin Selzer 2016-10-13 02:22:33 UTC
Maybe I'm on to something. I launched both versions of Evolution from the command line. The results are this:

First, I launched 3.22.0 (the one that works). When I click Reply to an email, my Terminal says (twice):

** (WebKitWebProcess:7395): CRITICAL **: void webkit_dom_element_set_attribute(WebKitDOMElement*, const gchar*, const gchar*, GError**): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:7395): CRITICAL **: void webkit_dom_element_set_attribute(WebKitDOMElement*, const gchar*, const gchar*, GError**): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

HOWEVER, then the email renders perfectly.


Second, I launched 3.22.1 (the one that doesn't work). When i click Reply to an email, my Terminal says (HUNDREDS AND HUNDREDS OF TIMES OVER AND OVER):

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

** (WebKitWebProcess:6836): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

It keeps going and going and going, and will continue until I close the failed composer window.


I notice the messages are slightly different, with a different WebKitWebProcess number.

My webkit2gtk is up to date, so I'm at a loss. Not sure if that's related.

[benjaminselzer@pixel pkg]$ yaourt -Q webkit2gtk
extra/webkit2gtk 2.14.1-1

Any ideas?
Comment 3 Milan Crha 2016-10-13 07:55:42 UTC
Thanks for a bug report. Could you provide a simple test message as a reproducer, please? It seems to me like some change for 3.22.1 caused a busy loop in the composer code for some reason. That's only a blind and wild guess.

Also, could you install packages with debugging information (no need of debug info for webkit2gtk itself), then grab a backtrace of the WebKitWebProcess (it's process ID is shown on each critical warning in the console, where at the previous comment it's number 6836). You can get the backtrace with command like this:
   $ gdb --batch --ex "t a a bt" -pid=PID &>bt.txt
Please check the bt.txt for any private information, like passwords, email address, server addresses,... I usually search for "pass" at least (quotes for clarity only).

The backtrace will show what the process it trying to do. Thanks in advance.
Comment 4 Benjamin Selzer 2016-10-13 09:33:33 UTC
Milan:

Thank you for the response. I'm new at this, so please help a little:

1.) I have attached a samples message which I cannot reply to. Is that what you wanted from me?

2.) I installed gdb, then I ran Evolution via gdb:

$ gdb evolution
r

Then I performed the problem function (Reply to message). I could see in the Terminal the similar errors, but it was process 9339 this time:

** (WebKitWebProcess:9339): CRITICAL **: gchar* webkit_dom_element_get_attribute(WebKitDOMElement*, const gchar*): assertion 'WEBKIT_DOM_IS_ELEMENT(self)' failed

I then quit Evolution and ran:

$ gdb --batch --ex "t a a bt" -pid=9339 &>bt.txt

I have attacehd bt.txt. It just says:

ptrace: No such process.

What did I do wrong?

Sorry, I am not experienced, but I am trying!
Comment 5 Benjamin Selzer 2016-10-13 09:34:03 UTC
Created attachment 337564 [details]
Sample message
Comment 6 Benjamin Selzer 2016-10-13 09:34:29 UTC
Created attachment 337565 [details]
Empty bt.txt
Comment 7 Ralf 2016-10-13 10:06:54 UTC
Hi,

the email doesn't cause any issues for my Evolution from the Arch extra repository.

Regarding debugging I already provided a pointer:

"Perhaps you need to debug, https://wiki.archlinux.org/index.php/Step-by-step_debugging_guide#Gdb ."
- https://mail.gnome.org/archives/evolution-list/2016-October/msg00069.html

OTOH prefer this clear guide
https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces#General
over this confusing instruction
https://wiki.archlinux.org/index.php/Step-by-step_debugging_guide#Gdb
IOW
"These settings will force compilation with debugging information and will disable the stripping of debug symbols from executables. To apply this setting to a single package, modify the PKGBUILD:

options=(debug !strip)"
should be all you need to do.

I also mentioned ABS, https://wiki.archlinux.org/index.php/Arch_Build_System and that you first need to build and install evolution-data-server and after that evolution, resp. evolution-ews.

[rocketmouse@archlinux ~]$ ls -hAl /var/abs/extra/evolution*
/var/abs/extra/evolution:
total 4.0K
-rw-r--r-- 1 root root 2.7K Oct 13 00:07 PKGBUILD

/var/abs/extra/evolution-data-server:
total 4.0K
-rw-r--r-- 1 root root 1.4K Oct 13 00:07 PKGBUILD

/var/abs/extra/evolution-ews:
total 4.0K
-rw-r--r-- 1 root root 1.2K Oct 13 00:07 PKGBUILD

Regards,
Ralf
Comment 8 Ralf 2016-10-13 10:15:52 UTC
My apologies,

after "Don't lose formatting" the bug affects me, too. Usually I use "Lose formatting", so I didn't notice it in the first place.

Regards,
Ralf
Comment 9 Benjamin Selzer 2016-10-13 10:25:49 UTC
OK so we cannot reply in HTML. This clearly seems like a bug.

I appreciate your tips. I will try to figure it out later, but I am just a beginning. I am not familiar with editing PKGBUILD's.

Since it's effecting you, are you able to provide the debugging information?

Thank you for the continued follow up.
Comment 10 Milan Crha 2016-10-13 10:30:31 UTC
Thanks for the update. The sample message is perfectly fine, I can reproduce it with it too, which is much better than the backtrace. Just to answer, ptrace is a process which gdb calls to get the information about the process. You do not have it installed, which is fine now, because of the test message.
Comment 11 Milan Crha 2016-10-13 10:34:17 UTC
The backtrace I was looking for looks like this (git master):

  • #6 g_logv
  • #7 g_log
  • #8 webkit_dom_element_get_attribute
  • #9 set_base64_to_element_attribute
    at ..../evolution/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c line 8359
  • #10 change_cid_images_src_to_base64
    at ..../evolution/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c line 8425
  • #11 e_editor_dom_process_content_after_load
    at ..../evolution/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c line 8545
  • #12 web_page_document_loaded_cb
    at ..../evolution/src/modules/webkit-editor/web-extension/e-editor-page.c line 85
  • #13 g_closure_invoke
  • #14 signal_emit_unlocked_R
  • #15 g_signal_emit_valist
  • #16 g_signal_emit
  • #17 WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame(WebKit::WebPage*, WebKit::WebFrame*, WTF::RefPtr<API::Object>&)
  • #18 WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad()
  • #19 WebCore::FrameLoader::finishedParsing()
  • #20 WebCore::Document::finishedParsing()
  • #21 WebCore::HTMLDocumentParser::prepareToStopParsing()
  • #22 WebCore::HTMLDocumentParser::finish() [clone .localalias.142]
  • #23 WebCore::DocumentWriter::end()
  • #24 WebCore::DocumentLoader::finishedLoading(double)
  • #25 WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction)
  • #26 WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&)
  • #27 WebCore::DocumentLoader::handleSubstituteDataLoadNow()
  • #28 WebCore::ThreadTimers::sharedTimerFiredInternal()
  • #29 WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&)::{lambda(void*)#1}::_FUN(void*)
  • #30 g_main_context_dispatch
  • #31 g_main_context_iterate.isra
  • #32 g_main_loop_run
  • #33 WTF::RunLoop::run()
  • #34 int WebKit::ChildProcessMain<WebKit::WebProcess, WebKit::WebProcessMain>(int, char**)
  • #35 __libc_start_main
  • #36 _start

Comment 12 Benjamin Selzer 2016-10-13 10:40:59 UTC
OK thank you. Sorry I wasn't able to product it.

There is something wrong with the HTML composer in 3.22.1.

For instance, put on a dark theme.

In 3.22.0, if I compose a fresh HTML message, the composer area is white. This is correct, because HTML works from a while blank slate.

However, in 3.22.1, the HTML composer is taking on the dark background. I do not believe this is correct.

The way it works in 3.22.0 renders and composes HTML properly. The way it works in 3.22.1 is the way it worked in 3.20 with dark themes, and it made problems composing messages in HTML mode.

Is there something else that you need from me?
Comment 13 Milan Crha 2016-10-13 10:47:01 UTC
So the webkit_dom_node_list_get_length() can actually return 0, then the construction:

8422	for (jj = webkit_dom_node_list_get_length (list) - 1; jj--;) {

starts with jj = -1, thus it will eventually stop (get to 0) once it does it 2^32 times, +/- 1 or so.

I see the similar construction is used widely in this source file. A safer option is:

8422	for (jj = webkit_dom_node_list_get_length (list) - 1; jj >= 0; jj--) {
Comment 14 Benjamin Selzer 2016-10-13 10:53:31 UTC
OK. Do I need to change something? I am not familiar with the process. This is my first bug report ever :)
Comment 15 Milan Crha 2016-10-13 10:56:26 UTC
(In reply to Milan Crha from comment #13)
> starts with jj = -1

Oops, no, it starts with -2 instead.
Thus this change works too:

8422	for (jj = webkit_dom_node_list_get_length (list); jj--;) {

(In reply to Benjamin Selzer from comment #12)
> OK thank you. Sorry I wasn't able to product it.

That's okay, the test message is much better, because it allows testing here, which saves time both for you and for the developer (being able to reproduce the issue is always a plus).

> For instance, put on a dark theme.

Might be something to do with bug #772233.

(In reply to Benjamin Selzer from comment #14)
> OK. Do I need to change something? I am not familiar with the process. This
> is my first bug report ever :)

Not as of now. You can just watch as the bug get fixed and then either wait for the change to be available in your distribution or apply the change locally.
Comment 16 Milan Crha 2016-10-13 11:03:27 UTC
Created commit d74c18b in evo master (3.23.1+)
Created commit 94d226c in evo gnome-3-22 (3.22.2+)
Comment 17 Benjamin Selzer 2016-10-13 13:23:02 UTC
Thanks!

Can you give me a hint on how to patch locally? Sorry I'm such a dodo :)
Comment 18 Ralf 2016-10-13 14:58:29 UTC
You don't need to apply a patch, just build from git

  git clone git://git.foo.org/foo.git
  cd foo/

then either

  git checkout abcd1234

or

  git pull --all

However, better build based on ABS or AUR PKGBUILDs, but consider to read the source code's READMEs, autogen.sh vs cmake.

The GNOME bug tracker unlikely is the right place to continue this kind of requests. Please use an appropriate support forum and before doing this consult the Arch Wiki.
Comment 19 Benjamin Selzer 2016-10-13 15:04:53 UTC
You're right. Thank you.
Comment 20 Tomas Popela 2016-11-01 11:07:22 UTC
*** Bug 773772 has been marked as a duplicate of this bug. ***
Comment 21 Milan Crha 2016-11-02 12:37:32 UTC
*** Bug 773539 has been marked as a duplicate of this bug. ***