Bug 171593 - Presentation effect crashes Kwin
Summary: Presentation effect crashes Kwin
Status: RESOLVED FIXED
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: 2008-09-24 15:52 UTC by Rosetzky Cedric
Modified: 2008-09-26 14:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rosetzky Cedric 2008-09-24 15:52:20 UTC
Version:            (using Devel)
Compiler:          gcc-4.1.2 
OS:                Linux
Installed from:    Compiled sources

Activating the Presentation effect (Exposé like) crashes Kwin.

Backtrace :

Application : KWin (kwin), signal SIGSEGV
[?1034hUsing host libthread_db library "/lib/libthread_db.so.1".
0xb6900afb in nanosleep () from /lib/libc.so.6

Thread 1 (Thread 0xb5754910 (LWP 30358)):
[KCrash Handler]
#5  0xb36269e7 in KWin::PresentWindowsEffect::postPaintScreen (this=0x81ef9a0) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/presentwindows.cpp:157
#6  0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#7  0xb6fa23e0 in KWin::Effect::postPaintScreen (this=0x81f5648) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/lib/kwineffects.cpp:200
#8  0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#9  0xb6fa23e0 in KWin::Effect::postPaintScreen (this=0x81eff50) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/lib/kwineffects.cpp:200
#10 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#11 0xb364837b in KWin::CoverSwitchEffect::postPaintScreen (this=0x82070d8) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/coverswitch.cpp:367
#12 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#13 0xb6fa23e0 in KWin::Effect::postPaintScreen (this=0x8206d38) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/lib/kwineffects.cpp:200
#14 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#15 0xb364e0b2 in KWin::CubeEffect::postPaintScreen (this=0x81ef678) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/cube.cpp:887
#16 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#17 0xb3623d38 in KWin::MinimizeAnimationEffect::postPaintScreen (this=0x81efed8) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/minimizeanimation.cpp:107
#18 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#19 0xb36137af in KWin::DesktopGridEffect::postPaintScreen (this=0x823ad20) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/desktopgrid.cpp:166
#20 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#21 0xb3666e16 in KWin::WobblyWindowsEffect::postPaintScreen (this=0x8244b50) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/wobblywindows.cpp:453
#22 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#23 0xb361e6e4 in KWin::LogoutEffect::postPaintScreen (this=0x80e0898) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/logout.cpp:75
#24 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#25 0xb361e06e in KWin::LoginEffect::postPaintScreen (this=0x8207f60) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/login.cpp:76
#26 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#27 0xb6fa23e0 in KWin::Effect::postPaintScreen (this=0x81eeba0) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/lib/kwineffects.cpp:200
#28 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#29 0xb366471a in KWin::TrackMouseEffect::postPaintScreen (this=0x81f07f8) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/trackmouse.cpp:101
#30 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#31 0xb36427f0 in KWin::ZoomEffect::postPaintScreen (this=0x81f4548) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects/zoom.cpp:79
#32 0xb7f1d58e in KWin::EffectsHandlerImpl::postPaintScreen (this=0x81c2800) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/effects.cpp:124
#33 0xb7f08e3c in KWin::Scene::paintScreen (this=0x8099bb8, mask=0xbfe4c884, region=0xbfe4c96c) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/scene.cpp:136
#34 0xb7f13b9e in KWin::SceneOpenGL::paint (this=0x8099bb8, damage=@0xbfe4c96c, toplevels=@0xbfe4c968) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/scene_opengl.cpp:721
#35 0xb7f01a6f in KWin::Workspace::performCompositing (this=0x807b8d0) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/composite.cpp:384
#36 0xb7e93fb0 in KWin::Workspace::qt_metacall (this=0x807b8d0, _c=QMetaObject::InvokeMetaMethod, _id=140, _a=0xbfe4ca08)
    at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdebase/workspace/kwin/workspace.moc:443
#37 0xb6c24c8c in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4
#38 0xb6c25365 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4
#39 0xb6c61917 in QTimer::timeout () from /usr/lib/qt4/libQtCore.so.4
#40 0xb6c2c0af in QTimer::timerEvent () from /usr/lib/qt4/libQtCore.so.4
#41 0xb6c20214 in QObject::event () from /usr/lib/qt4/libQtCore.so.4
#42 0xb743539d in QApplicationPrivate::notify_helper () from /usr/lib/qt4/libQtGui.so.4
#43 0xb743a005 in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4
#44 0xb718254f in KApplication::notify (this=0xbfe4d158, receiver=0x807bb24, event=0xbfe4ceb8) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#45 0xb7eb32aa in KWin::Application::notify (this=0xbfe4d158, o=0x807bb24, e=0xbfe4ceb8) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/main.cpp:371
#46 0xb6c0f7e8 in QCoreApplication::notifyInternal () from /usr/lib/qt4/libQtCore.so.4
#47 0xb6c3c298 in ?? () from /usr/lib/qt4/libQtCore.so.4
#48 0xb6c3c407 in QEventDispatcherUNIX::activateTimers () from /usr/lib/qt4/libQtCore.so.4
#49 0xb6c3cf6c in QEventDispatcherUNIX::processEvents () from /usr/lib/qt4/libQtCore.so.4
#50 0xb74c1ff3 in ?? () from /usr/lib/qt4/libQtGui.so.4
#51 0xb6c0e9e4 in QEventLoop::processEvents () from /usr/lib/qt4/libQtCore.so.4
#52 0xb6c0eb8b in QEventLoop::exec () from /usr/lib/qt4/libQtCore.so.4
#53 0xb6c10dbd in QCoreApplication::exec () from /usr/lib/qt4/libQtCore.so.4
#54 0xb7434bd9 in QApplication::exec () from /usr/lib/qt4/libQtGui.so.4
#55 0xb7eb4c86 in kdemain (argc=3, argv=0xbfe4d314) at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/kwin/main.cpp:513
#56 0x08048796 in main (argc=136289904, argv=0x81b5d68) at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdebase/workspace/kwin/kwin_dummy.cpp:3
Comment 1 lucas 2008-09-24 15:54:53 UTC
Should be fixed in r863746
Comment 2 Rosetzky Cedric 2008-09-24 17:23:26 UTC
It's happening in revision 864316.
Comment 3 lucas 2008-09-24 17:57:38 UTC
SVN commit 864365 by lmurray:

Prevent present windows from storing data for a NULL window.
CCBUG: 171593

 M  +8 -5      presentwindows.cpp  


--- trunk/KDE/kdebase/workspace/kwin/effects/presentwindows.cpp #864364:864365
@@ -255,13 +255,13 @@
     if( m_highlightedWindow == w )
         setHighlightedWindow( findFirstWindow() );
     m_windowData[w].visible = false; // TODO: Fix this so they do actually fade out
-    m_motionManager.unmanage( w );
     rearrangeWindows();
     }
 
 void PresentWindowsEffect::windowDeleted( EffectWindow *w )
     {
     m_windowData.remove( w );
+    m_motionManager.unmanage( w );
     }
 
 bool PresentWindowsEffect::borderActivated( ElectricBorder border )
@@ -456,12 +456,17 @@
         }
     if( windowlist.isEmpty() )
         {
-        setHighlightedWindow( NULL );
+        setHighlightedWindow( NULL ); // TODO: Having a NULL highlighted window isn't really safe
         return;
         }
 
     // We filtered out the highlighted window
-    if( m_windowData[m_highlightedWindow].visible == false )
+    if( m_highlightedWindow )
+        {
+        if( m_windowData[m_highlightedWindow].visible == false )
+            setHighlightedWindow( findFirstWindow() );
+        }
+    else
         setHighlightedWindow( findFirstWindow() );
 
     int screens = m_tabBoxEnabled ? 1 : effects->numScreens();
@@ -949,10 +954,8 @@
     QVector< bool > taken;
     taken.fill( false, columns * rows );
     foreach( EffectWindow* w, windowlist )
-        {
         if( m_windowData[w].slot != -1 )
             taken[ m_windowData[w].slot ] = true;
-        }
     int slotWidth = area.width() / columns;
     int slotHeight = area.height() / rows;
     if( m_tabBoxEnabled )
Comment 4 lucas 2008-09-26 09:02:39 UTC
Did the above commit fix the crash?
Comment 5 Rosetzky Cedric 2008-09-26 09:43:42 UTC
I still need to update, I'll do it ASAP, let you know if it fixes the crash.
Comment 6 Rosetzky Cedric 2008-09-26 14:27:03 UTC
It works now, the bug is fixed ;). Thank you.