Bug 181325 - kwin with compositing randomly crashes when focusing windows
Summary: kwin with compositing randomly crashes when focusing windows
Status: RESOLVED DUPLICATE of bug 177006
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-19 18:33 UTC by Ionut Ciocirlan
Modified: 2009-02-12 20:35 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Defers notifications for QDesktopWidget fallback (2.61 KB, patch)
2009-01-22 20:58 UTC, Guillaume Pothier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ionut Ciocirlan 2009-01-19 18:33:56 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Not particularly reproducible, but it seems to happen when focusing a window that has itself an editable text widget focused, or when focusing the window by clicking on the widget, e.g.:
- an input box, a textarea or the search box in firefox;
- the input box in konversation;
- opening a text file with kate (i just ran "kate kwin.kcrash" from the command line and kwin crashed..).

It never happens with compositing disabled.

Application: KWin (kwin), signal SIGABRT
0x00000033aac9dfc0 in __nanosleep_nocancel () from /lib/libc.so.6

Thread 1 (Thread 0x7f2075f2b730 (LWP 13456)):
[KCrash Handler]
#5  0x00000033aac31ed5 in raise () from /lib/libc.so.6
#6  0x00000033aac333f3 in abort () from /lib/libc.so.6
#7  0x00000033b16645a5 in qt_message_output (msgType=<value optimized out>, buf=<value optimized out>) at global/qglobal.cpp:2102
#8  0x00000033b16646e7 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2303
#9  0x00000033b2a6cfa1 in KWin::Workspace::clientArea (this=<value optimized out>, opt=<value optimized out>, screen=<value optimized out>, desktop=<value optimized out>)
    at /usr/include/qt4/QtCore/qvector.h:321
#10 0x00000033b2a6d1a2 in KWin::Workspace::clientArea (this=<value optimized out>, opt=<value optimized out>, p=<value optimized out>, desktop=<value optimized out>) at ../../kwin/geometry.cpp:283
#11 0x00000033b2a81720 in KWin::Unmanaged::shouldUnredirect (this=<value optimized out>) at ../../kwin/composite.cpp:914
#12 0x00000033b2a85a9f in KWin::Toplevel::updateUnredirectedState (this=<value optimized out>) at ../../kwin/composite.cpp:836
#13 0x00000033b2a86058 in KWin::Workspace::delayedCheckUnredirect (this=<value optimized out>) at ../../kwin/composite.cpp:604
#14 0x00000033b2a2762a in KWin::Workspace::qt_metacall (this=<value optimized out>, _c=<value optimized out>, _id=<value optimized out>, _a=<value optimized out>) at ./workspace.moc:447
#15 0x00000033b17686d4 in QMetaObject::activate (sender=<value optimized out>, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=<value optimized out>)
    at kernel/qobject.cpp:3031
#16 0x00000033b1762fe3 in QObject::event (this=<value optimized out>, e=<value optimized out>) at kernel/qobject.cpp:1120
#17 0x00000033b3bcaa5d in QApplicationPrivate::notify_helper (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:3803
#18 0x00000033b3bd27da in QApplication::notify (this=<value optimized out>, receiver=<value optimized out>, e=<value optimized out>) at kernel/qapplication.cpp:3768
#19 0x00000033b6224d7b in KApplication::notify (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at ../../kdeui/kernel/kapplication.cpp:307
#20 0x00000033b1754381 in QCoreApplication::notifyInternal (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at kernel/qcoreapplication.cpp:587
#21 0x00000033b1780256 in QTimerInfoList::activateTimers (this=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#22 0x00000033b177c7ad in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:160
#23 0x00000033ae43978b in IA__g_main_context_dispatch (context=<value optimized out>) at /build/buildd/glib2.0-2.16.6/glib/gmain.c:2012
#24 0x00000033ae43cf5d in g_main_context_iterate (context=<value optimized out>, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>)
    at /build/buildd/glib2.0-2.16.6/glib/gmain.c:2645
#25 0x00000033ae43d11b in IA__g_main_context_iteration (context=<value optimized out>, may_block=<value optimized out>) at /build/buildd/glib2.0-2.16.6/glib/gmain.c:2708
#26 0x00000033b177c70f in QEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:319
#27 0x00000033b3c5c44f in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:198
#28 0x00000033b1752ca2 in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:143
#29 0x00000033b1752e2d in QEventLoop::exec (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:194
#30 0x00000033b17552dd in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#31 0x00000033b2a40c5f in kdemain (argc=<value optimized out>, argv=<value optimized out>) at ../../kwin/main.cpp:519
#32 0x00000033aac1e1a6 in __libc_start_main () from /lib/libc.so.6
#33 0x0000000000400629 in _start ()
Comment 1 Ionut Ciocirlan 2009-01-19 18:36:35 UTC
Oh, and this is kwin svn 911645. It wasn't happening before with 907177.
Comment 2 Dario Andres 2009-01-19 21:38:48 UTC
This may be related to bug 177006
Comment 3 Ionut Ciocirlan 2009-01-20 01:09:27 UTC
With a single display everything is fine, so odds are in my case it's being triggered by something in commit 910287, which fixed bug #173017 -- http://bugs.kde.org/show_bug.cgi?id=173017#c39

I was getting the crashes with TwinView, when the desktop is in a messed up state, using both displays but unaware of xinerama hints -- see here: http://bugs.kde.org/show_bug.cgi?id=164242#c8

I'll check tomorrow if this is also happening with a "proper" twinview.
Comment 4 Ionut Ciocirlan 2009-01-22 18:31:47 UTC
It's not happening when KDE is started with both displays.

What's obviously wrong when getting the crash (besides the lack of xinerama hints) is there's no root window on the second display.
Comment 5 Guillaume Pothier 2009-01-22 18:45:54 UTC
Hi, the stack trace you provided shows a lot of <value optimized out>, can you change your compile options so that the actual values are shown?
I don't know that much about twinview -- is it compatible with xrandr? if not, then probably Kephal falls back to QDesktopWidget's notion of multi-screen, which has a few issues.
Comment 6 Ionut Ciocirlan 2009-01-22 20:16:17 UTC
I'll try rebuilding with -O0.

Twinview is compatible with xrandr 1.1 only, but it's a big hack: it uses the refresh rate as an id for the combinations of displays / resolutions / real refresh rates (it calls these combinations "MetaModes").

For example, if I have 2 displays: 1680x1050 and 1280x1024@, the basic combinations would be presented to xrandr as a _single_ display with:
   1680x1050      50.0
   1280x1024      51.0
   2960x1050      52.0
.. and so on if I'd need more combinations of resolutions.

It takes care of the rest with xinerama hints.
Comment 7 Guillaume Pothier 2009-01-22 20:23:38 UTC
Ouch! That's an interesting hack ;-)
Anyway I think Kephal needs xrandr 1.2.
I'll try a fix to Kephal's QDesktopWidget fallback mode. I'll defer the notifications, as at the moment QDesktopWidget sends notifications it still reports the previous configuration, so this might confuse kwin. It's strange however that it does not happen with compositing disabled.
Comment 8 Guillaume Pothier 2009-01-22 20:58:19 UTC
Created attachment 30515 [details]
Defers notifications for QDesktopWidget fallback

Can you please test with this patch? You need to restart kded4 (and of course kwin) for it to take effect. If this solves the problem, I'll probably modify it a bit (to avoid code duplication). Note that I didn't test it myself as I don't have TwinView.
Comment 9 Martin Flöser 2009-02-12 20:35:23 UTC
please still try the patch

*** This bug has been marked as a duplicate of bug 177006 ***