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

            Bug ID: 406452
           Summary: Crash when current virtual desktop is removed using a
                    kwin script
           Product: kwin
           Version: 5.12.7
          Platform: Ubuntu Packages
                OS: Linux
            Status: REPORTED
          Keywords: drkonqi
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: kwin-bugs-n...@kde.org
          Reporter: ar...@aritzcracker.ca
  Target Milestone: ---

Application: kwin_x11 (5.12.7)

Qt Version: 5.9.5
Frameworks Version: 5.44.0
Operating System: Linux 4.18.0-17-generic x86_64
Distribution: Ubuntu 18.04.2 LTS

-- Information about the crash:
Created custom shortcut:
- Name: Close current Desktop
- Trigger: Meta+Ctrl+F4
- Action: /opt/themestuff/kwinscript
/opt/themestuff/kwinscripts/removeDesktop.kwinscript

themestuff is a folder I created containing verious customizations

Contents of /opt/themestuff/kwinscript:
#!/bin/bash
script=$1;
echo $1;
num=$(qdbus org.kde.KWin \
    /Scripting \
    loadScript \
    $script);
echo $num;
qdbus org.kde.KWin \
    /Scripting \
    start;
#eof

Contents of /opt/themestuff/kwinscripts/removeDesktop.kwinscript:

if (workspace.desktops > 1){
    var desktopToRemove = workspace.currentDesktop;
    workspace.currentDesktop -= 1;
    if (desktopToRemove == 1){
        desktopToRemove = workspace.desktops;
    }

    var clients = workspace.clientList();
    for (var i=0; i<clients.length; i += 1) {
        if(clients[i].desktop >= desktopToRemove){
            clients[i].desktop -= 1;
        }
    }
    workspace.desktops -= 1;
}
//eof

If it is relevent, the cube rotation animation is enabled

The crash can be reproduced every time.

-- Backtrace:
Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f1859374cc0 (LWP 24554))]

Thread 5 (Thread 0x7f18162d1700 (LWP 24567)):
#0  0x00007f1851d3a9f3 in futex_wait_cancelable (private=<optimized out>,
expected=0, futex_word=0x7f18552d1fb8) at
../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  0x00007f1851d3a9f3 in __pthread_cond_wait_common (abstime=0x0,
mutex=0x7f18552d1f68, cond=0x7f18552d1f90) at pthread_cond_wait.c:502
#2  0x00007f1851d3a9f3 in __pthread_cond_wait (cond=0x7f18552d1f90,
mutex=0x7f18552d1f68) at pthread_cond_wait.c:655
#3  0x00007f1854fdb5f4 in  () at /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#4  0x00007f1854fdb639 in  () at /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#5  0x00007f1851d346db in start_thread (arg=0x7f18162d1700) at
pthread_create.c:463
#6  0x00007f1858cdb88f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f183598c700 (LWP 24563)):
#0  0x00007f1858ccecf6 in __GI_ppoll (fds=0x7f1824000d28, nfds=1,
timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f18560d0671 in qt_safe_poll(pollfd*, unsigned long, timespec const*)
() at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f18560d1d8e in
QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f1856079a1a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f1855e9823a in QThread::exec() () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f18508206f5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#6  0x00007f1855e9d17d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f1851d346db in start_thread (arg=0x7f183598c700) at
pthread_create.c:463
#8  0x00007f1858cdb88f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f183d392700 (LWP 24558)):
#0  0x00007f1858ccecf6 in __GI_ppoll (fds=0x7f183000e828, nfds=1,
timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f18560d0671 in qt_safe_poll(pollfd*, unsigned long, timespec const*)
() at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f18560d1d8e in
QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f1856079a1a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f1855e9823a in QThread::exec() () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f184f6f9d45 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#6  0x00007f1855e9d17d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f1851d346db in start_thread (arg=0x7f183d392700) at
pthread_create.c:463
#8  0x00007f1858cdb88f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f183f9ed700 (LWP 24556)):
#0  0x00007f1858ccebf9 in __GI___poll (fds=0x7f183f9ecc68, nfds=1, timeout=-1)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f1857bd8747 in  () at /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f1857bda36a in xcb_wait_for_event () at
/usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f18408cc2a9 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f1855e9d17d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f1851d346db in start_thread (arg=0x7f183f9ed700) at
pthread_create.c:463
#6  0x00007f1858cdb88f in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f1859374cc0 (LWP 24554)):
[KCrash Handler]
#6  0x00007f18587ffc92 in KWin::Workspace::clientArea(KWin::clientAreaOption,
int, int) const () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#7  0x00007f1855569f55 in  () at
/usr/lib/x86_64-linux-gnu/libkwin4_effect_builtins.so.1
#8  0x00007f185883d681 in
KWin::EffectsHandlerImpl::prePaintWindow(KWin::EffectWindow*,
KWin::WindowPrePaintData&, int) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#9  0x00007f185883d681 in
KWin::EffectsHandlerImpl::prePaintWindow(KWin::EffectWindow*,
KWin::WindowPrePaintData&, int) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#10 0x00007f185882c4c0 in KWin::Scene::paintGenericScreen(int,
KWin::ScreenPaintData) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#11 0x00007f1834381462 in  () at
/usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#12 0x00007f185882f1b0 in KWin::Scene::finalPaintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#13 0x00007f185883d4d5 in KWin::EffectsHandlerImpl::paintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#14 0x00007f1855844401 in KWin::Effect::paintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwineffects.so.11
#15 0x00007f185883d47d in KWin::EffectsHandlerImpl::paintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#16 0x00007f1855844401 in KWin::Effect::paintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwineffects.so.11
#17 0x00007f185883d47d in KWin::EffectsHandlerImpl::paintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#18 0x00007f185556ad05 in  () at
/usr/lib/x86_64-linux-gnu/libkwin4_effect_builtins.so.1
#19 0x00007f185556b0be in  () at
/usr/lib/x86_64-linux-gnu/libkwin4_effect_builtins.so.1
#20 0x00007f185883d47d in KWin::EffectsHandlerImpl::paintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#21 0x00007f1855844401 in KWin::Effect::paintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwineffects.so.11
#22 0x00007f185883d47d in KWin::EffectsHandlerImpl::paintScreen(int, QRegion,
KWin::ScreenPaintData&) () at /usr/lib/x86_64-linux-gnu/libkwin.so.5
#23 0x00007f185882ee5e in KWin::Scene::paintScreen(int*, QRegion const&,
QRegion const&, QRegion*, QRegion*, QMatrix4x4 const&, QRect const&) () at
/usr/lib/x86_64-linux-gnu/libkwin.so.5
#24 0x00007f183437b541 in KWin::SceneOpenGL::paint(QRegion,
QList<KWin::Toplevel*>) () at
/usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kwin.scenes/KWinSceneOpenGL.so
#25 0x00007f18588213e2 in KWin::Compositor::performCompositing() () at
/usr/lib/x86_64-linux-gnu/libkwin.so.5
#26 0x00007f18560ab18b in QObject::event(QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007f1856df983c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f1856e01104 in QApplication::notify(QObject*, QEvent*) () at
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f185607b9e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007f18560d3e3e in QTimerInfoList::activateTimers() () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007f18560d1ff2 in
QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f184092f5cd in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#33 0x00007f1856079a1a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007f1856082ac4 in QCoreApplication::exec() () at
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007f1858fb3dbb in kdemain () at
/usr/lib/x86_64-linux-gnu/libkdeinit5_kwin_x11.so
#36 0x00007f1858bdbb97 in __libc_start_main (main=0x55b5e5e6d730, argc=3,
argv=0x7fffa6727718, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffa6727708) at ../csu/libc-start.c:310
#37 0x000055b5e5e6d76a in _start ()

Reported using DrKonqi

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

Reply via email to