Bug 434398

Summary: Wallpaper grid delegate positions sometimes get messed up when the grid view view is violently resized or on load
Product: [Frameworks and Libraries] frameworks-kdeclarative Reporter: Filip Fila <filipfila.kde>
Component: generalAssignee: Marco Martin <notmart>
Status: CONFIRMED ---    
Severity: normal CC: justin.zobel, kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: 5.79.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Broken grid
Missing delegats
Video of the bug

Description Filip Fila 2021-03-14 15:21:10 UTC
Created attachment 136668 [details]
Broken grid

SUMMARY
Resizing the wallpaper chooser window can result in grid delegates being wrongly positioned.

STEPS TO REPRODUCE
1. (Have a decent amount of wallpapers)
2. Resize the wallpaper chooser window

OBSERVED RESULT
The grid gets broken, some delegates intersect each other.

EXPECTED RESULT
The grid is not broken.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79
Qt Version: 5.15.2
Comment 1 Filip Fila 2021-03-14 15:23:25 UTC
Created attachment 136669 [details]
Missing delegats

Can also result in delegates missing from the grid
Comment 2 Justin Zobel 2021-03-15 00:32:06 UTC
I've tried to reproduce this issue but I'm unable to. I have 42 wallpapers listed and no amount of resizing makes them vanish or gather together like yours have.

Is this reproducible on your system?
Comment 3 Filip Fila 2021-03-15 08:33:45 UTC
Yes, I can still reproduce it. Do you have wallpapers with long strings whose names get elided?
Comment 4 Nate Graham 2021-03-15 23:04:08 UTC
Cannot reproduce with several hundred wallpapers, at least a few of which have elided titles.

It looks like the font size is different between those two screenshots. Could that be a clue?
Comment 5 Filip Fila 2021-03-16 07:19:43 UTC
Created attachment 136720 [details]
Video of the bug

I don't know but here's a recording of the bug.

(not related to theming either, I checked with stock settings)
Comment 6 Nate Graham 2021-03-17 20:42:56 UTC
Thanks for the video. I just got it to happen by resizing the window violently a lot. :) I can't figure out what action or movement makes it happen, but I can confirm the issue now.

I cannot reproduce it with any System Settings KCMs using grid views when I open them up in KCMshell and try the same violent resizing. Can you?
Comment 7 Filip Fila 2021-03-17 20:58:38 UTC
(In reply to Nate Graham from comment #6)
> Thanks for the video. I just got it to happen by resizing the window
> violently a lot. :) I can't figure out what action or movement makes it
> happen, but I can confirm the issue now.
> 
> I cannot reproduce it with any System Settings KCMs using grid views when I
> open them up in KCMshell and try the same violent resizing. Can you?

Yeah it does take some violence to trigger :)

Can't confirm with KCMs either. And what's really interesting is that I can't reproduce the bug on a different machine with the same software versions, but with Nvidia proprietary drivers. (I'm seeing the bug on an Intel iGPU machine)
Comment 8 Nate Graham 2021-03-17 21:37:16 UTC
iGPU for me too, though I'm not sure that could be related.
Comment 9 Justin Zobel 2021-03-17 21:45:13 UTC
(In reply to Nate Graham from comment #8)
> iGPU for me too, though I'm not sure that could be related.

I think it might be driver related as I'm on NVIDIA proprietary drivers and can't replicate it. They do overlap but only for a few milliseconds until it sorts them properly.
Comment 10 Nate Graham 2021-03-17 21:48:52 UTC
It can't be a driver bug because the items aren't just painted in the wrong place; they're physically (well, virtually) located there too, with their mouse handling offset as well. That suggests that the issue is above the driver layer.
Comment 11 Nate Graham 2021-03-30 15:21:22 UTC
Can confirm in the settings window for the Notes widget, which has a grid view in it.