Bug 174274 - freeze and memory usage growing when adding a plasmoid
Summary: freeze and memory usage growing when adding a plasmoid
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-04 17:46 UTC by Rosetzky Cedric
Modified: 2009-01-29 23:18 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rosetzky Cedric 2008-11-04 17:46:41 UTC
Version:            (using Devel)
Compiler:          gcc-4.3.2 
OS:                Linux
Installed from:    Compiled sources

As wrote in the title, Plasma randomly freezes when adding a plasmoid on the desktop, and the memory usage is growing (about 20MB/Sec).

I managed to get a backtrace :

(gdb) bt                                                                        
#0  0xb6280e9e in memmove () from /lib/libc.so.6                                
#1  0xb705c991 in QRectF::normalized () from /usr/lib/qt4/libQtCore.so.4        
#2  0xb705cfa9 in QRectF::intersects () from /usr/lib/qt4/libQtCore.so.4        
#3  0xb288a25b in ItemSpace::itemInRegionEndingFirstHoriz (this=0x81c2cc8,      
    region=@0xbfaef628)                                                         
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/plasma/containments/desktop/itemspace.cpp:325                                           
#4  0xb288adb5 in ItemSpace::positionVertically (this=0x81c2cc8,                
    itemSize=@0xbfaef888, align={i = -1079052120}, limitedSpace=false,          
    findAll=true)                                                               
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/plasma/containments/desktop/itemspace.cpp:247                                           
#5  0xb288fec8 in DesktopLayout::addItem (this=0x81c2cb8, item=0x8640b98,       
    pushBack=true, size=@0xbfaefad0)                                            
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/plasma/containments/desktop/desktoplayout.cpp:61                                        
#6  0xb288707d in DefaultDesktop::onAppletAdded (this=0x8224e70,                
    applet=0x8640b88, pos=@0xbfaefd20)                                          
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/plasma/containments/desktop/desktop.cpp:240                                             
#7  0xb2887c05 in DefaultDesktop::qt_metacall (this=0x8224e70,                  
    _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbfaefbf4)                     
    at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdebase/workspace/plasma/containments/desktop/desktop.moc:83                                            
#8  0xb71343cc in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4     
#9  0xb7135175 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4     
#10 0xb7e51c62 in Plasma::Containment::appletAdded (this=0x8224e70,             
    _t1=0x8640b88, _t2=@0xbfaefd20)                                             
    at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdelibs/plasma/containment.moc:149                                                                      
#11 0xb7e5439b in Plasma::Containment::addApplet (this=0x8224e70,               
    applet=0x8640b88, pos=@0xbfaefd20, delayInit=false)                         
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdelibs/plasma/containment.cpp:723                                                                        
#12 0xb7e54655 in Plasma::ContainmentPrivate::addApplet (this=0x8179a58,        
---Type <return> to continue, or q <return> to quit---                          
    name=@0xbfaefde0, args=@0xbfaefddc, appletGeometry=@0xbfaefdb8, id=0,       
    delayInit=false)                                                            
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdelibs/plasma/containment.cpp:1663
#13 0xb7e5468c in Plasma::Containment::addApplet (this=0x8224e70,                        
    name=@0xbfaefde0, args=@0xbfaefddc, appletGeometry=@0xbfaefdb8)                      
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdelibs/plasma/containment.cpp:650 
#14 0xb7fbc057 in Plasma::AppletBrowserWidget::addApplet (this=0x8582ff8)                
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/plasma/shells/common/appletbrowser.cpp:258                                                                                                    
#15 0xb7fbc15c in Plasma::AppletBrowserWidget::qt_metacall (this=0x8582ff8,                                
    _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfaefe98)                                                
    at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdebase/workspace/plasma/shells/desktop/appletbrowser.moc:77                                                                                                  
#16 0xb71343cc in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4                                
#17 0xb7135175 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4                                
#18 0xb7b6cced in KDialog::applyClicked (this=0x854f900)                                                   
    at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdelibs/kdeui/kdialog.moc:235                      
#19 0xb7b6e2b9 in KDialog::slotButtonClicked (this=0x854f900, button=8)                                    
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdelibs/kdeui/dialogs/kdialog.cpp:854                
#20 0xb7b7072a in KDialog::qt_metacall (this=0x854f900,                                                    
    _c=QMetaObject::InvokeMetaMethod, _id=33, _a=0xbfaf003c)                                               
    at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdelibs/kdeui/kdialog.moc:181                      
#21 0xb7fbb6f7 in Plasma::AppletBrowser::qt_metacall (this=0x854f900,                                      
    _c=QMetaObject::InvokeMetaMethod, _id=68, _a=0xbfaf003c)                                               
    at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdebase/workspace/plasma/shells/desktop/appletbrowser.moc:130                                                                                                 
#22 0xb71343cc in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4                                
#23 0xb7135175 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4                                
#24 0xb71388d6 in QSignalMapper::mapped () from /usr/lib/qt4/libQtCore.so.4                                
#25 0xb7139174 in QSignalMapper::map () from /usr/lib/qt4/libQtCore.so.4                                   
---Type <return> to continue, or q <return> to quit---                                                     
#26 0xb7139336 in QSignalMapper::map () from /usr/lib/qt4/libQtCore.so.4                                   
#27 0xb7139bec in QSignalMapper::qt_metacall ()                                                            
   from /usr/lib/qt4/libQtCore.so.4                                                                        
#28 0xb71343cc in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4                                
#29 0xb71347e1 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4                                
#30 0xb6de111e in QAbstractButton::clicked () from /usr/lib/qt4/libQtGui.so.4                              
#31 0xb6b48a8e in ?? () from /usr/lib/qt4/libQtGui.so.4                                                    
#32 0xb6b49b5f in ?? () from /usr/lib/qt4/libQtGui.so.4                                                    
#33 0xb6b49dc4 in QAbstractButton::mouseReleaseEvent ()                                                    
   from /usr/lib/qt4/libQtGui.so.4                                                                         
#34 0xb686b637 in QWidget::event () from /usr/lib/qt4/libQtGui.so.4                                        
#35 0xb6b48ea1 in QAbstractButton::event () from /usr/lib/qt4/libQtGui.so.4                                
#36 0xb6bed37a in QPushButton::event () from /usr/lib/qt4/libQtGui.so.4                                    
#37 0xb681439d in QApplicationPrivate::notify_helper ()                                                    
   from /usr/lib/qt4/libQtGui.so.4                                                                         
#38 0xb681941c in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4                                  
#39 0xb7bfc6f7 in KApplication::notify (this=0x8067090, receiver=0x8592d68,                                
    event=0xbfaf08b0)
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#40 0xb711f9a3 in QCoreApplication::notifyInternal ()
   from /usr/lib/qt4/libQtCore.so.4
#41 0xb6818b82 in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib/qt4/libQtGui.so.4
#42 0xb687d4db in ?? () from /usr/lib/qt4/libQtGui.so.4
#43 0xb687bdd7 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt4/libQtGui.so.4
#44 0xb68a0f72 in ?? () from /usr/lib/qt4/libQtGui.so.4
#45 0xb711dff1 in QEventLoop::processEvents () from /usr/lib/qt4/libQtCore.so.4
#46 0xb711e1c8 in QEventLoop::exec () from /usr/lib/qt4/libQtCore.so.4
#47 0xb7120895 in QCoreApplication::exec () from /usr/lib/qt4/libQtCore.so.4
#48 0xb6813bd9 in QApplication::exec () from /usr/lib/qt4/libQtGui.so.4
#49 0xb7fa05f9 in kdemain (argc=1, argv=0xbfaf0f74)
    at /home/loacoon/Documents/Downloads/SVN/KDE4/KDE/kdebase/workspace/plasma/shells/desktop/main.cpp:58
---Type <return> to continue, or q <return> to quit---
#50 0x08048826 in main (argc=Cannot access memory at address 0x0
)
    at /home/loacoon/Documents/Downloads/SVN/KDE4/build/kdebase/workspace/plasma/shells/desktop/plasma_qgv_dummy.cpp:3
Comment 1 Aaron J. Seigo 2008-11-10 09:44:38 UTC
This is one for Ambro...
Comment 2 Ambroz Bizjak 2008-11-10 11:37:53 UTC
Could you describe the circumstances?
Please attach your plasma-appletsrc. Also, what applet did you add, and what is your screen configuration (resolution) ?
Comment 3 Rosetzky Cedric 2008-11-10 13:58:39 UTC
There are no particular circumstances. I just wanted to add applets on my desktop, KDE4 just started, no other apps where launched.
It didn't happened with a particular applet. No matter which one I was trying to add, the bug happened.
My resolution is 1152/864. 
As for the plasma-appletsrc file, I'll have to find the time to compile KDE4 since I erased everything related to it from my computer (I must say that I'm loosing interest in KDE4).
Comment 4 Ambroz Bizjak 2008-11-10 19:37:13 UTC
Was this happening all the time, or did it start once you already had some applets on the desktop?

I'm compiling kde trunk now to see if I can reproduce it, but it might not be the fault of my positioning code.

If the backtrace is correct, it could be stuck inside the primary loop of ItemSpace::positionVertically, but that seems impossible to me. The "x" variable is sure to increase every iteration, because when considering items intersecting with a rectangle that has left at border "x", each item's right border is sure to be greater than "x" (otherwise they wouldn't be intersecting). So if horizontal space was limited (not the case here), it should eventually terminate. Otherwise it will terminate when "x" increases to the point no more applets are found in the rectangle mentioned.

After all, it's just an iteration, and shouldn't drain memory - the code concerned doesn't do recursion or dynamic allocation.

> As for the plasma-appletsrc file, I'll have to find the time to compile KDE4 > since I erased everything related to it from my computer (I must say that I'm > loosing interest in KDE4).
You can't "lose interest" because you find a bug in experimental code. If you check it out, you should expect bugs and be able to provide adequate data to developers.
Comment 5 Rosetzky Cedric 2008-11-10 20:38:19 UTC
When it started, I had a few applets on my desktop already. The more I had applets, the more the freeze happened, until I had 3 or 4 applets, and then, it happened everytime.

About my loss of interest, this bug is not the problem, I know those things can happen. This is bugs like these : http://bugs.kde.org/show_bug.cgi?id=168471, http://bugs.kde.org/show_bug.cgi?id=157352, which are critical and old bugs, especially the second... and a few missing features from KDE 3.5.x that are making me lose interest in KDE4.

Anyway, I'll compile from trunk and help you clean this bug as soon as I can.
Comment 6 Ambroz Bizjak 2008-11-10 20:57:48 UTC
I believe the problem is on your side. Both bug reports you mentioned involve KDE freezing, and nobody has confirmed them yet. Consider updating KDE dependencies or contacting your distributor. Which distribution and version do you use?
Comment 7 Rosetzky Cedric 2008-11-10 21:45:44 UTC
I thought the same. But when I changed my computer, I also changed my distribution (from Debian to Gentoo), and my method of compiling and using KDE4 since using Gentoo helps understanding a few things.
So with two diffenrent conputers, two different Linux distributions, and two different ways of using and compiling KDE4, I'm having the exact same bugs. 
Of course, I'm not talking about this bug, which is recent and truly Plasma related (since only Plasma freezes, not the whole KDE), but about the two others. Also, this bug appeared only recently, it never happened before.

By the way, the freezing when changing laguages has been confirmed by someone. It's not me who changed the bug's status to "NEW" ;).
Comment 8 Rosetzky Cedric 2008-11-15 04:17:47 UTC
This bug seems to be gone now.
Comment 9 Dario Andres 2009-01-29 23:18:59 UTC
Bug 180873 looks like this but in 4.2