Bug 265154 - [GTK] Failed to create GBM buffer of size 0x0: Invalid argument
Summary: [GTK] Failed to create GBM buffer of size 0x0: Invalid argument
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Carlos Garcia Campos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-20 11:55 PST by Michael Catanzaro
Modified: 2024-03-19 02:12 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2023-11-20 11:55:32 PST
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'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("Failed to create GBM buffer of size %dx%d: %s", 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.
Comment 1 Philippe Normand 2024-02-12 06:48:30 PST
This happens here in WPE and GTK when trying to use the remote web-inspector. The newly opened window is empty.
Comment 2 Philippe Normand 2024-02-12 06:48:36 PST
This happens here in WPE and GTK when trying to use the remote web-inspector. The newly opened window is empty.
Comment 3 Michael Catanzaro 2024-03-07 09:08:57 PST
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
Comment 4 Carlos Garcia Campos 2024-03-18 07:01:21 PDT
Pull request: https://github.com/WebKit/WebKit/pull/26043
Comment 5 EWS 2024-03-19 02:12:49 PDT
Committed 276337@main (c3a01735d064): <https://commits.webkit.org/276337@main>

Reviewed commits have been landed. Closing PR #26043 and removing active labels.