Bug 316288 - Using the scroll wheel when Flip Switch is activated via a Screen Edge causes KWin to crash
Summary: Using the scroll wheel when Flip Switch is activated via a Screen Edge causes...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Unclassified
Component: general (show other bugs)
Version: 4.10.1
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL: http://git.reviewboard.kde.org/r/109362/
Keywords:
: 322682 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-07 08:35 UTC by Mike Vaughn
Modified: 2013-07-22 11:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.11
thomas.luebking: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Vaughn 2013-03-07 08:35:01 UTC
Application: kwin (4.10.1)
KDE Platform Version: 4.10.1
Qt Version: 4.8.3
Operating System: Linux 3.5.0-25-generic x86_64
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:

The title says it all. To replicate:
Go to the Screen Edges KCM and set one of the corners to Flip Switch.
Activate Flip Switch via the corner you just set it to.
Scroll.

The crash can be reproduced every time.

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

Thread 2 (Thread 0x7fc53881d700 (LWP 13881)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fc55ad4dcd7 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007fc55ad4dd09 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007fc55276ce9a in start_thread (arg=0x7fc53881d700) at pthread_create.c:308
#4  0x00007fc55e456cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fc55ec397c0 (LWP 13874)):
[KCrash Handler]
#6  KWin::EffectsHandlerImpl::setTabBoxWindow (this=0x2c3ad50, w=0x0) at ../../kwin/effects.cpp:1902
#7  0x00007fc5388b2b00 in selectNextOrPreviousWindow (forward=<optimized out>, this=<optimized out>) at ../../../kwin/effects/flipswitch/flipswitch.cpp:852
#8  KWin::FlipSwitchEffect::selectNextOrPreviousWindow (this=<optimized out>, forward=<optimized out>) at ../../../kwin/effects/flipswitch/flipswitch.cpp:832
#9  0x00007fc55e7f93d1 in KWin::EffectsHandlerImpl::checkInputWindowEvent (this=<optimized out>, e=0x7fff311779e0) at ../../kwin/effects.cpp:1069
#10 0x00007fc55e79575d in KWin::Workspace::workspaceEvent (this=0x2682620, e=0x7fff311779e0) at ../../kwin/events.cpp:252
#11 0x00007fc55e787718 in KWin::Application::x11EventFilter (this=0x7fff31177f40, e=0x7fff311779e0) at ../../kwin/main.cpp:362
#12 0x00007fc558bc17bc in qt_x11EventFilter (ev=0x7fff311779e0) at kernel/qapplication_x11.cpp:441
#13 qt_x11EventFilter (ev=0x7fff311779e0) at kernel/qapplication_x11.cpp:429
#14 0x00007fc558bd17f0 in QApplication::x11ProcessEvent (this=0x7fff31177f40, event=0x7fff311779e0) at kernel/qapplication_x11.cpp:3449
#15 0x00007fc558bfa9d9 in QEventDispatcherX11::processEvents (this=0x2468ad0, flags=...) at kernel/qeventdispatcher_x11.cpp:132
#16 0x00007fc5597ac2ef in QEventLoop::processEvents (this=this@entry=0x7fff31177c50, flags=...) at kernel/qeventloop.cpp:149
#17 0x00007fc5597ac578 in QEventLoop::exec (this=0x7fff31177c50, flags=...) at kernel/qeventloop.cpp:204
#18 0x00007fc5597b1738 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#19 0x00007fc55e789d6a in kdemain (argc=3, argv=0x7fff31178088) at ../../kwin/main.cpp:537
#20 0x00007fc55e38476d in __libc_start_main (main=0x4006a0 <main(int, char**)>, argc=3, ubp_av=0x7fff31178088, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff31178078) at libc-start.c:226
#21 0x00000000004006d1 in _start ()

Reported using DrKonqi
Comment 1 Thomas Lübking 2013-03-07 12:31:19 UTC
Why can flipswitch be activated through the screen edges in the first place?
If at all, it should be possible to activate tabbox #n this way.

Code crashes because there's no tabbox and w/o a tabbox using the wheel (or flipswitch) makes no sense at all.
Comment 2 Martin Flöser 2013-03-07 12:54:35 UTC
(In reply to comment #1)
> Why can flipswitch be activated through the screen edges in the first place?
because I'm an idiot? Thought it's a good idea to have a non-tabbox version of flipswitch which could be activated over screenedge.
> If at all, it should be possible to activate tabbox #n this way.
not a bad idea given that we have the non modal mode nowadays. Still tricky but with a fullscreen input window that could be possible.
Comment 3 Mike Vaughn 2013-03-07 14:14:12 UTC
(In reply to comment #1)
> Why can flipswitch be activated through the screen edges in the first place?
> If at all, it should be possible to activate tabbox #n this way.
> 
> Code crashes because there's no tabbox and w/o a tabbox using the wheel (or
> flipswitch) makes no sense at all.

Well, FWIW, it's possible to cycle through windows in Flip Switch using the scroll wheel when it's invoked via a keyboard shortcut.
Comment 4 Thomas Lübking 2013-03-07 14:19:21 UTC
>(In reply to comment #2)
> because I'm an idiot?
ahh.. i wouldn't go so far. You *were* an idiot ;-P

> Thought it's a good idea to have a non-tabbox version
To do what =)

> but with a fullscreen input window that could be possible.
We could conditionally pre-pass events to the screenedges (this would also fix Michails trouble with his popup using script)
Comment 5 Thomas Lübking 2013-03-07 14:22:22 UTC
(In reply to comment #3)

> Well, FWIW, it's possible to cycle through windows in Flip Switch using the
> scroll wheel when it's invoked via a keyboard shortcut.

"kwin --replace &"
don't do anything else, but invoke flipswitch by shortcut.
try to wheel.
-> same crash.
Comment 6 Mike Vaughn 2013-03-07 14:36:08 UTC
(In reply to comment #5)
> (In reply to comment #3)
> 
> > Well, FWIW, it's possible to cycle through windows in Flip Switch using the
> > scroll wheel when it's invoked via a keyboard shortcut.
> 
> "kwin --replace &"
> don't do anything else, but invoke flipswitch by shortcut.
> try to wheel.
> -> same crash.

Ahh, so it does. Took me a while to see what you meant, as I was using the shortcut bound in the Task Switcher KCM (which didn't lead to the crash), rather than the one set in Flip Switch's actual settings.
Comment 7 Thomas Lübking 2013-03-07 14:42:49 UTC
No, that /is/ the tabbox ;-)
Comment 8 Thomas Lübking 2013-03-07 23:30:32 UTC
(In reply to comment #4)
> We could conditionally pre-pass events to the screenedges (this would also

Yes, works. RR tomorrow. Err... later ;-)
Comment 9 Thomas Lübking 2013-04-16 20:32:43 UTC
Git commit c7a31381c037eb81033462ea4310c0a3e469193a by Thomas Lübking.
Committed on 08/03/2013 at 20:17.
Pushed by luebking into branch 'master'.

general tabbox support for screenedges

REVIEW: 109362
FIXED-IN: 4.11

M  +0    -29   kwin/effects/flipswitch/flipswitch.cpp
M  +0    -4    kwin/effects/flipswitch/flipswitch.h
M  +0    -2    kwin/effects/flipswitch/flipswitch.kcfg
M  +10   -1    kwin/events.cpp
M  +23   -31   kwin/kcmkwin/kwinscreenedges/main.cpp
M  +2    -2    kwin/kcmkwin/kwinscreenedges/main.h
M  +42   -0    kwin/tabbox/tabbox.cpp
M  +3    -0    kwin/tabbox/tabbox.h

http://commits.kde.org/kde-workspace/c7a31381c037eb81033462ea4310c0a3e469193a
Comment 10 Thomas Lübking 2013-07-22 11:55:31 UTC
*** Bug 322682 has been marked as a duplicate of this bug. ***