<?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>265154</bug_id>
          
          <creation_ts>2023-11-20 11:55:32 -0800</creation_ts>
          <short_desc>[GTK] Failed to create GBM buffer of size 0x0: Invalid argument</short_desc>
          <delta_ts>2024-03-19 02:12:51 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Carlos Garcia Campos">cgarcia</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>philn</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1993963</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-11-20 11:55:32 -0800</bug_when>
    <thetext>Reproducer:

 * Open two Epiphany windows. One of the two windows should have only one open tab.
 * Close the window that has only one tab.
 * Use Reopen Closed Tab to reopen the window

Expected behavior: the tab reopens and loads

Actual behavior: the tab reopens, but no web content is displayed, and this warning is printed:

Failed to create GBM buffer of size 0x0: Invalid argument

This reproducer works in both main (tested with 270652@main) and Epiphany Tech Preview (WebKitGTK 2.42.2). However, it&apos;s not 100% reliable. It *usually* fails to display web content, but not always. If it works, then it seems to always fail if I try again.

The error is coming from AcceleratedSurfaceDMABuf::RenderTargetEGLImage::create, here:

    if (!bo) {
        WTFLogAlways(&quot;Failed to create GBM buffer of size %dx%d: %s&quot;, size.width(), size.height(), safeStrerror(errno).data());
        return nullptr;
    }

I presume gbm_bo_create() does not like us trying to use 0 width and 0 height.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2012689</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2024-02-12 06:48:30 -0800</bug_when>
    <thetext>This happens here in WPE and GTK when trying to use the remote web-inspector. The newly opened window is empty.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2012690</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2024-02-12 06:48:36 -0800</bug_when>
    <thetext>This happens here in WPE and GTK when trying to use the remote web-inspector. The newly opened window is empty.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2019354</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-03-07 09:08:57 -0800</bug_when>
    <thetext>This also breaks the embedded web view in gnome-initial-setup if the web view is created more than once: https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/213</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2021759</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2024-03-18 07:01:21 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/26043</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2022077</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-03-19 02:12:49 -0700</bug_when>
    <thetext>Committed 276337@main (c3a01735d064): &lt;https://commits.webkit.org/276337@main&gt;

Reviewed commits have been landed. Closing PR #26043 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>