Bug 487536

Summary: In plasmashell, systemsettings and kinfocenter, minYExtent and maxYExtent are always changing when scrolling.
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: kde-yyds
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: ASSIGNED ---    
Severity: normal CC: nate, notmart
Priority: NOR    
Version First Reported In: 6.2.0   
Target Milestone: Not decided   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: video. scrolling fast in plasmashell kickoff with ctrl pressed
debug output

Description kde-yyds 2024-05-25 15:32:29 UTC
Created attachment 169817 [details]
video. scrolling fast in plasmashell kickoff with ctrl pressed

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY


STEPS TO REPRODUCE
1. open systemsettings(only reproduceable in  plasmashell, systemsettings and kinfocenter
2. scroll very fast(or scroll with CTRL pressed
3. 

OBSERVED RESULT

sometimes it scrolls out of the range
EXPECTED RESULT


SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.8.8-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 6800H with Radeon Graphics
Memory: 14.3 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: TIMI
Product Name: Redmi Book Pro 15 2022
ADDITIONAL INFORMATION
see the video
Comment 1 kde-yyds 2024-06-09 15:39:16 UTC
When originY is not 0, this bug happens.
Comment 2 kde-yyds 2024-06-09 15:43:01 UTC
when scrolling in these apps, originY is always changing. Making it always 0 instead of reading the real property fixes this.
Comment 3 ratijas 2024-06-10 06:21:52 UTC
You mean the readings of originY in the wheelhandler.cpp, right? I can see how it could be problematic, since originY might the result of estimations based on currently visible delegates + section delegates + header + footer sizes.

My old but related MR: https://invent.kde.org/frameworks/kirigami/-/merge_requests/977
Comment 4 kde-yyds 2024-07-11 15:05:32 UTC
Created attachment 171571 [details]
debug output
Comment 5 kde-yyds 2024-07-11 15:06:14 UTC
here's some debug output.
in scrollFlickable()
```
        std::cout << "\nheight=" << height << " ; contentHeight=" << contentHeight << "\ncontentY=" << contentY << " ; topMargin=" << topMargin<< "\nbottomMargin=" << bottomMargin << " ; originY=" << originY << "\nminYExtent=" << topMargin << "-" << originY << "=" << minYExtent<< "\nmaxYExtent=" << height << "-(" << contentHeight << "+" << bottomMargin << "+" << originY << ")=" << maxYExtent << "\n";
```
Comment 6 kde-yyds 2024-07-11 15:07:40 UTC
when scrolling, the scroll bar's length is always changing