Bug 212112 - Kmenuedit KDE Menu Editor extremely slow
Summary: Kmenuedit KDE Menu Editor extremely slow
Status: RESOLVED FIXED
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 21:53 UTC by Greg Lepore
Modified: 2013-08-11 12:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.4.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Lepore 2009-10-27 21:53:13 UTC
Version:            (using KDE 4.3.2)
Installed from:    Ubuntu Packages

Running KDE 4.3.2, every action involving the KDE Menu Editor takes approximately 30 seconds.  Selecting an entry takes 30 seconds, I click the delete button, it takes 30 seconds to delete.  Select New Item, it pops up immediately, but after typing a name and hitting Enter, it takes 30 seconds.  This makes the Menu Editor pretty useless.
Occasionally clicking around on various entries will move normal speed, but after a couple it goes back to the 30 seconds for everything.
Likewise clicking the Save button takes 30 seconds.
Comment 1 tony 2009-11-14 13:04:06 UTC
I'm having the same problem with kmenueditor 0.8 (KDE 4.3.2) installed from Mandriva 2010.

The strange thing is, it was working fine initially but has ground to a halt today. Clicking the tree-view expand or contract buttons for submenus works immediately, and clicking on the submenu entry brings up its editing options straight away. But clicking on any menu item takes, as reported, about 30 seconds.

I've monitored /var/log/syslog to see if any useful messages appear. None. Similarly, running "kmenuedit --nofork" fails to provide any diagnostics. Running it via GDB provides nothing useful either (though I don't seem to have debug packages available - I've only just moved over to Mandriva so still haven't found everything...)
Comment 2 tony 2009-11-14 13:36:31 UTC
Update.

I have a suspicion this may in some way be connected with DBUS
.
If I log into a fresh KDE4 session and run the KDE Control Centre, then select "Service manager", it works immediately. However if I run kmenuedit first, it hangs and eventually pops up a message saying: "Unable to contact KDED". A bit of Googling suggests this may indicate a problem with DBUS.

Additionally, after running kmenuedit and trying to use the service manager, clicking links in Kmail fail to open them in my browser for about 30 seconds, though this behaviour is sporadic and I haven't yet isolated the precise sequence causing this.
Comment 3 Will Stephenson 2009-11-23 18:21:46 UTC
When this happens, before opening "Service manager", can you check in a console if 'kded4' is running for your user?

If it is running, can you try to contact it with qdbus org.kde.kded ?  do you get a response or does qdbus just hang too?
Comment 4 tony 2009-11-23 21:17:46 UTC
kded4 running:
$ pgrep -l kded
2922 kded4

"qdbus org.kde.kded" runs OK before opening kmenuedit. But AFTER opening it$ qdbus org.kde.kded
/
Cannot introspect object / at org.kde.kded:
org.freedesktop.DBus.Error.NoReply (Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)

Takes about 40 seconds between printing the slash and the error message.
Comment 5 Greg Lepore 2009-11-23 21:51:48 UTC
My results were identical to #4, kded runs fine before opening kmenuedit, and throws the dbus error afterwards.  Actually, just opening kmenuedit doesn't throw the error, but clicking on an item entry gives the original delay time and the error.
Comment 6 Will Stephenson 2009-11-23 22:08:16 UTC
Ok, the call kmenuedit is making to khotkeys (a kded module) is making kded4 hang or crash.  Could either of you get me a backtrace of kded4?

1) install debuginfo packages for kdelibs, kdebase, kdebase-workspace, kdebase-runtime (depending on your distro's packaging)
2) attach gdb to the running kded4 process before starting kmenuedit (gdb -p `pidof kded4`) and make kded4 continue ('cont' at the gdb command line)
3) start kmenuedit 
4) get back into gdb, interrupt kded4, (ctrl-c) and get a backtrace of where kded4 is hung ('backtrace' at the gdb command line)?

There's a chance kded4 is crashing at step 3) in which case you won't need to interrupt it.  Once you've saved the backtrace you can kill kded4 with 'kill' or 'detach' from kded4 then 'quit' out of gdb.  Apologies if you already passed GDB101...
Comment 7 tony 2009-11-23 22:33:46 UTC
Puzzlingly, I don't appear to have kdebase installed (there are kdebas4 meta-packages, but none shown as installed). But I've installed the debug versions of all the other packages.

Unfortunately there's not much output from gdb



$ gdb -p 2832 kded4                     
GNU gdb 6.8-7mdv2010.0 (Mandriva Linux release 2010.0)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mandriva-linux-gnu"...
Attaching to program: /usr/bin/kded4, process 2832
0x00007fcca03a5e59 in ?? ()
(gdb) cont
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x00007fcca03a5e59 in ?? ()
(gdb) backtrace
#0  0x00007fcca03a5e59 in ?? ()
#1  0x0000000000000000 in ?? ()
(gdb)


Interestingly (perhaps) control-c while kmenuedit is hung quits GDB completely, whereas once it's got round to showing the selected item, control-c DOESN't quit GDB.
Comment 8 Greg Lepore 2009-11-23 22:52:34 UTC
Thanks for the instructions, I think I did them correctly, I have the following:

(gdb) backtrace                                                                                                              
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261                      
#1  0x00007faf5b58cc93 in QMutexPrivate::wait (this=0xcb6e50, timeout=-1) at thread/qmutex_unix.cpp:80                       
#2  0x00007faf5b588865 in QMutex::lock (this=0xcb5a48) at thread/qmutex.cpp:207                                              
#3  0x00007faf576fa6e6 in QDBusMutexLocker (this=0xcb59e0, message=<value optimized out>, timeout=-1)                        
    at qdbusthreaddebug_p.h:184                                                                                              
#4  QDBusDispatchLocker (this=0xcb59e0, message=<value optimized out>, timeout=-1) at qdbusthreaddebug_p.h:199               
#5  QDBusConnectionPrivate::sendWithReplyAsync (this=0xcb59e0, message=<value optimized out>, timeout=-1)                    
    at qdbusintegrator.cpp:1853                                                                                              
#6  0x00007faf576e35d0 in QDBusConnection::asyncCall (this=<value optimized out>, message=..., timeout=-1)                   
    at qdbusconnection.cpp:542                                                                                               
#7  0x00007faf57701efb in QDBusAbstractInterface::asyncCallWithArgumentList (this=<value optimized out>, method=...,         
    args=<value optimized out>) at qdbusabstractinterface.cpp:430                                                            
#8  0x00007faf5a29ea07 in OrgKdeKGlobalAccelInterface::doRegister (this=<value optimized out>, action=0xde8130)              
    at ./kglobalaccel_interface.h:84                                                                                         
#9  KGlobalAccelPrivate::doRegister (this=<value optimized out>, action=0xde8130)                                            
    at ../../kdeui/shortcuts/kglobalaccel.cpp:227                                                                            
#10 0x00007faf5a189f8f in KAction::setGlobalShortcut (this=0xde8130, shortcut=..., type=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.                                                       
)                                                                                                                            
    at ../../kdeui/actions/kaction.cpp:224                                                                                   
#11 0x00007faf4b60237f in KHotKeys::ShortcutsHandler::addAction (this=0xd13200, id=..., text=..., shortcut=...)              
    at ../../../khotkeys/libkhotkeysprivate/shortcuts_handler.cpp:87                                                         
#12 0x00007faf4b5f4952 in KHotKeys::ShortcutTrigger::activate (this=0xddf590, activate_P=<value optimized out>)              
    at ../../../khotkeys/libkhotkeysprivate/triggers/shortcut_trigger.cpp:81                                                 
#13 0x00007faf4b5f3c0f in KHotKeys::ShortcutTrigger::enable (this=0xcb6e9c)                                                  
    at ../../../khotkeys/libkhotkeysprivate/triggers/shortcut_trigger.cpp:149                                                
#14 0x00007faf4b5ea037 in KHotKeys::SimpleActionData::doEnable (this=0xddf750)                                               
    at ../../../khotkeys/libkhotkeysprivate/action_data/simple_action_data.cpp:61                                            
#15 0x00007faf4b5fedfe in SettingsReaderV2::readAction (this=<value optimized out>, config=<value optimized out>,            
    parent=<value optimized out>) at ../../../khotkeys/libkhotkeysprivate/settings_reader_v2.cpp:185                         
#16 0x00007faf4b5ff210 in SettingsReaderV2::readGroup (this=0x7fff9cf36ec0, config=..., parent=<value optimized out>)        
    at ../../../khotkeys/libkhotkeysprivate/settings_reader_v2.cpp:120                                                       
#17 0x00007faf4b5febec in SettingsReaderV2::readAction (this=0x7fff9cf36ec0, config=..., parent=0xdda6e0)                    
    at ../../../khotkeys/libkhotkeysprivate/settings_reader_v2.cpp:138                                                       
#18 0x00007faf4b5ff970 in SettingsReaderV2::read (this=0x7fff9cf36ec0, config=<value optimized out>,                         
    parent=<value optimized out>) at ../../../khotkeys/libkhotkeysprivate/settings_reader_v2.cpp:60                          
#19 0x00007faf4b5fd141 in KHotKeys::Settings::read_settings (this=<value optimized out>, root=<value optimized out>,         
---Type <return> to continue, or q <return> to quit---                                                                       
    config=<value optimized out>, include_disabled=<value optimized out>, disable=<value optimized out>)                     
    at ../../../khotkeys/libkhotkeysprivate/settings.cpp:398                                                                 
#20 0x00007faf4b5fe88b in KHotKeys::Settings::reread_settings (this=0xd054d0, include_disabled=255)                          
    at ../../../khotkeys/libkhotkeysprivate/settings.cpp:370                                                                 
#21 0x00007faf4b814ff7 in KHotKeysModule::reread_configuration (this=0xd054b0) at ../../../khotkeys/app/kded.cpp:85          
#22 0x00007faf4b8152f0 in KHotKeysModule (this=0xd054b0, parent=<value optimized out>) at ../../../khotkeys/app/kded.cpp:57  
#23 0x00007faf4b816167 in KPluginFactory::createInstance<KHotKeysModule, QObject> (parentWidget=<value optimized out>,       
    parent=<value optimized out>, args=...) at /usr/include/kpluginfactory.h:461                                             
#24 0x00007faf5b29eb1e in KPluginFactory::create (this=0xd1c5e0, iface=0x7faf5b2e3c20 "KDEDModule",                          
    parentWidget=<value optimized out>, parent=0xca0b40, args=..., keyword=<value optimized out>)                            
    at ../../kdecore/util/kpluginfactory.cpp:191                                                                             
#25 0x00007faf4fa35aa5 in KPluginFactory::create<KDEDModule> (this=0xca0b40, s=<value optimized out>,                        
    onDemand=<value optimized out>) at ../../kdecore/util/kpluginfactory.h:491                                               
#26 Kded::loadModule (this=0xca0b40, s=<value optimized out>, onDemand=<value optimized out>) at ../../kded/kded.cpp:380     
#27 0x00007faf4fa36181 in Kded::loadModule (this=0xca0b40, obj=<value optimized out>, onDemand=true)                         
    at ../../kded/kded.cpp:334                                                                                               
#28 0x00007faf4fa369ef in Kded::messageFilter (message=<value optimized out>) at ../../kded/kded.cpp:195                     
#29 0x00007faf576f915c in QDBusConnectionPrivate::handleMessage (this=<value optimized out>, amsg=...)                       
    at qdbusintegrator.cpp:526                                                                                               
#30 0x00007faf576fc8a8 in qDBusSignalFilter (connection=<value optimized out>, message=<value optimized out>,                
    data=<value optimized out>) at qdbusintegrator.cpp:517                                                                   
#31 0x00007faf4f7df396 in dbus_connection_dispatch () from /lib/libdbus-1.so.3                                               
#32 0x00007faf576ec3b5 in q_dbus_connection_dispatch (this=0xcb59e0) at ./qdbus_symbols_p.h:113                              
#33 QDBusConnectionPrivate::doDispatch (this=0xcb59e0) at qdbusintegrator.cpp:1067                                           
#34 0x00007faf576ec4dd in QDBusConnectionPrivate::socketRead (this=0xcb59e0, fd=5) at qdbusintegrator.cpp:1087               
#35 0x00007faf5772c59b in QDBusConnectionPrivate::qt_metacall (this=0xcb59e0, _c=QMetaObject::InvokeMetaMethod,              
    _id=<value optimized out>, _a=0x7fff9cf37a60) at .moc/release-shared/moc_qdbusconnection_p.cpp:89                        
#36 0x00007faf5b688ddc in QMetaObject::activate (sender=0xd2a240, from_signal_index=<value optimized out>,                   
    to_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3113                               
#37 0x00007faf5b6bee9e in QSocketNotifier::activated (this=0xcb6e9c, _t1=5)                                                  
    at .moc/release-shared/moc_qsocketnotifier.cpp:83
#38 0x00007faf5b68d773 in QSocketNotifier::event (this=0xd2a240, e=0x7fff9cf37fa0) at kernel/qsocketnotifier.cpp:316
#39 0x00007faf59623efc in QApplicationPrivate::notify_helper (this=0xcbf540, receiver=0xd2a240, e=0x7fff9cf37fa0)
    at kernel/qapplication.cpp:4056
#40 0x00007faf5962b1ce in QApplication::notify (this=0x7fff9cf382b0, receiver=0xd2a240, e=0x7fff9cf37fa0)
---Type <return> to continue, or q <return> to quit---
    at kernel/qapplication.cpp:4021
#41 0x00007faf5a25ae56 in KApplication::notify (this=0x7fff9cf382b0, receiver=0xd2a240, event=0x7fff9cf37fa0)
    at ../../kdeui/kernel/kapplication.cpp:302
#42 0x00007faf5b673c2c in QCoreApplication::notifyInternal (this=0x7fff9cf382b0, receiver=0xd2a240, event=0x7fff9cf37fa0)
    at kernel/qcoreapplication.cpp:610
#43 0x00007faf5b69c42a in QCoreApplication::sendEvent (source=0xcc2d10)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#44 socketNotifierSourceDispatch (source=0xcc2d10) at kernel/qeventdispatcher_glib.cpp:110
#45 0x00007faf58554bbe in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#46 0x00007faf58558588 in ?? () from /lib/libglib-2.0.so.0
#47 0x00007faf585586b0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#48 0x00007faf5b69c1a6 in QEventDispatcherGlib::processEvents (this=0xc2f040, flags=<value optimized out>)
    at kernel/qeventdispatcher_glib.cpp:327
#49 0x00007faf596b84be in QGuiEventDispatcherGlib::processEvents (this=0xcb6e9c, flags=<value optimized out>)
    at kernel/qguieventdispatcher_glib.cpp:202
#50 0x00007faf5b672532 in QEventLoop::processEvents (this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:149
#51 0x00007faf5b672904 in QEventLoop::exec (this=0x7fff9cf38200, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:201
#52 0x00007faf5b674ab9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#53 0x00007faf4fa37cfb in kdemain (argc=<value optimized out>, argv=<value optimized out>) at ../../kded/kded.cpp:936
#54 0x0000000000406da8 in launch (argc=1, _name=<value optimized out>, args=<value optimized out>,
    cwd=<value optimized out>, envc=0, envs=<value optimized out>, reset_env=false, tty=0x0, avoid_loops=false,
    startup_id_str=0x40a299 "0") at ../../kinit/kinit.cpp:677
#55 0x0000000000408cc0 in main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>)
    at ../../kinit/kinit.cpp:1740
Comment 9 Greg Lepore 2010-01-08 15:33:54 UTC
Just upgraded to (KDE 4.3.85 (KDE 4.4 Beta2)) and this problem appears to have been fixed, I was able to work on the menu with no hang-ups.
Comment 10 Jekyll Wu 2012-07-30 11:20:34 UTC
OK, close it as fixed according to comment #9. I don't have such issue using KDE SC 4.9, either.
Comment 11 Sergio 2013-07-22 16:21:47 UTC
Please reopen. This is not fixed as it happens regularly in 4.10.5
Comment 12 Christoph Feck 2013-08-11 12:30:11 UTC
Sergio, it does not hang here. Could you ask in a forum how to debug the issue on your system? According to previous comments, It might be related to kded4 or other components using D-Bus.

If there is indeed a bug, please report it separately.