https://bugs.kde.org/show_bug.cgi?id=438097

            Bug ID: 438097
           Summary: [AnimationEffect] kwin_wayland sometimes crashes when
                    right clicking in an xwayland program
           Product: kwin
           Version: git master
          Platform: Compiled Sources
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: le...@retsim.com
  Target Milestone: ---

SUMMARY
(I assume) Some kind of internal effects change causes animations to be added
with a null EffectWindow* key in m_animations.

I've also observed crashes in AnimationEffect::paintWindow() - however I don't
have a stack trace or line number for this, as I was using the ArchLinux
5.21.90 packages without debug info.

STEPS TO REPRODUCE
1. Use an xwayland jetbrains IDE for some time
2. Eventually right clicking the source code to bring up the context menu will
crash kwin
3. The crash can take minutes or hours of coding to occur, but it's almost
always triggered for me by right clicking in the jetbrains IDE.

OBSERVED RESULT
She's dead, Jim.

Core was generated by `kwin_wayland --wayland_fd 4 --xwayland
/usr/lib/startplasma-waylandsession'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fa0303c6853 in KWin::AnimationEffect::updateLayerRepaints
(this=this@entry=0x55e9754325f0) at
/home/lewis/Documents/kwin-arch/kwin/src/kwin/src/libkwineffects/kwinanimationeffect.cpp:925sometimes
925                 const QRect geo = entry.key()->expandedGeometry();
[Current thread is 1 (Thread 0x7fa02953b840 (LWP 1747))]
(gdb) bt
#0  0x00007fa0303c6853 in KWin::AnimationEffect::updateLayerRepaints()
(this=this@entry=0x55e9754325f0)
    at
/home/lewis/Documents/kwin-arch/kwin/src/kwin/src/libkwineffects/kwinanimationeffect.cpp:925
#1  0x00007fa0303c74cf in KWin::AnimationEffect::postPaintScreen()
(this=0x55e9754325f0) at
/home/lewis/Documents/kwin-arch/kwin/src/kwin/src/libkwineffects/kwinanimationeffect.cpp:703
#2  0x00007fa0306a8351 in KWin::EffectsHandlerImpl::postPaintScreen()
(this=0x55e974fb35d0) at
/home/lewis/Documents/kwin-arch/kwin/src/kwin/src/effects.cpp:419
#3  0x00007fa03073f0a7 in KWin::Scene::paintScreen(int*, QRegion const&,
QRegion const&, QRegion*, QRegion*, KWin::RenderLoop*, QMatrix4x4 const&)
    (this=this@entry=0x55e9747823c0, mask=mask@entry=0x7ffd2f6b78b4,
damage=..., repaint=..., updateRegion=updateRegion@entry=0x7ffd2f6b78b8,
validRegion=validRegion@entry=0x7ffd2f6b78c0, renderLoop=<optimized out>,
projection=<optimized out>) at
/home/lewis/Documents/kwin-arch/kwin/src/kwin/src/scene.cpp:206
#4  0x00007fa0263f31f1 in KWin::SceneOpenGL::paint(int, QRegion const&,
QList<KWin::Toplevel*> const&, KWin::RenderLoop*) (this=
    0x55e9747823c0, screenId=0, damage=<optimized out>, toplevels=<optimized
out>, renderLoop=<optimized out>)
    at
/home/lewis/Documents/kwin-arch/kwin/src/kwin/src/plugins/scenes/opengl/scene_opengl.cpp:696
#5  0x00007fa03066d388 in KWin::Compositor::composite(KWin::RenderLoop*)
(this=<optimized out>, renderLoop=<optimized out>)
    at /home/lewis/Documents/kwin-arch/kwin/src/kwin/src/composite.cpp:628
#6  0x00007fa02eba83bb in  () at /usr/lib/libQt5Core.so.5
#7  0x00007fa03061cb72 in KWin::RenderLoop::frameRequested(KWin::RenderLoop*)
(this=<optimized out>, _t1=<optimized out>)
    at
/home/lewis/Documents/kwin-arch/kwin/src/build/src/kwin_autogen/EWIEGA46WW/moc_renderloop.cpp:206
#8  0x00007fa03072b703 in KWin::RenderLoopPrivate::dispatch()
(this=0x55e974f66ed0) at
/home/lewis/Documents/kwin-arch/kwin/src/kwin/src/renderloop.cpp:162
#9  0x00007fa02eba83bb in  () at /usr/lib/libQt5Core.so.5
#10 0x00007fa02ebac38b in QTimer::timeout(QTimer::QPrivateSignal) () at
/usr/lib/libQt5Core.so.5
#11 0x00007fa02eb9e07f in QObject::event(QEvent*) () at
/usr/lib/libQt5Core.so.5
#12 0x00007fa02faffd62 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/libQt5Widgets.so.5
#13 0x00007fa02eb7100a in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/libQt5Core.so.5
#14 0x00007fa02ebc8fad in QTimerInfoList::activateTimers() () at
/usr/lib/libQt5Core.so.5
#15 0x00007fa02ebc7489 in
QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib/libQt5Core.so.5
#16 0x000055e972c2d47e in
QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
()
#17 0x00007fa02eb6f97c in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib/libQt5Core.so.5
#18 0x00007fa02eb77ee4 in QCoreApplication::exec() () at
/usr/lib/libQt5Core.so.5
#19 0x000055e972bc73c6 in main(int, char**) (argc=<optimized out>,
argv=<optimized out>) at
/home/lewis/Documents/kwin-arch/kwin/src/kwin/src/main_wayland.cpp:719
(gdb)


EXPECTED RESULT
kwin_wayland doesn't crash.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.21.90
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.12.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 PRO 4650U with Radeon Graphics
Memory: 14.9 GiB of RAM
Graphics Processor: AMD RENOIR

ADDITIONAL INFORMATION
Speculation: I know Vlad has been doing a lot of work for 5.22 in the area of
effects and scene graph changes, I assume a bug has crept in from this work at
some point. 5.21 never had this problem for me.

If I get further traces with different error locations related to
effects/animations, I'll post them with this ticket.

I've built the current master with debug in case the issue from 5.21.90 had
been fixed upstream, but it hasn't (and I needed a backtrack), which is why I'm
reporting this against current master.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to