Bug 222813 - kwin crash on opening context menu with mouse right click
Summary: kwin crash on opening context menu with mouse right click
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 235870 237045 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-15 08:34 UTC by Alexander Elbs
Modified: 2010-10-15 17:38 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6


Attachments
New crash information added by DrKonqi (5.33 KB, text/plain)
2010-03-01 09:21 UTC, Alexander Elbs
Details
New crash information added by DrKonqi (3.84 KB, text/plain)
2010-07-13 17:48 UTC, Frank Niethardt
Details
New crash information added by DrKonqi (2.62 KB, text/plain)
2010-10-09 00:50 UTC, publius
Details
New crash information added by DrKonqi (4.48 KB, text/plain)
2010-10-15 16:45 UTC, Kai Krakow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Elbs 2010-01-15 08:34:00 UTC
Application: kwin (4.3.90 (KDE 4.3.90 (KDE 4.4 RC1)))
KDE Platform Version: 4.3.90 (KDE 4.3.90 (KDE 4.4 RC1))
Qt Version: 4.6.0
Operating System: Linux 2.6.32-10-generic x86_64
Distribution: Ubuntu lucid (development branch)

-- Information about the crash:
Hi,

I was running chromium-browser, which hides the kde window decoration.
I enabled the kde decoration with a custom hot key (now I have kde decoration and chromium decoration)
Then I right click on the kde window decoration to get the kwin context menu.
*crash*

When I press ALT-F3 (with or without enabling the kde decoration first) I get the context menu without a crash.


The crash can be reproduced every time.

 -- Backtrace:
Application: KWin (kwin), signal: Segmentation fault
The current source language is "auto; currently asm".
[KCrash Handler]
#5  QList<KWin::Client*>::detach (this=0x0, index=0, pos=...) at /usr/include/qt4/QtCore/qlist.h:122
#6  QList<KWin::Client*>::operator[] (this=0x0, index=0, pos=...) at /usr/include/qt4/QtCore/qlist.h:448
#7  KWin::ClientGroup::displayClientMenu (this=0x0, index=0, pos=...) at ../../kwin/clientgroup.cpp:214
#8  0x00007fda0f88ee98 in Oxygen::OxygenClient::mouseReleaseEvent (this=0x15d4e60, event=0x7fffd394a390) at ../../../../kwin/clients/oxygen/oxygenclient.cpp:1478
#9  0x00007fda0f88f0af in Oxygen::OxygenClient::eventFilter (this=0x15d4e60, object=0x17933d0, event=0x7fffd394a390) at ../../../../kwin/clients/oxygen/oxygenclient.cpp:1251
#10 0x00007fda1c7ebed7 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x17933d0, event=0x7fffd394a390) at kernel/qcoreapplication.cpp:819
#11 0x00007fda1cf36efc in QApplicationPrivate::notify_helper (this=0x15097b0, receiver=0x17933d0, e=0x7fffd394a390) at kernel/qapplication.cpp:4238
#12 0x00007fda1cf3dda1 in QApplication::notify (this=0x7fffd394b0a0, receiver=0x17933d0, e=0x7fffd394a390) at kernel/qapplication.cpp:3822
#13 0x00007fda203e47c6 in KApplication::notify (this=0x7fffd394b0a0, receiver=0x17933d0, event=0x7fffd394a390) at ../../kdeui/kernel/kapplication.cpp:302
#14 0x00007fda1c7ecabc in QCoreApplication::notifyInternal (this=0x7fffd394b0a0, receiver=0x17933d0, event=0x7fffd394a390) at kernel/qcoreapplication.cpp:704
#15 0x00007fda1cf3cf0e in QCoreApplication::sendEvent (receiver=0x17933d0, event=0x7fffd394a390, alienWidget=0x0, nativeWidget=0x17933d0, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#16 QApplicationPrivate::sendMouseEvent (receiver=0x17933d0, event=0x7fffd394a390, alienWidget=0x0, nativeWidget=0x17933d0, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, 
    spontaneous=true) at kernel/qapplication.cpp:2956
#17 0x00007fda1cfbb055 in QETWidget::translateMouseEvent (this=0x17933d0, event=<value optimized out>) at kernel/qapplication_x11.cpp:4368
#18 0x00007fda1cfb9d6a in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffd394acb0) at kernel/qapplication_x11.cpp:3501
#19 0x00007fda1cfe57f2 in x11EventSourceDispatch (s=0x150d690, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#20 0x00007fda15ca2d4e in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#21 0x00007fda15ca6718 in ?? () from /lib/libglib-2.0.so.0
#22 0x00007fda15ca6840 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#23 0x00007fda1c816053 in QEventDispatcherGlib::processEvents (this=0x14efa50, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407
#24 0x00007fda1cfe53de in QGuiEventDispatcherGlib::processEvents (this=0x0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#25 0x00007fda1c7eb3e2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#26 0x00007fda1c7eb7bc in QEventLoop::exec (this=0x7fffd394afe0, flags=) at kernel/qeventloop.cpp:201
#27 0x00007fda1c7ef4fb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#28 0x00007fda20bc684e in kdemain (argc=<value optimized out>, argv=<value optimized out>) at ../../kwin/main.cpp:526
#29 0x00007fda20817c4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, 
    rtld_fini=<value optimized out>, stack_end=0x7fffd394b5a8) at libc-start.c:226
#30 0x0000000000400679 in _start ()

Reported using DrKonqi
Comment 1 Martin Flöser 2010-02-28 11:43:09 UTC
Is this still an issue in KDE SC 4.4.0? I don't have Chromium, so I cannot reproduce
Comment 2 Alexander Elbs 2010-03-01 09:21:51 UTC
Created attachment 41226 [details]
New crash information added by DrKonqi

Yes, this crash is still reproducible.
Comment 3 Thomas Lübking 2010-03-01 15:52:35 UTC
Works for me (chromium 5.0)

> I enabled the kde decoration with a custom hot key
sounds interesting. what if you
- disable system/enable chromium deco
- press alt+f3 to reactivate the deco
- rmb the titlebar?
(this is what i tried and it works, oxygen+tabbing enabled as well as tabstrip)
Comment 4 Alexander Elbs 2010-03-02 10:01:20 UTC
The chromium deco cannot be enabled/disabled. Chromium uses tabs for browsing, these are on top. The close/minimize/maximize buttons are also on top.

Pressing alt-f3 (with or without kde deco) works fine. So far it only crashes if
 - kde deco is enabled
 - right click on kde deco is done.

(When I try to group chromium with another window (this new tabbing feature of kde 4.4), kwin also crashes. But I reported that in #22816.)
Comment 5 Alexander Elbs 2010-03-02 10:03:09 UTC
Sorry, bug 222816
Comment 6 Thomas Lübking 2010-03-02 17:10:27 UTC
if i rightclck chromes tab/titlebar i get a checkable item to disable the system titlebar

what interests me is that you _somehow_ enabled chromes titlebar feature (i don't care how you call it: you've got close buttons etc.) AND kwin's titlebar, by _some_ "custom" hotkey and i wanted to know what happens if you don't do it _somehow_ but by disabling the kwin titlebar from chromes popup and reeanble it from the alt+f3 menu. can you then rmb click the bar?

regarding #222816:
if you take chrome out of the kwin context, you won't be able to tab it for sure. period.
however, _after_ this attempt things crash for me as well, conclusion:
don't use conflicting titlebars, i.e. pick the chrome one (and loose tabbing) or the kwin one. not both.
Comment 7 Alexander Elbs 2010-03-03 09:39:38 UTC
Now I got it.

Kwin still crashes no matter if chromium deco is enabled or disabled on a right click on kde deco.

However: If I have used grouping at least once (initially only possible without chromium deco) then right click works fine in all cases.
See my comments on bug 222816
Comment 8 Martin Flöser 2010-05-01 08:53:53 UTC
*** Bug 235870 has been marked as a duplicate of this bug. ***
Comment 9 Martin Flöser 2010-05-23 16:40:42 UTC
*** Bug 237045 has been marked as a duplicate of this bug. ***
Comment 10 Frank Niethardt 2010-07-13 17:48:52 UTC
Created attachment 49116 [details]
New crash information added by DrKonqi

I right clicked on an radmin (wine) window's title bar and kwin crashed. Archlinux x86_64, KDEmod 4.4.5
Comment 11 publius 2010-10-09 00:50:57 UTC
Created attachment 52358 [details]
New crash information added by DrKonqi

kwin (4.5.2 (KDE 4.5.2)) on KDE Platform 4.5.2 (KDE 4.5.2) using Qt 4.7.0

- What I was doing when the application crashed:

I simply right-clicked on the titlebar of a gnome-terminal window. 

- Unusual behavior I noticed:

Windows flicker a lot after latest update, especially if they have the shadow effect enabled or the window border disabled.

- Custom settings of the application:

I'm using Compiz as window decorator.

-- Backtrace (Reduced):
#9  0xb6df2425 in KDecorationUnstable::displayClientMenu(int, QPoint const&) () from /usr/lib/libkdecorations.so.4
#10 0xb6dfb013 in KCommonDecorationUnstable::displayClientMenu(int, QPoint const&) () from /usr/lib/libkdecorations.so.4
[...]
[...]
#13 0xb67f283a in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#14 0xb5d33560 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#15 0xb5d38a89 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
Comment 12 Thomas Lübking 2010-10-09 01:46:13 UTC
 @publius:
- your backtrace is un- or at best weak related (and the bug likely fixed, the trace isn't complete enough to say for sure)
- this very bug is about a conflict between kwin and chromiums efforts to play WM
- how do you crash kwin if you're using compiz? they're two different WM's (in doubt: compositing is not related to this bug, it's the windowtabbing)
- flicker would be another issue, you'll have to open an extra bug and provide a detailed explanation about the circumstances and the visuals of the "flicker"
Comment 13 Kai Krakow 2010-10-15 16:45:54 UTC
Created attachment 52539 [details]
New crash information added by DrKonqi

I used Alt+F3 to enable window decorations on chromium, then I switched chromium into native boarders mode. Next I tried to right click on the chromium title bar and kwin crashed.
Comment 14 Thomas Lübking 2010-10-15 17:38:35 UTC
just had a look at the traces - they all fail because of the unsecured clientGroup accesses in bridge.cpp, which should be fixed by the broadsword solution now (trunk)