Bug 454064 - Plasma crashes when I set display scale to 125% on Wayland
Summary: Plasma crashes when I set display scale to 125% on Wayland
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Unclassified
Component: generic-crash (show other bugs)
Version: 5.25.0
Platform: Archlinux Packages Linux
: VHI crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 456385 457107 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-20 00:36 UTC by Patrick Silva
Modified: 2022-08-01 14:48 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments
backtrace (66.30 KB, text/plain)
2022-05-20 00:36 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-05-20 00:36:42 UTC
Created attachment 149009 [details]
backtrace

STEPS TO REPRODUCE
1. use Wayland
2. change display scale from 100% to 125% in Display Configuration KCM
3. 

OBSERVED RESULT
plasma crash, long backtrace attached

EXPECTED RESULT
no crash

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.90
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Graphics Platform: Wayland
Comment 1 Nicolas Fella 2022-05-20 21:47:23 UTC
Please paste backtraces inline for better searchability

Thread 1 (Thread 0x7fa996e8e5c0 (LWP 22102)):
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007fa99b7723d3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007fa99b722838 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
#3  0x00007fa99da8f840 in KCrash::defaultCrashHandler(int) (sig=6) at /usr/src/debug/kcrash-5.94.0/src/kcrash.cpp:633
#4  0x00007fa99b7228e0 in <signal handler called> () at /usr/lib/libc.so.6
#5  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#6  0x00007fa99b7723d3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#7  0x00007fa99b722838 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#8  0x00007fa99b70c535 in __GI_abort () at abort.c:79
#9  0x00007fa99b9c3002 in std::__glibcxx_assert_fail(char const*, int, char const*, char const*) (file=file@entry=0x555c0abc48b8 "/usr/include/c++/12.1.0/bits/stl_algo.h", line=line@entry=3623, function=function@entry=0x555c0abc4860 "constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&) [with _Tp = int]", condition=condition@entry=0x555c0abc4653 "!(__hi < __lo)") at /usr/src/debug/gcc/libstdc++-v3/src/c++11/debug.cc:60
#10 0x0000555c0ab7e8a0 in std::clamp<int>(int const&, int const&, int const&) (__val=<optimized out>, __lo=<optimized out>, __hi=<optimized out>) at /usr/include/c++/12.1.0/bits/stl_algo.h:3621
#11 std::clamp<int>(int const&, int const&, int const&) (__hi=<synthetic pointer>: <optimized out>, __lo=<synthetic pointer>: <optimized out>, __val=@0x555c0d0e0bd4: 2261) at /usr/include/c++/12.1.0/bits/stl_algo.h:3621
#12 PanelView::resizePanel() (this=this@entry=0x555c0d0e0b90) at /usr/src/debug/plasma-workspace-5.24.90/shell/panelview.cpp:620
#13 0x0000555c0ab7fac5 in PanelView::setThickness(int) (this=this@entry=0x555c0d0e0b90, value=<optimized out>) at /usr/src/debug/plasma-workspace-5.24.90/shell/panelview.cpp:260
#14 0x0000555c0ab8417c in PanelView::restore() (this=0x555c0d0e0b90) at /usr/src/debug/plasma-workspace-5.24.90/shell/panelview.cpp:661
#15 0x00007fa99bde6791 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffd3a8c01c0, r=<optimized out>, this=0x555c0db69b90, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#16 doActivate<false>(QObject*, int, void**) (sender=0x555c0c6cd180, signal_index=3, argv=0x7ffd3a8c01c0) at kernel/qobject.cpp:3886
#17 0x00007fa99c55fdf7 in QScreen::geometryChanged(QRect const&) (this=<optimized out>, _t1=<optimized out>) at .moc/moc_qscreen.cpp:372
#18 0x00007fa99c1b61ed in QScreenPrivate::emitGeometryChangeSignals(bool, bool) (this=0x555c0c6cfde0, geometryChanged=<optimized out>, availableGeometryChanged=<optimized out>) at kernel/qscreen.cpp:92
#19 0x00007fa99c194787 in QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent*) (e=<optimized out>) at kernel/qguiapplication.cpp:3176
#20 QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent*) (e=<optimized out>) at kernel/qguiapplication.cpp:3155
#21 0x00007fa99c173945 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#22 0x00007fa999a66fa5 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /usr/lib/libQt5WaylandClient.so.5
#23 0x00007fa99a184163 in g_main_dispatch (context=0x555c0c6d1a30) at ../glib/glib/gmain.c:3417
#24 g_main_context_dispatch (context=0x555c0c6d1a30) at ../glib/glib/gmain.c:4135
#25 0x00007fa99a1da9e9 in g_main_context_iterate.constprop.0 (context=context@entry=0x555c0c6d1a30, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4211
#26 0x00007fa99a1816c5 in g_main_context_iteration (context=0x555c0c6d1a30, may_block=1) at ../glib/glib/gmain.c:4276
#27 0x00007fa99be007bc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x555c0c6d1d80, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#28 0x00007fa99bdae79c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffd3a8c0520, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#29 0x00007fa99bdb92a9 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#30 0x00007fa99c184fd2 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1867
#31 0x00007fa99ca05e8a in QApplication::exec() () at kernel/qapplication.cpp:2829
#32 0x0000555c0ab670e5 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace-5.24.90/shell/main.cpp:240
Comment 2 Nicolas Fella 2022-05-20 21:50:37 UTC
Niccolò, you touched that code last, can you look at this?
Comment 3 David Edmundson 2022-05-21 12:07:50 UTC
Abort is in:

        targetSize = QSize(std::clamp(m_contentLength, minSize, maxSize), totalThickness());


presumably there's some assert in std::clamp that min < max that's not always true with our code
Comment 4 Bug Janitor Service 2022-05-21 12:16:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1756
Comment 5 Bug Janitor Service 2022-07-29 07:17:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1980
Comment 6 David Edmundson 2022-07-29 12:35:12 UTC
Git commit 449ae169d823c24601625cc9c2f3e4e838da7fe3 by David Edmundson.
Committed on 29/07/2022 at 12:35.
Pushed by davidedmundson into branch 'master'.

[panelview] Avoid assert if max < min

Max and min are calculated from two completely different sources.

There's scope for them to not be the expected way round.

We have an assert reported on this line due to a subtle qBound ->
std::clamp porting difference on GCC with debug flags on.

M  +4    -2    shell/panelview.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/449ae169d823c24601625cc9c2f3e4e838da7fe3
Comment 7 David Edmundson 2022-07-29 15:08:29 UTC
*** Bug 456385 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2022-07-29 15:11:44 UTC
*** Bug 457107 has been marked as a duplicate of this bug. ***