<?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>291322</bug_id>
          
          <creation_ts>2025-04-09 09:29:41 -0700</creation_ts>
          <short_desc>Web Inspector: InspectorCanvasAgent::didChangeCanvasMemory violates assertion</short_desc>
          <delta_ts>2025-04-16 09:30:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>Other</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=290042</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Deleted User">deleted_user</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2109958</commentid>
    <comment_count>0</comment_count>
    <who name="Deleted User">deleted_user</who>
    <bug_when>2025-04-09 09:29:41 -0700</bug_when>
    <thetext>STR:

1. Download https://github.com/WebKit/WebKit/pull/42688/files#diff-569aa52dd7b76b7c6aa31cc120f8ec75356e60777ab397ea10aca371cde4b597.
2. Open it with GTK&apos;s MiniBrowser with a debug build.
3. Open the Graphics tab of Web Inspector.
4. Attach gdb to the WebKitWebProcess.
5. Reload the MiniBrowsers tab.
6. Click on the canvas in the Graphics tab of Web inspector.

Backtrace:
```
Thread 1 &quot;WebKitWebProces&quot; received signal SIGSEGV, Segmentation fault.
WTFCrash () at /host/home/mirko/work/code/WebKit/Source/WTF/wtf/Assertions.cpp:367
367	    *(int *)(uintptr_t)0xbbadbeef = 0;
(gdb) bt
#0  WTFCrash () at /host/home/mirko/work/code/WebKit/Source/WTF/wtf/Assertions.cpp:367
#1  0x0000736c4970967f in WTFCrashWithInfo () at /host/home/mirko/work/code/WebKit/WebKitBuild/GTK/Debug/WTF/Headers/wtf/Assertions.h:931
#2  0x0000736c506d3fbd in WebCore::InspectorCanvasAgent::didChangeCanvasMemory (this=0x736c1a0e4340, context=...)
    at /host/home/mirko/work/code/WebKit/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp:376
#3  0x0000736c5062496a in WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl (instrumentingAgents=..., context=...)
    at /host/home/mirko/work/code/WebKit/Source/WebCore/inspector/InspectorInstrumentation.cpp:1118
#4  0x0000736c5016b01b in WebCore::InspectorInstrumentation::didChangeCanvasMemory (context=...)
    at /host/home/mirko/work/code/WebKit/Source/WebCore/inspector/InspectorInstrumentation.h:1494
#5  0x0000736c5016c9b9 in WebCore::CanvasBase::setImageBuffer (this=0x736b8a008ef8, buffer=...) at /host/home/mirko/work/code/WebKit/Source/WebCore/html/CanvasBase.cpp:274
#6  0x0000736c501d86e6 in WebCore::HTMLCanvasElement::setImageBufferAndMarkDirty (this=0x736b8a008e30, buffer=...)
    at /host/home/mirko/work/code/WebKit/Source/WebCore/html/HTMLCanvasElement.cpp:902
#7  0x0000736c5042788b in WebCore::PlaceholderRenderingContext::setPlaceholderBuffer (this=0x736b8a006050, buffer=...)
    at /host/home/mirko/work/code/WebKit/Source/WebCore/html/canvas/PlaceholderRenderingContext.cpp:114
#8  0x0000736c5042731b in operator() (__closure=0x736c1a372d48) at /host/home/mirko/work/code/WebKit/Source/WebCore/html/canvas/PlaceholderRenderingContext.cpp:73
#9  0x0000736c504640a2 in WTF::Detail::CallableWrapper&lt;WebCore::PlaceholderRenderingContextSource::setPlaceholderBuffer(WebCore::ImageBuffer&amp;)::&lt;lambda()&gt;, void&gt;::call(void)
```

Violated assertion: https://searchfox.org/wubkat/rev/95b8a67e3715e5f442cadaf3532e007c8c7d2603/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp#376</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2111312</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-04-16 09:30:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/149393969&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>