<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>235586</bug_id>
          
          <creation_ts>2022-01-25 07:40:17 -0800</creation_ts>
          <short_desc>UI process crash in WebCore::ScalableImageDecoderFrame::operator=</short_desc>
          <delta_ts>2024-12-23 08:06:41 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>kdwkleung</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1833700</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-01-25 07:40:17 -0800</bug_when>
    <thetext>Moving from https://gitlab.gnome.org/GNOME/epiphany/-/issues/1684. Reproducer: replace your Epiphany&apos;s session_state.xml with:

&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;session&gt;
	&lt;window x=&quot;0&quot; y=&quot;0&quot; width=&quot;1024&quot; height=&quot;768&quot; is-maximized=&quot;1&quot; is-fullscreen=&quot;0&quot; active-tab=&quot;19&quot;&gt;
		&lt;embed url=&quot;https://lupyuen.github.io/pinetime-rust-mynewt/articles/wayland&quot; title=&quot;Wayland and LVGL on PinePhone with Ubuntu Touch&quot; loading=&quot;true&quot; history=&quot;AgAAAAAAAAAI&quot;/&gt;
	&lt;/window&gt;
&lt;/session&gt;

Then Epiphany will crash on startup in ScalableImageDecoder. The backtrace is pretty short, so I&apos;m going to paste it inline instead of attaching it:

#0  WebCore::ScalableImageDecoderFrame::operator=(WebCore::ScalableImageDecoderFrame const&amp;) [clone .isra.0]
    (this=0x7f0884426280, other=...)
    at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/image-decoders/ScalableImageDecoderFrame.cpp:46
#1  0x00007f089a2959e3 in WebCore::ICOImageDecoder::decodeAtIndex(unsigned long) (index=0, this=0x7f0884492000)
    at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:216
        dirEntry = 
          @0x7f08844dac00: {m_size = {m_width = 196, m_height = 196}, m_bitCount = 32, m_hotSpot = {m_x = 0, m_y = 0}, m_imageOffset = 70}
        imageType = WebCore::ICOImageDecoder::PNG
#2  WebCore::ICOImageDecoder::decode(unsigned long, bool, bool)
    (this=0x7f0884492000, index=0, onlySize=&lt;optimized out&gt;, allDataReceived=&lt;optimized out&gt;)
    at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:158
#3  0x00007f089a2963f1 in WebCore::ICOImageDecoder::decode(unsigned long, bool, bool)
    (allDataReceived=&lt;optimized out&gt;, onlySize=false, index=0, this=0x7f0884492000)
    at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/image-decoders/ScalableImageDecoder.h:70
        buffer = 0x7f0884426280
#4  WebCore::ICOImageDecoder::frameBufferAtIndex(unsigned long) (this=0x7f0884492000, index=0)
    at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp:101
        buffer = 0x7f0884426280
#5  0x00007f089a286f75 in WebCore::ScalableImageDecoder::createFrameImageAtIndex(unsigned long, WebCore::SubsamplingLevel, WebCore::DecodingOptions const&amp;) (this=0x7f0884492000, index=0)
    at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp:229
        buffer = &lt;optimized out&gt;
#6  0x00007f0899dd3a78 in WebCore::ImageSource::frameAtIndexCacheIfNeeded(unsigned long, WebCore::ImageFrame::Caching, std::optional&lt;WebCore::SubsamplingLevel&gt; const&amp;)
    (this=0x7f08844316c0, index=0, caching=(unknown: 0x5e3331c8), subsamplingLevel=std::optional&lt;WebCore::SubsamplingLevel&gt; = {...}) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/graphics/ImageSource.cpp:462
        platformImage = {m_ptr = 0x7f0899dcbf86 &lt;WebCore::ImageSource::growFrames()+294&gt;}
        frame = 
          @0x7f0884469a00: {m_decodingStatus = WebCore::DecodingStatus::Invalid, m_size = {m_width = 0, m_height = 0}, m_nativeImage = {m_ptr = 0x0}, m_subsamplingLevel = WebCore::SubsamplingLevel::First, m_decodingOptions = {m_decodingModeOrSize = {&lt;WTF::__variant_base&lt;WTF::Variant&lt;WebCore::DecodingMode, std::optional&lt;WebCore::IntSize&gt; &gt;, true&gt;&gt; = {&lt;No data fields&gt;}, __storage = {__head = {__val = WebCore::DecodingMode::Auto, __dummy = {&lt;No data fields&gt;}}, __rest = {__val = std::optional&lt;WebCore::IntSize&gt; [no contained value], __dummy = {&lt;No data fields&gt;}}}, __index = 0 &apos;\000&apos;}}, m_orientation = {static EXIFFirst = WebCore::ImageOrientation::OriginTopLeft, static EXIFLast = WebCore::ImageOrientation::OriginLeftBottom, static First = WebCore::ImageOrientation::FromImage, static Last = WebCore::ImageOrientation::OriginLeftBottom, m_orientation = WebCore::ImageOrientation::OriginTopLeft}, m_densityCorrectedSize = std::optional&lt;WebCore::IntSize&gt; [no contained value], m_duration = {m_value = 0}, m_hasAlpha = true}
        subsamplingLevelValue = WebCore::SubsamplingLevel::First
#7  0x00007f089a526735 in WebCore::ImageSource::frameAtIndexCacheIfNeeded(unsigned long, WebCore::ImageFrame::Caching, std::optional&lt;WebCore::SubsamplingLevel&gt; const&amp;)
    (subsamplingLevel=std::optional&lt;WebCore::SubsamplingLevel&gt; = {...}, caching=WebCore::ImageFrame::Caching::MetadataAndImage, index=0, this=&lt;optimized out&gt;)
    at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/graphics/ImageSource.cpp:440
#8  WebCore::ImageSource::frameImageAtIndexCacheIfNeeded(unsigned long, WebCore::SubsamplingLevel)
    (subsamplingLevel=WebCore::SubsamplingLevel::First, index=0, this=&lt;optimized out&gt;)
    at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/graphics/ImageSource.cpp:718
#9  WebCore::BitmapImage::frameImageAtIndexCacheIfNeeded(unsigned long, WebCore::SubsamplingLevel, WebCore::GraphicsCon--Type &lt;RET&gt; for more, q to quit, c to continue without paging--c
text const*) [clone .constprop.0] (this=&lt;optimized out&gt;, index=0, subsamplingLevel=subsamplingLevel@entry=WebCore::SubsamplingLevel::First, targetContext=&lt;optimized out&gt;) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/graphics/BitmapImage.cpp:142
#10 0x00007f0898e5bcd4 in WebCore::BitmapImage::nativeImageForCurrentFrame(WebCore::GraphicsContext const*) (targetContext=0x0, this=&lt;optimized out&gt;) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebCore/platform/graphics/BitmapImage.cpp:152
        image = {m_ptr = 0x7f088441c000}
        nativeImage = {m_ptr = 0x0}
        addResult = {iterator = {&lt;std::iterator&lt;std::forward_iterator_tag, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt;, long, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt;*, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt;&amp;&gt;&gt; = {&lt;No data fields&gt;}, m_iterator = {&lt;std::iterator&lt;std::forward_iterator_tag, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt;, long, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt; const*, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt; const&amp;&gt;&gt; = {&lt;No data fields&gt;}, m_position = 0x7f08844bc0f8, m_endPosition = &lt;optimized out&gt;}}, isNewEntry = &lt;optimized out&gt;}
        icon = {m_ptr = 0x0}
#11 operator() (__closure=&lt;optimized out&gt;) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp:585
        image = {m_ptr = 0x7f088441c000}
        nativeImage = {m_ptr = 0x0}
        addResult = {iterator = {&lt;std::iterator&lt;std::forward_iterator_tag, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt;, long, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt;*, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt;&amp;&gt;&gt; = {&lt;No data fields&gt;}, m_iterator = {&lt;std::iterator&lt;std::forward_iterator_tag, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt;, long, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt; const*, WTF::KeyValuePair&lt;WTF::String, std::pair&lt;WTF::RefPtr&lt;_cairo_surface, WTF::RawPtrTraits&lt;_cairo_surface&gt;, WTF::DefaultRefDerefTraits&lt;_cairo_surface&gt; &gt;, WTF::MonotonicTime&gt; &gt; const&amp;&gt;&gt; = {&lt;No data fields&gt;}, m_position = 0x7f08844bc0f8, m_endPosition = &lt;optimized out&gt;}}, isNewEntry = &lt;optimized out&gt;}
        icon = {m_ptr = 0x0}
#12 operator() (__closure=&lt;optimized out&gt;) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp:595
        icon = {m_ptr = 0x0}
#13 WTF::Detail::CallableWrapper&lt;WebKit::IconDatabase::loadIconForPageURL(const WTF::String&amp;, WebKit::IconDatabase::AllowDatabaseWrite, WTF::CompletionHandler&lt;void(WTF::RefPtr&lt;_cairo_surface&gt;&amp;&amp;)&gt;&amp;&amp;)::&lt;lambda()&gt; mutable::&lt;lambda()&gt;, void&gt;::call(void) (this=0x7f088447a348) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/redhat-linux-build/WTF/Headers/wtf/Function.h:53
#14 0x00007f0898085bfd in WTF::Function&lt;void ()&gt;::operator()() const (this=&lt;synthetic pointer&gt;) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WTF/wtf/Function.h:79
        didSuspendFunctions = false
#15 WTF::RunLoop::performWork() (this=0x7f08844f9000) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WTF/wtf/RunLoop.cpp:133
        didSuspendFunctions = false
#16 0x00007f08980d4edd in WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*) () at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WTF/wtf/glib/RunLoopGLib.cpp:80
#17 0x00007f08980cf913 in operator() (__closure=0x0, userData=0x7f08844f9000, callback=0x7f08980d4ed0 &lt;WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*)&gt;, source=0x5562955ccea0) at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WTF/wtf/glib/RunLoopGLib.cpp:53
        name = 0x556295640de0 &quot;[WebKit] RunLoop work&quot;
        runLoopSource = @0x5562955ccea0: {source = {callback_data = 0x556295684bd0, callback_funcs = 0x7f089bbea3e0 &lt;g_source_callback_funcs&gt;, source_funcs = 0x7f089857e4e0 &lt;WTF::RunLoop::s_runLoopSourceFunctions&gt;, ref_count = 3, context = 0x556295477f80, priority = 100, flags = 35, source_id = 7, poll_fds = 0x0, prev = 0x0, next = 0x0, name = 0x556295640de0 &quot;[WebKit] RunLoop work&quot;, priv = 0x55629551d400}, runLoop = 0x7f08844f9000}
        returnValue = &lt;optimized out&gt;
#18 _FUN(GSource*, GSourceFunc, gpointer) () at /usr/src/debug/webkit2gtk3-2.34.1-2.fc35.x86_64/Source/WTF/wtf/glib/RunLoopGLib.cpp:56
#19 0x00007f089bb06130 in g_main_dispatch (context=0x556295477f80) at ../glib/gmain.c:3381
        dispatch = 0x7f08980cf8c0 &lt;_FUN(GSource*, GSourceFunc, gpointer)&gt;
        prev_source = 0x0
        begin_time_nsec = 24845183386370
        was_in_call = &lt;optimized out&gt;
        user_data = 0x7f08844f9000
        callback = 0x7f08980d4ed0 &lt;WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*)&gt;
        cb_funcs = 0x7f089bbea3e0 &lt;g_source_callback_funcs&gt;
        cb_data = 0x556295684bd0
        need_destroy = &lt;optimized out&gt;
        source = 0x5562955ccea0
        current = 0x55629547a7e0
        i = 0
#20 g_main_context_dispatch (context=0x556295477f80) at ../glib/gmain.c:4099
#21 0x00007f089bb5b208 in g_main_context_iterate.constprop.0 (context=context@entry=0x556295477f80, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at ../glib/gmain.c:4175
        max_priority = 2147483647
        timeout = 168
        some_ready = 1
        nfds = 5
        allocated_nfds = 5
        fds = &lt;optimized out&gt;
        begin_time_nsec = 24845180922660
#22 0x00007f089bb03933 in g_main_context_iteration (context=context@entry=0x556295477f80, may_block=may_block@entry=1) at ../glib/gmain.c:4240
        retval = &lt;optimized out&gt;
#23 0x00007f089bd273d5 in g_application_run (application=0x5562954706a0, argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at ../gio/gapplication.c:2569
        arguments = 0x55629552b9e0
        status = 0
        context = 0x556295477f80
        acquired_context = &lt;optimized out&gt;
        __func__ = &quot;g_application_run&quot;
#24 0x000055629456b08b in main (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at ../src/ephy-main.c:431
        option_context = &lt;optimized out&gt;
        option_group = &lt;optimized out&gt;
        error = 0x0
        user_time = 24841570
        arbitrary_url = &lt;optimized out&gt;
        ctx = &lt;optimized out&gt;
        mode = &lt;optimized out&gt;
        status = &lt;optimized out&gt;
        flags = &lt;optimized out&gt;
        desktop_info = &lt;optimized out&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1873535</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-06-02 01:45:55 -0700</bug_when>
    <thetext>I just ran into this today. One does not even need to use Epiphany,
opening https://lupyuen.github.io/articles/zig?1 with MiniBrowser
results in basically the same backtrace.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1873536</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-06-02 01:48:11 -0700</bug_when>
    <thetext>(In reply to Adrian Perez from comment #1)
&gt; I just ran into this today. One does not even need to use Epiphany,
&gt; opening https://lupyuen.github.io/articles/zig?1 with MiniBrowser
&gt; results in basically the same backtrace.

The reference passed as the function argument is invalid:

(gdb) p other.m_decodingStatus
Cannot access memory at address 0x0
(gdb) p &amp;other
$4 = (const WebCore::ScalableImageDecoderFrame *) 0x0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2083556</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-12-22 07:15:06 -0800</bug_when>
    <thetext>*** Bug 285077 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2083557</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-12-22 07:15:54 -0800</bug_when>
    <thetext>Bug #285077 reports this is also happening on DuckDuckGo search results, although I don&apos;t see it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2083640</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-12-23 08:06:41 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #4)
&gt; Bug #285077 reports this is also happening on DuckDuckGo search results,
&gt; although I don&apos;t see it.

Ah, it happens on the particular search results link: https://duckduckgo.com/?q=big+short+screenplay&amp;t=epiphany</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>