<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Segfault when changing IMG SRC value in WebKitGTK+2.4.10"
   href="https://bugs.webkit.org/show_bug.cgi?id=155694">155694</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Segfault when changing IMG SRC value in WebKitGTK+2.4.10
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit Gtk
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mike&#64;vee.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bugs-noreply&#64;webkitgtk.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>WebKitGTK+ 2.4.10 seems to have introduced a bug that is causing a crash when loading HTML images in Geary (See <a href="https://bugzilla.gnome.org/show_bug.cgi?id=763933">https://bugzilla.gnome.org/show_bug.cgi?id=763933</a>). This didn't occur using earlier versions of WebKitGTK+.

Geary currently implements user-controlled image loading by what amounts to using a random scheme string for the IMG SRC attribute - when the user has assented to loading images for a specific message, it updates every IMG SRC attribute value to be prefixed with the random scheme. The crash occurs during this process, at random, when displaying a HTML message.

A workaround exists in removing the src element first using webkit_dom_element_remove_attribute(), causing the subsequent call to webkit_dom_element_set_attribute() not crash. Workarounds that do not work include cloning the IMG element and setting the SRC element on that instead, nor does casting the element and using webkit_dom_html_image_element_set_src(). I didn't try creating a new Attr instance, setting the value on that, then setting that on the IMG element.

I know you guys aren't interested in supporting 2.4.x, but I thought I'd log it since it's a regression with 2.4.10 (thanks for doing a new release, BTW!).

Thread 1 &quot;geary&quot; received signal SIGSEGV, Segmentation fault.
WebCore::AXObjectCache::handleAttributeChanged (this=0x7fff9191b500, attrName=..., element=0x5df8210)
    at ../Source/WebCore/accessibility/AXObjectCache.cpp:880
880        if (!attrName.localName().string().startsWith(&quot;aria-&quot;))
(gdb) bt
#0  0x00007ffff4d8aae9 in WebCore::AXObjectCache::handleAttributeChanged(WebCore::QualifiedName const&amp;, WebCore::Element*) (this=0x7fff9191b500, attrName=..., element=0x5df8210) at ../Source/WebCore/accessibility/AXObjectCache.cpp:880
#1  0x00007ffff4f8105a in WebCore::Element::attributeChanged(WebCore::QualifiedName const&amp;, WTF::AtomicString const&amp;, WTF::AtomicString const&amp;, WebCore::Element::AttributeModificationReason) (this=0x5df8210, name=..., oldValue=..., newValue=...)
    at ../Source/WebCore/dom/Element.cpp:1137
#2  0x00007ffff4f80530 in WebCore::Element::didModifyAttribute(WebCore::QualifiedName const&amp;, WTF::AtomicString const&amp;, WTF::AtomicString const&amp;) (this=this&#64;entry=0x5df8210, name=..., oldValue=..., newValue=...) at ../Source/WebCore/dom/Element.cpp:2851
#3  0x00007ffff4f8777d in WebCore::Element::setAttributeInternal(unsigned int, WebCore::QualifiedName const&amp;, WTF::AtomicString const&amp;, WebCore::Element::SynchronizationOfLazyAttribute) (this=this&#64;entry=0x5df8210, index=&lt;optimised out&gt;, name=..., newValue=..., inSynchronizationOfLazyAttribute=inSynchronizationOfLazyAttribute&#64;entry=WebCore::Element::NotInSynchronizationOfLazyAttribute)
    at ../Source/WebCore/dom/Element.cpp:1075
#4  0x00007ffff4f8494f in WebCore::Element::setAttribute(WTF::AtomicString const&amp;, WTF::AtomicString const&amp;, int&amp;) (this=this&#64;entry=0x5df8210, localName=..., value=..., ec=&#64;0x7fffffffddec: 0) at ../Source/WebCore/dom/Element.cpp:1027
#5  0x00007ffff5bd7a5c in webkit_dom_element_set_attribute(WebKitDOMElement*, gchar const*, gchar const*, GError**) (self=self&#64;entry=0x5dcd0b0 [WebKitDOMHTMLImageElement], name=name&#64;entry=0x6ac5bc &quot;src&quot;, value=value&#64;entry=0x5851a00 &quot;glxaowieyx:<a href="http://www.outsideonline.com/sites/default/files/styles/img_600x339/public/cogburn-cb4.jpg?itok=04MxjrHH">http://www.outsideonline.com/sites/default/files/styles/img_600x339/public/cogburn-cb4.jpg?itok=04MxjrHH</a>&quot;, error=error&#64;entry=0x7fffffffded0)
    at DerivedSources/webkitdom/WebKitDOMElement.cpp:533
#6  0x00000000004d7e86 in conversation_viewer_show_images_email (self=self&#64;entry=0xd46230 [ConversationViewer], email_element=0x5b59440 [WebKitDOMHTMLDivElement], remember=remember&#64;entry=0)
    at /home/mjg/local/src/geary/src/client/conversation-viewer/conversation-viewer.vala:1497
---Type &lt;return&gt; to continue, or q &lt;return&gt; to quit---
#7  0x00000000004dfbb0 in conversation_viewer_add_message (self=0xd46230 [ConversationViewer], email=0x7fff1400b770 [GearyEmail], is_in_folder=1) at /home/mjg/local/src/geary/src/client/conversation-viewer/conversation-viewer.vala:698</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>