Bug 260717

Summary: REGRESSION(2.42): [GTK] Particular lines in text input fields are rendered based on previous contents of text box
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Critical CC: bugs-noreply, cgarcia, mcatanzaro, zalan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Screencast demonstrating bug none

Description Michael Catanzaro 2023-08-25 08:59:46 PDT
We have a strange rendering bug that causes lines in text input fields to render incorrectly. The input field sometimes displays outdated contents. For example, I've attached a video that displays a misrendered input field when the contents of one line appear to be duplicated on another line:

Failed to Update
Failed to Update

I click on the broken top line and then press space, and magically the broken line is rendered correctly:

``` 
Failed to Update

i.e. the text on the first line changes from "Failed to Update" to the real text that was actually there, "```", followed by the space that I entered.

I don't know how to reproduce this, unfortunately, so bisecting is not possible.  If we could find a reproducer then we would have a much greater chance of fixing the bug, but I have failed at that. I see this happen quite regularly since at least 2.41.6 but possibly earlier, so the bug was introduced some while back. May or may not be related to dmabuf renderer; I'm not sure.
Comment 1 Michael Catanzaro 2023-08-25 09:00:03 PDT
Created attachment 467433 [details]
Screencast demonstrating bug
Comment 2 Michael Catanzaro 2023-09-08 11:46:46 PDT
CC Alan for awareness because this *might* be a cross-platform issue (not sure).
Comment 3 zalan 2023-09-08 19:34:36 PDT
Thank you. I am not sure what webkit commit range 2.41.6 maps to but I certainly fixed a few partial layout bugs related to editing earlier this summer.
Comment 4 Michael Catanzaro 2023-09-09 06:38:37 PDT
It's still broken in 2.41.91, which is https://github.com/WebKit/WebKit/tree/1f4124f40460c9722865135401bd8092351f7830. This branch is based on 266719@main so we could be missing any fixes after that point.
Comment 5 Michael Catanzaro 2023-10-24 07:46:27 PDT
Still broken in 2.42.1. I see this bug almost every day, but I still have not figured out how to reproduce it.
Comment 6 Michael Catanzaro 2024-01-03 12:33:09 PST
Unfortunately I still have not found a reproducer, so there's nothing I can do to help fix this.

If we could have a do-over, then we should have not released 2.42 at all and just kept doing more 2.40 releases until we figured out what went wrong here. I've never suggested doing that for any bug before now, but this one is bad enough that it would have been worth it. Too late now.
Comment 7 Carlos Garcia Campos 2024-01-08 00:38:17 PST
I understand this is annoying bug, but for some reason it only happens to you, nobody else has reported this problem and I've never seen it myself either. So, unless we find a way to reproduce it, we need you to fix it, we are not going to stop any release for a bug that only happens to one person.
Comment 8 Michael Catanzaro 2024-01-15 17:57:39 PST
Still haven't found a reproducer unfortunately. :( But today I noticed this bug occur in the message preview widget on Discourse, which is ***not a text entry***. So it looks like this is a general graphics bug not limited to text entries. (Although 99% of the time it happens only in text entries. I've never seen it anywhere else before.)

(In reply to Carlos Garcia Campos from comment #7)
> I understand this is annoying bug, but for some reason it only happens to
> you, nobody else has reported this problem and I've never seen it myself
> either. So, unless we find a way to reproduce it, we need you to fix it, we
> are not going to stop any release for a bug that only happens to one person.

Much too late for that anyway.
Comment 9 Michael Catanzaro 2024-03-13 04:22:14 PDT
I suspect we fixed this sometime in the past two months, probably in 2.43.4. Optimistically closing.