Bug 448102 - Crash in KWin::Workspace::clientArea called from QML after monitor changes
Summary: Crash in KWin::Workspace::clientArea called from QML after monitor changes
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.23.4
Platform: openSUSE Linux
: HI crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: drkonqi
: 446124 446282 449957 451439 452850 452873 453214 453438 454039 454099 455559 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-08 10:34 UTC by Jérémy Girard
Modified: 2022-06-21 17:31 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25.1


Attachments
New crash information added by DrKonqi (14.81 KB, text/plain)
2022-05-09 07:33 UTC, verena
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jérémy Girard 2022-01-08 10:34:43 UTC
Application: kwin_x11 (5.23.4)

Qt Version: 5.15.2
Frameworks Version: 5.89.0
Operating System: Linux 5.15.12-1-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.23.4 [KCrashBackend]

-- Information about the crash:
- Unusual behavior I noticed:
I have two screen (1 displayport + 1 hdmi)
After resume computer from sleep, kwin crash.
So, I have no wallpaper and no panel of the left screen (displayport).

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Content of s_kcrashErrorMessage: {_M_t = {<std::__uniq_ptr_impl<char, std::default_delete<char []> >> = {_M_t = {<std::_Tuple_impl<0, char*, std::default_delete<char []> >> = {<std::_Tuple_impl<1, std::default_delete<char []> >> = {<std::_Head_base<1, std::default_delete<char []>, true>> = {_M_head_impl = {<No data fields>}}, <No data fields>}, <std::_Head_base<0, char*, false>> = {_M_head_impl = <optimized out>}, <No data fields>}, <No data fields>}}, <No data fields>}}
[KCrash Handler]
#6  0x00007f853d3df953 in KWin::Workspace::clientArea(KWin::clientAreaOption, KWin::AbstractOutput const*, KWin::VirtualDesktop const*) const (this=0x55921134c330, opt=KWin::PlacementArea, output=<optimized out>, desktop=<optimized out>) at /usr/src/debug/kwin5-5.23.4-1.3.x86_64/src/workspace.cpp:2298
#7  0x00007f853d2991a5 in KWin::WorkspaceWrapper::clientArea(KWin::WorkspaceWrapper::ClientAreaOption, int, int) const (this=0x559211494ef0, desktop=<optimized out>, screen=<optimized out>, option=<optimized out>) at /usr/src/debug/kwin5-5.23.4-1.3.x86_64/src/scripting/workspace_wrapper.cpp:270
#8  KWin::WorkspaceWrapper::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x559211494ef0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=85, _a=_a@entry=0x7ffecbd2d8d0) at /usr/src/debug/kwin5-5.23.4-1.3.x86_64/build/src/kwin_autogen/7KDSW62DQT/moc_workspace_wrapper.cpp:649
#9  0x00007f853d29a92b in KWin::WorkspaceWrapper::qt_metacall(QMetaObject::Call, int, void**) (this=this@entry=0x559211494ef0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=85, _a=_a@entry=0x7ffecbd2d8d0) at /usr/src/debug/kwin5-5.23.4-1.3.x86_64/build/src/kwin_autogen/7KDSW62DQT/moc_workspace_wrapper.cpp:919
#10 0x00007f853d29a951 in KWin::DeclarativeScriptWorkspaceWrapper::qt_metacall(QMetaObject::Call, int, void**) (this=0x559211494ef0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7ffecbd2d8d0) at /usr/src/debug/kwin5-5.23.4-1.3.x86_64/build/src/kwin_autogen/7KDSW62DQT/moc_workspace_wrapper.cpp:1300
#11 0x00007f853a7ceead in QQmlObjectOrGadget::metacall(QMetaObject::Call, int, void**) const (this=this@entry=0x7ffecbd2db60, type=type@entry=QMetaObject::InvokeMetaMethod, index=<optimized out>, index@entry=90, argv=<optimized out>) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-1.3.x86_64/src/qml/qml/qqmlobjectorgadget.cpp:51
#12 0x00007f853a6ae000 in CallMethod (callType=<optimized out>, callArgs=0x2, engine=<optimized out>, argTypes=<optimized out>, argCount=<optimized out>, returnType=<optimized out>, index=<optimized out>, object=...) at /usr/include/qt5/QtCore/qvarlengtharray.h:190
#13 CallPrecise(QQmlObjectOrGadget const&, QQmlPropertyData const&, QV4::ExecutionEngine*, QV4::CallData*, QMetaObject::Call) (object=..., data=<optimized out>, engine=engine@entry=0x559211490220, callArgs=callArgs@entry=0x7f85183baa20, callType=callType@entry=QMetaObject::InvokeMetaMethod) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-1.3.x86_64/src/qml/jsruntime/qv4qobjectwrapper.cpp:1569
#14 0x00007f853a6afdeb in CallOverloaded (callType=<optimized out>, propertyCache=<optimized out>, callArgs=<optimized out>, engine=<optimized out>, data=<optimized out>, object=<optimized out>) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-1.3.x86_64/src/qml/jsruntime/qv4qobjectwrapper.cpp:1645
#15 QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const (this=<optimized out>, thisObject=<optimized out>, argv=<optimized out>, argc=<optimized out>) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-1.3.x86_64/src/qml/jsruntime/qv4qobjectwrapper.cpp:2133
#16 0x00007f853a6de27a in QV4::FunctionObject::call(QV4::Value const*, QV4::Value const*, int) const (argc=3, argv=0x7f85183ba9d8, thisObject=0x7f85183ba9c0, this=0x7ffecbd2dc98) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-1.3.x86_64/src/qml/jsruntime/qv4functionobject_p.h:202
#17 QV4::Runtime::CallPropertyLookup::call(QV4::ExecutionEngine*, QV4::Value const&, unsigned int, QV4::Value*, int) (engine=0x559211490220, base=..., index=<optimized out>, argv=0x7f85183ba9d8, argc=3) at /usr/src/debug/libqt5-qtdeclarative-5.15.2+kde36-1.3.x86_64/src/qml/jsruntime/qv4runtime.cpp:1460
#18 0x00007f85200038b1 in  ()
#19 0x0000000000000000 in  ()
[Inferior 1 (process 32257) detached]

Possible duplicates by query: bug 444927, bug 443166, bug 441577, bug 414317, bug 409838.

Reported using DrKonqi
Comment 1 David Edmundson 2022-01-11 14:43:00 UTC
*** Bug 446124 has been marked as a duplicate of this bug. ***
Comment 2 David Edmundson 2022-01-11 14:49:16 UTC
*** Bug 446282 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2022-03-25 23:01:02 UTC
*** Bug 451439 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2022-04-22 15:35:28 UTC
*** Bug 452850 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2022-04-22 19:14:15 UTC
*** Bug 452873 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2022-05-03 14:41:08 UTC
*** Bug 453214 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2022-05-06 15:06:22 UTC
*** Bug 453438 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2022-05-06 15:07:36 UTC
Raising priority due to number of duplicate reports.
Comment 9 verena 2022-05-09 07:33:46 UTC
Created attachment 148668 [details]
New crash information added by DrKonqi

kwin_x11 (5.24.4) using Qt 5.15.3

- What I was doing when the application crashed:
go away from computer, logged out automatically and monitor went to sleep

-- Backtrace (Reduced):
#4  0x00007ff370c523a6 in KWin::Workspace::clientArea (this=0x55612f253650, opt=KWin::PlacementArea, output=<optimized out>, desktop=<optimized out>) at ./src/workspace.cpp:2288
#5  0x00007ff370c5268e in KWin::Workspace::clientArea (this=<optimized out>, opt=<optimized out>, screen=<optimized out>, desktop=<optimized out>) at ./src/workspace.cpp:2344
#6  0x00007ff370c014a3 in KWin::WorkspaceWrapper::clientArea (this=<optimized out>, option=<optimized out>, screen=<optimized out>, desktop=<optimized out>) at ./src/workspace.h:68
#7  0x00007ff370ad1d01 in KWin::WorkspaceWrapper::qt_static_metacall (_o=_o@entry=0x55612f34b4b0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=91, _a=_a@entry=0x7ffd12e7d1b0) at ./obj-x86_64-linux-gnu/src/kwin_autogen/7KDSW62DQT/moc_workspace_wrapper.cpp:676
#8  0x00007ff370ae0a63 in KWin::WorkspaceWrapper::qt_metacall (this=this@entry=0x55612f34b4b0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=91, _a=_a@entry=0x7ffd12e7d1b0) at ./obj-x86_64-linux-gnu/src/kwin_autogen/7KDSW62DQT/moc_workspace_wrapper.cpp:946
Comment 10 Nate Graham 2022-05-19 17:00:27 UTC
*** Bug 454039 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2022-05-23 16:28:02 UTC
*** Bug 454099 has been marked as a duplicate of this bug. ***
Comment 12 phrxmd 2022-06-14 16:27:37 UTC
It seems that https://invent.kde.org/plasma/kwin/-/merge_requests/2517/ has fixed this (see bug 449957).
Comment 13 Nate Graham 2022-06-14 16:30:08 UTC
Git commit 5afa5c64409f22ab9e65485780dbb05f9ca47229 by Vlad Zahorodnii.
Committed on 14/06/2022 at 11:45.
Pushed by vladz into branch 'Plasma/5.25'.

scripting: Handle bad output and desktop ids gracefully

Don't crash if a script has provided bad screen or desktop id to
clientArea().


(cherry picked from commit ac97e282fca0dbe00b85f8af5ca6d7c083acaab1)

M  +24   -14   src/scripting/workspace_wrapper.cpp

https://invent.kde.org/plasma/kwin/commit/5afa5c64409f22ab9e65485780dbb05f9ca47229
Comment 14 Nate Graham 2022-06-14 16:30:16 UTC
*** Bug 449957 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2022-06-21 17:31:07 UTC
*** Bug 455559 has been marked as a duplicate of this bug. ***