By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 1081

Summary: Disabling the menu search field causes a crash when using Alt-F1/Esc keyboard shortcuts
Product: TDE Reporter: Darrell <darrella>
Component: tdebaseAssignee: Slávek Banko <slavek.banko>
Status: RESOLVED FIXED    
Severity: critical CC: bugwatch, darrella, slavek.banko
Priority: P1    
Version: R14.0.0 [Trinity]   
Hardware: Other   
OS: Other   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Proposed one-line patch

Description Darrell 2012-07-04 17:42:35 CDT
When the menu search bar is disabled (Configure Panel->Menus->Show search field in TDE Menu), using the keyboard shortcuts Alt-F1 and Esc causes a crash. Sometimes the kicker disappears, which can be restored by a veteran TDE user by pressing Alt-F2 and typing kicker.

Paper cut candidate.

To duplicate:

* Disable the menu search field.
* Press Alt-F1 to open the menu.
* Press Esc to cancel the menu.

A backtrace is included:

[Thread debugging using libthread_db enabled]
[KCrash handler]
#5  TQLineEdit::text (this=0x790073) at widgets/qlineedit.cpp:474
#6  0xb5d03a0d in PanelKMenu::keyPressEvent (this=0x8131a38, e=0xbfe022bc)
    at /dev/shm/tdebase/kicker/kicker/ui/k_mnu.cpp:717
#7  0xb664db15 in TQWidget::event (this=0x8131a38, e=0xbfe022bc)
    at kernel/qwidget.cpp:4771
#8  0xb65b243d in TQApplication::internalNotify (this=0x80b0a00, 
    receiver=0x8131a38, e=0xbfe022bc) at kernel/qapplication.cpp:2638
#9  0xb65b3932 in TQApplication::notify (this=0x80b0a00, receiver=0x8131a38, 
    e=0xbfe022bc) at kernel/qapplication.cpp:2395
#10 0xb6b6d5ad in KApplication::notify (this=0x80b0a00, receiver=0x8131a38, 
    event=0xbfe022bc) at /dev/shm/tdelibs/tdecore/kapplication.cpp:583
#11 0xb6543ad5 in TQApplication::sendSpontaneousEvent (this=0x8131a38, 
    event=0xbfe0256c, grab=false) at kernel/ntqapplication.h:526
#12 TQETWidget::translateKeyEvent (this=0x8131a38, event=0xbfe0256c, 
    grab=false) at kernel/qapplication_x11.cpp:5716
#13 0xb654b3d9 in TQApplication::x11ProcessEvent (this=0x80b0a00, 
    event=0xbfe0256c) at kernel/qapplication_x11.cpp:3573
#14 0xb655f432 in TQEventLoop::processEvents (this=0x80bc028, flags=4)
    at kernel/qeventloop_x11.cpp:195
#15 0xb65cab0b in TQEventLoop::enterLoop (this=0x80bc028)
    at kernel/qeventloop.cpp:201
#16 0xb65b2a31 in TQApplication::enter_loop (this=0x80b0a00)
    at kernel/qapplication.cpp:2796
#17 0xb6724b15 in TQPopupMenu::exec (this=0x8131a38, pos=..., indexAtPoint=0)
    at widgets/qpopupmenu.cpp:2494
#18 0xb5bf65ba in PanelPopupButton::slotExecMenu (this=0x815a4d0)
    at /dev/shm/tdebase/kicker/libkicker/panelbutton.cpp:1051
#19 0xb5bf665e in PanelPopupButton::showMenu (this=0x815a4d0)
    at /dev/shm/tdebase/kicker/libkicker/panelbutton.cpp:1029
#20 0xb5c9a8f3 in MenuManager::kmenuAccelActivated (this=0x8139128)
    at /dev/shm/tdebase/kicker/kicker/core/menumanager.cpp:197
#21 0xb5c9cb98 in MenuManager::tqt_invoke (this=0x8139128, _id=3, 
    _o=0xbfe027e8)
    at /dev/shm/tdebase.build/kicker/kicker/core/menumanager.moc:90
#22 0xb6c23a29 in KGlobalAccelPrivate::activate (this=0x81398c0, 
    pAction=0x8137e48, seq=...)
    at /dev/shm/tdelibs/tdecore/kglobalaccel_x11.cpp:423
#23 0xb6c256d8 in KGlobalAccelPrivate::x11KeyPress (this=0x81398c0, 
    pEvent=0xbfe02cfc) at /dev/shm/tdelibs/tdecore/kglobalaccel_x11.cpp:391
#24 0xb6c264b4 in KGlobalAccelPrivate::x11Event (this=0x81398c0, 
    pEvent=0xbfe02cfc) at /dev/shm/tdelibs/tdecore/kglobalaccel_x11.cpp:256
#25 0xb6b6a421 in KAppX11HackWidget::publicx11Event (this=0x80b0a00, 
    _event=0xbfe02cfc) at /dev/shm/tdelibs/tdecore/kapplication.cpp:1782
#26 KApplication::x11EventFilter (this=0x80b0a00, _event=0xbfe02cfc)
    at /dev/shm/tdelibs/tdecore/kapplication.cpp:2109
#27 0xb653c83c in qt_x11EventFilter (ev=0xbfe02cfc)
    at kernel/qapplication_x11.cpp:422
#28 0xb654ad32 in TQApplication::x11ProcessEvent (this=0x80b0a00, 
    event=0xbfe02cfc) at kernel/qapplication_x11.cpp:3422
#29 0xb655f432 in TQEventLoop::processEvents (this=0x80bc028, flags=4)
    at kernel/qeventloop_x11.cpp:195
#30 0xb65cab0b in TQEventLoop::enterLoop (this=0x80bc028)
    at kernel/qeventloop.cpp:201
#31 0xb65ca9a4 in TQEventLoop::exec (this=0x80bc028)
    at kernel/qeventloop.cpp:148
#32 0xb65b2ac1 in TQApplication::exec (this=0x80b0a00)
    at kernel/qapplication.cpp:2761
#33 0xb5c6e3ea in kdemain (argc=1, argv=0x80a6510)
    at /dev/shm/tdebase/kicker/kicker/core/main.cpp:151
#34 0xb77386a4 in tdeinitmain (argc=1, argv=0x80a6510)
    at /dev/shm/tdebase.build/kicker/kicker/kicker_tdeinit_module.cpp:3
#35 0x0804e461 in launch (argc=<value optimized out>, 
    _name=<value optimized out>, args=<value optimized out>, cwd=0x0, envc=0, 
    envs=0x805f62f "", reset_env=false, tty=0x0, avoid_loops=false, 
    startup_id_str=0x80540c6 "0") at /dev/shm/tdelibs/kinit/kinit.cpp:673
#36 0x0804f191 in handle_launcher_request (sock=9)
    at /dev/shm/tdelibs/kinit/kinit.cpp:1240
#37 0x0804f89e in handle_requests (waitForPid=<value optimized out>)
    at /dev/shm/tdelibs/kinit/kinit.cpp:1443
#38 0x08050db0 in main (argc=5, argv=0xbfe03644, envp=0xbfe0365c)
    at /dev/shm/tdelibs/kinit/kinit.cpp:1909
Comment 1 Slávek Banko 2012-07-04 18:10:37 CDT
Although it is unpleasant, I must confirm the same behavior in 3.5.13.1. No matter what way is used to open the menu (keyboard, mouse), it is important to close menu using Esc.

For 3.5.13.1 I consider this bug as a blocker.
Comment 2 Timothy Pearson 2012-07-04 18:18:41 CDT
Probably tdebase/kicker/kicker/ui/k_mnu.cpp needs to have a check placed in PanelKMenu::keyPressEvent to bypass the search handler code if the search widget is disabled.
Comment 3 Darrell 2012-07-05 11:56:53 CDT
I did not tag this bug a Blocker because the system remains usable with work-arounds. I'll compromise with you and bump to Critical (I agree the bug is unpleasant). :-)
Comment 4 Darrell 2012-07-05 22:38:48 CDT
I don't know whether I'm on the right track, but I tried the following patch, to no avail. Kicker/Panel still crashes when pressing the Esc key and the search bar is disabled.

diff -urN tdebase/kicker/kicker/ui/k_mnu.cpp tdebase.new/kicker/kicker/ui/k_mnu.cpp
--- tdebase/kicker/kicker/ui/k_mnu.cpp	2012-06-03 21:58:56.000000000 -0500
+++ tdebase.new/kicker/kicker/ui/k_mnu.cpp	2012-07-05 21:56:44.000000000 -0500
@@ -707,23 +707,25 @@
     // here and there. This sucks badly for many non-us
     // keyboard layouts, but for the sake of consistency
     // we follow konqueror.
-    if (!searchEdit) return KPanelMenu::keyPressEvent(e);
+    if (KickerSettings::useSearchBar()) {
+      if (!searchEdit) return KPanelMenu::keyPressEvent(e);

-    if (e->key() == TQt::Key_Slash && !searchEdit->hasFocus()) {
-        if (indexOf(searchLineID) >=0 ) {
-            setActiveItem(indexOf(searchLineID));
-        }
-    }
-    else if (e->key() == TQt::Key_Escape && searchEdit->text().isEmpty() == false) {
-        searchEdit->clear();
-    }
-    else if (e->key() == TQt::Key_Delete && !searchEdit->hasFocus() &&
-        searchEdit->text().isEmpty() == false)
-    {
-        searchEdit->clear();
-    }
-    else {
-        KPanelMenu::keyPressEvent(e);
+      if (e->key() == TQt::Key_Slash && !searchEdit->hasFocus()) {
+          if (indexOf(searchLineID) >=0 ) {
+              setActiveItem(indexOf(searchLineID));
+          }
+      }
+      else if (e->key() == TQt::Key_Escape && searchEdit->text().isEmpty() == false) {
+          searchEdit->clear();
+      }
+      else if (e->key() == TQt::Key_Delete && !searchEdit->hasFocus() &&
+          searchEdit->text().isEmpty() == false)
+      {
+          searchEdit->clear();
+      }
+      else {
+          KPanelMenu::keyPressEvent(e);
+      }
     }
 }
Comment 5 Slávek Banko 2012-07-07 09:20:15 CDT
Created attachment 703 [details]
Proposed one-line patch

Instead of your larger patche I tried to prepare a small one-line patch.
And it seems that it works. Please try. :)
Comment 6 Darrell 2012-07-07 12:31:48 CDT
I tested the patch tested with the GIT sources. Yay! Good job. Thank you!

Please push to GIT. :-)
Comment 7 Slávek Banko 2012-07-07 12:45:20 CDT
Fixed in GIT hash 0afb2d8a