Bug 139180 - kwin crash when switching windows (3.5.5)
Summary: kwin crash when switching windows (3.5.5)
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-23 21:54 UTC by Robert Gomułka
Modified: 2007-01-04 18:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (3.03 KB, text/plain)
2006-12-23 21:54 UTC, Robert Gomułka
Details
In some cases clients were not properly added to a new group. (666 bytes, patch)
2006-12-29 19:20 UTC, Modestas Vainius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Gomułka 2006-12-23 21:54:13 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Debian testing/unstable Packages
OS:                Linux

While switching windows, KWin crashed.
I haven't observed such crashes until today - but today I upgraded my KDE - it introduced new version with interesting part:
"+++ Changes by Ana Guerrero:
  * Applied patch to avoid kwin crashes when switching desktop 
    (Closes: #365829).
"
Backtrace will be attached.
Comment 1 Robert Gomułka 2006-12-23 21:54:54 UTC
Created attachment 19022 [details]
Backtrace
Comment 2 Robert Gomułka 2006-12-23 22:11:02 UTC
The following lines can be observed on console: ASSERT: _members contains (member_P) win/group.cpp(101).
(Or similar lines).
Comment 3 Sune Vuorela 2006-12-24 12:53:59 UTC
This might be related to the way we (debian) has patched it.  I am currently trying if it also exists if I do a full kwin branch pull instead of trying to find the right fixes.
I get back soon to tell if it is 'blame me & ana' or not.
Comment 4 Sune Vuorela 2006-12-24 15:31:05 UTC
it is not 'blame me & ana' - I have tried with kwin svn head as of a couple of hours ago (I think r615333) 
It crashes at least in bluej when I try that.

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1497790784 (LWP 4710)]
[KCrash handler]
#5  QValueListPrivate<KWinInternal::Client*>::insert (this=0x8114830, 
    it=@0xafb1b13c, x=@0xafb1b154) at /usr/share/qt3/include/qvaluelist.h:291
#6  0xa7ec360d in KWinInternal::Group::addMember (this=0x811f610, 
    member_P=0x812bc68) at /usr/share/qt3/include/qvaluelist.h:526
#7  0xa7ef4b15 in KWinInternal::Client::checkGroup (this=0x812bc68, 
    set_group=0x0, force=true)
    at /home/pusling/src/kdebase-3.5.5a.dfsg.1/./kwin/group.cpp:983
#8  0xa7ef4e19 in KWinInternal::Client::setTransient (this=0x812bc68, 
    new_transient_for_id=41943090)
    at /home/pusling/src/kdebase-3.5.5a.dfsg.1/./kwin/group.cpp:583
#9  0xa7efd91c in KWinInternal::Client::readTransient (this=0x812bc68)
    at /home/pusling/src/kdebase-3.5.5a.dfsg.1/./kwin/group.cpp:566
#10 0xa7efdc28 in KWinInternal::Client::manage (this=0x812bc68, w=41943129, 
    isMapped=false)
    at /home/pusling/src/kdebase-3.5.5a.dfsg.1/./kwin/manage.cpp:112
#11 0xa7effbb6 in KWinInternal::Workspace::createClient (this=0x809d6b8, 
    w=41943129, is_mapped=false)
    at /home/pusling/src/kdebase-3.5.5a.dfsg.1/./kwin/workspace.cpp:482
#12 0xa7f031ab in KWinInternal::Workspace::workspaceEvent (this=0x809d6b8, 
    e=0xafb1b8f8)
    at /home/pusling/src/kdebase-3.5.5a.dfsg.1/./kwin/events.cpp:360
#13 0xa7f0329e in KWinInternal::Application::x11EventFilter (this=0xafb1bad0, 
    e=0xafb1b8f8)
    at /home/pusling/src/kdebase-3.5.5a.dfsg.1/./kwin/main.cpp:155
#14 0xa7087133 in qt_x11EventFilter (ev=0xafb1b8f8)
    at kernel/qapplication_x11.cpp:387
#15 0xa709705b in QApplication::x11ProcessEvent (this=0xafb1bad0, 
    event=0xafb1b8f8) at kernel/qapplication_x11.cpp:3343
#16 0xa70adcb2 in QEventLoop::processEvents (this=0x8071c28, flags=4)
    at kernel/qeventloop_x11.cpp:192
#17 0xa7121129 in QEventLoop::enterLoop (this=0x8071c28)
    at kernel/qeventloop.cpp:198
#18 0xa7120f4a in QEventLoop::exec (this=0x8071c28)
    at kernel/qeventloop.cpp:145
#19 0xa710876f in QApplication::exec (this=0xafb1bad0)
    at kernel/qapplication.cpp:2758
#20 0xa7f01412 in kdemain (argc=1, argv=0xafb1bd44)
    at /home/pusling/src/kdebase-3.5.5a.dfsg.1/./kwin/main.cpp:285
#21 0x08048482 in main (argc=) at kwin.la.cpp:2
#22 0xa7c4dea8 in __libc_start_main () from /lib/tls/libc.so.6
#23 0x080483d1 in _start () at ../sysdeps/i386/elf/start.S:119
Comment 5 Modestas Vainius 2006-12-29 19:20:08 UTC
Created attachment 19058 [details]
In some cases clients were not properly added to a new group.

So double Group object destruction or accessing already freed Group objects led
to SIGSERVs.
Comment 6 Lubos Lunak 2007-01-04 18:02:33 UTC
SVN commit 619873 by lunakl:

Properly add window to a group.
BUG: 139180



 M  +4 -3      group.cpp  


--- branches/KDE/3.5/kdebase/kwin/group.cpp #619872:619873
@@ -993,10 +993,11 @@
                 in_group->removeMember( this );            
                 in_group = NULL;
                 }
-            in_group = new_group;
-            if( in_group == NULL )
+            if( new_group == NULL )
+                new_group = new Group( None, workspace() );
+            if( in_group != new_group )
                 {
-                in_group = new Group( None, workspace());
+                in_group = new_group;
                 in_group->addMember( this );
                 }
             }