regression: context menu disappears after a tab is closed with ^D

Bug #713147 reported by Andrew Kohlsmith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
konsole
Fix Released
Medium
konsole (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: kdebase

10.10 Konsole did not have this issue, but 11.04's konsole has had the bug in all updates.

It is a regression of this KDE bug: https://bugs.kde.org/show_bug.cgi?id=185466

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: konsole 4:4.6.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-1.28-generic 2.6.38-rc2
Uname: Linux 2.6.38-1-generic x86_64
Architecture: amd64
Date: Fri Feb 4 10:12:28 2011
InstallationMedia: Kubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LANGUAGE=
SourcePackage: kdebase

Revision history for this message
In , A-null (a-null) wrote :

Version: 2.2 (using KDE 4.2.0)
OS: Linux
Installed from: Ubuntu Packages

This happens after using konsole for an hour or two and doesn't work in all the tabs of the window !!
If a new konsole is opened it works fine.
Looks very strange though.

Thanks a lot...

Revision history for this message
In , Krenar Qehaja (kedadi) wrote :

I can confirm it. I was struggling for the few days on figuring out what caused it, as it bugged me for quiet some time now, and hopefully I can guide you to reproduce it.

I usually use Konsole with lots of tabs, and on one of them I ssh on my server all the time, and for whatever reason the connection with the server interrupts (network change, laptop suspend/resume), it doesn't disconnect (how it should) but just freezes (not an UI freeze but the ssh session becomes unresponsive [maybe I should report a new bug for this if nobody has done it yet]). So when this happens, the right-click context menu disappears on all tabs, and just a fresh Konsole start fixes it.

So, Musthafa, is your case related to ssh in any way, as I described?

Thanks.

p.s: Keep on the great work Konsole Devs, you've done a really good job, especially with the KDE4 port.

Revision history for this message
In , A-null (a-null) wrote :

I am now able to reproduce the bug, thanks to Krenar. Following are the steps to reproduce it.

1) Open two tabs
2) ssh to a server in one tab (lets say tab A)
3) Disconnect the connection abruptly (turn off the wireless/network)
4) Now the tab A will be frozen, no keys will work (it should be a bug i think). But the right click context menu will work !
5) Close tab A. A confirmation dialog box with a warning message will appear "The program 'ssh' is currently running in this session. Are you sure you want to close it?"
6) On clicking Yes in the confirmation dialog box, the tab will be closed.
7) After that Right click context menu will not appear in any of the exiting or new tabs in the same window !

Thanks a lot...

Revision history for this message
In , Krenar Qehaja (kedadi) wrote :

Yes, you're right, the frozen tab has to be closed first, in order to make it disappear.

Revision history for this message
In , Michał Ziąbkowski (mziab) wrote :

Happens here too. Good to know someone was finally able to reproduce it. It seemed totally random to me.

Revision history for this message
In , A-null (a-null) wrote :

Hi, Any updates on this?

This issue is still there in Konsole Version 2.2.1 of KDE 4.2.1 in Kubuntu Jaunty.

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

I haven't had any time to look at this. But really, you have to have a ssh disconnect and then close that tab. You'll have to avoid doing this until someone can fix it.

Revision history for this message
In , A-null (a-null) wrote :

I still encounter this problem (konsole freeze & no right-click) frequently.
In our country there are frequent power cuts. So the network connection gets disconnected, without any proper ssh disconnect.
But in my laptop, the konsole window/tab where the ssh connection was opened hangs forever. If I close that tab, then right click doesn't work in that whole window.

Now, I am used to creating a new window for each ssh connection !!
But I would still like to see this fixed soon, as I really miss the tabs feature.

Thanks a lot...

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

*** Bug 190963 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Sami Remes (sami-remes) wrote :

*** This bug has been confirmed by popular vote. ***

Revision history for this message
In , dogganos (gpall) wrote :

In my version (debian testing - 4.2.4, konsole version 2.2.3) I never have a context menu! That is, I right click down on the tabs and absolutely nothing happens. So if I want to detach the tab, or close it, I have to do it from the menus which is a step back regarding the previous function with the context menu...

Revision history for this message
In , James Reno (jameno123) wrote :

Confirmed here as well - Mandriva 2009.1.

NOTE: It does not matter 'what' program is opening, opening two tabs one running a simple nano editor, and closing the tab without closing nano, will break it as well... if that confirmation dialog box pops up -- right click is broken.

Revision history for this message
In , Pprkut (pprkut) wrote :

still valid for kde 4.3.1

Revision history for this message
In , Psychonaut (psychonaut) wrote :

The lack of a context menu for konsole tabs is addressed in a separate bug report: Bug 153376

Revision history for this message
In , James Reno (jameno123) wrote :

Re: #13/Tristan

While *I believe* that bug was valid in previous release the context menu IS currently available and should work properly. The bug you link to stipulates that the context menu does not exist... In the current version it does - its just buggy. As such, I believe that these are two totally separate bug reports while having common ground -- they are not the same report and do not report the same problem.

The context menu in the current KDE release is in existence and does work fully and properly - UNTIL - the dialog pops up asking if you want to close the unresponsive program.

This is not a feature-request, as the other, but instead is a FIX-request as the feature exists but has a broken component and/or some sort of data corruption which needs fixed.

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Thanks to #11 I can reproduce this issue. Tested w/ nano and vim.

Revision history for this message
In , Dhaval Patel (dhuv) wrote :

I can confirm this same problem with SSH disconnect. I am using 4.3.2 on Kubuntu Karmic.

Is anyone even working on this bug?
Can we expect a fix soon?
Does anyone know of a workaround for the time being?

Revision history for this message
In , Thiago Coutinho (thiagoc) wrote :

+1

Revision history for this message
In , Thiago Coutinho (thiagoc) wrote :

It's impossible use konsole in full screen with this bug.

Revision history for this message
In , john (john-r-bond) wrote :

I also suffer from this problem. This manly happens when i logout of certain ssh sessions mainly to cisco, procurve or splat kit. issuing exit appears to logout however the console window just hangs. after this the context menu is gone.
Arch 2.6.31-ARCH

Revision history for this message
In , Sami Remes (sami-remes) wrote :

The bug still exists with KDE 4.4.1.

Revision history for this message
In , Vsevolod Krishchenko (mstu) wrote :

Still here in 4.4.2.

Revision history for this message
In , Panagiotis Papadopoulos (pano-90) wrote :

I've got this issue too in 4.4.3. :-)

Revision history for this message
In , xxtjaxx (xxtjaxx) wrote :

Ok having had a look at the evil processor of this bug it appears to be in SessionController.cpp in the function showDisplayContextMenu(QPoint).
At first it tries to check if there is a KXMLGuiFactory for this KXMLGuiClient even though this(SessionController) seems not to be derived from KXMLGuiClient or anything like it.
SessionController is based on ViewProperties which is derived from QObject. Thus I wonder how on earth it worked in the first place that you could simply call factory() and not get an 'unknown' as answer from the compiler(!).
I'm working on it though not a konsole dev if anyone of the participants in this discussion can explain it to me why above mentioned worked befor, I would be very very happy.

Revision history for this message
In , xxtjaxx (xxtjaxx) wrote :

Allright I tried to work on this and finally got a patch together that would fix this issue. I doubt that its the prettiest solution ever made but apparently this is whats needed to do to fix it. If you have suggestions to make this fix more obvious or elegant please tell me.
Diff is attached.

Cheers,

Andreas

Revision history for this message
In , xxtjaxx (xxtjaxx) wrote :

Created attachment 47717
Patch to fix the bug

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Created attachment 47780
Patch to enable context menu

A cleaner patch - the root cause of this issue still needs to be researched.

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Both these patches have serious issues. They mess up the top menus and print 'no text' in the upper left corner of the terminal.

Something else will have to be done.

Revision history for this message
In , Bugs-kde-2 (bugs-kde-2) wrote :

This bug is still present for me on KDE-4.5.3.
Right now a simple [ctrl]+[d] (aka exit) in a ssh session
leads to a non-functional rightclick/popup menu.

As asked before: Is anybody actually working on this?

Revision history for this message
In , Bugs-kde-2 (bugs-kde-2) wrote :

Looks like there are more people having this problem,
perhaps somebody could mark these reports as dupes.

https://bugs.kde.org/show_bug.cgi?id=199874
https://bugs.kde.org/show_bug.cgi?id=238342
https://bugs.kde.org/show_bug.cgi?id=248135

Revision history for this message
In , Panagiotis Papadopoulos (pano-90) wrote :

*** Bug 199874 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Panagiotis Papadopoulos (pano-90) wrote :

*** Bug 238342 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Panagiotis Papadopoulos (pano-90) wrote :

*** Bug 248135 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ismail-f (ismail-f) wrote :

I can reproduce this with KDE SC 4.6 beta1.

Revision history for this message
In , Pentarh Udi (pentarh) wrote :

Fedora 14, kdebase-4.5.3-1.fc14.x86_64.rpm still has this issue.

Revision history for this message
In , xxtjaxx (xxtjaxx) wrote :

Hi!

One thing concerning this bug really caught my eye recently. Most of the sessions you have in those tabs are called "Shell" or "Shell 2" depending on, how often you opened a new one.

_This_ title (terminfo?) changes when a user starts a nano session or something else that can change the terminfo-data.

Just a suggestion. Though worth looking at.

Revision history for this message
In , WoLpH (rick-van-hattem) wrote :

It's still broken.

Here's an easy way to reproduce the bug.
1. open konsole
2. open an extra tab
3. press ctrl+d in the new tab
4. the context menu is now broken

One workaround is to open a new konsole and drag all the tabs to that instance. But every time you close a tab with ctrl+d the context menu stops functioning.

Revision history for this message
In , 8ppbr-kde-gj5dy (8ppbr-kde-gj5dy) wrote :

Hmm, I didn't yet notice it's related to ctrl-D. But yes, that's what I use often to close idle consoles :-) Just tried and I can confirm that seems to be the reason.

Thanks for finding out the details to reproduce this. Should hopefully get us closer towards a solution imho ...

Revision history for this message
In , csslayer (wengxt) wrote :

It seems that after any tab is closed, the context menu will disappeared.
Ctrl + D is just a way to end the stdin for bash, so the tab is closed.

Revision history for this message
In , Cfeck (cfeck) wrote :

Really wired.

Ctrl-D: bug
typing "exit": bug
Context menu > "Close Tab": bug
Tab bar "Close" button: works (!?)

I have to remember to close tabs using the tab button :)

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Created attachment 56337
Patch that appears to fix this issue.

If anyone can try this patch and let me know of any issues.

Revision history for this message
In , csslayer (wengxt) wrote :

I recompiled kdebase and found it works! Seems no problem right now.

Thanks very much!

Revision history for this message
In , Michał Ziąbkowski (mziab) wrote :

Applied the patch. The bug seems to be fixed and I've yet to see any defects :) Much obliged.

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

SVN commit 1216490 by hindenburg:

Fix issue where the context menu popup no longer appeared after closing a tab.

BUG: 185466

 M +2 -0 MainWindow.cpp
 M +1 -1 MainWindow.h
 M +4 -0 ViewManager.cpp
 M +6 -0 ViewManager.h

WebSVN link: http://websvn.kde.org/?view=rev&revision=1216490

Revision history for this message
In , Ivo Anjo (knuckles) wrote :

Thanks a lot for solving this. Can't wait for this fix to arrive!

Is it possible to get it backported to 4.5? And I see the commit was made to trunk -- will 4.6 also contain this fix?

Again, thanks. This bug has been driving me crazy :)

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

It will be in KDE 4.7, 4.6.1 - I don't think there will be anymore 4.5 releases although I could commit the fix.

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

*** Bug 218389 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

There is a regression:

* Open fresh Konsole
* Open a new tab with Ctrl+Shift+T
* Close the new tab with "Tab Close" button in the tab bar
* Right click on the remaining tab

-> An odd "No text" menu bar appears at the top-left corner of Konsole display.

Revision history for this message
In , Cfeck (cfeck) wrote :

Sorry, that wasn't clear, fourth step is:

* Right click into display of the remaining tab

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

SVN commit 1216575 by hindenburg:

Handle when tabs are closed via the close tab button on tab bar.

CCBUG: 185466

 M +2 -0 ViewManager.cpp

WebSVN link: http://websvn.kde.org/?view=rev&revision=1216575

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

The latest patch in #49 was an attempt to fix this issue when using the close tab button on the tab bar. However, that patch causes the menu to become messed up. It will take some more work.

Exiting tabs all other ways appear to work.

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

SVN commit 1217498 by hindenburg:

Disable tab close methods until the issue of menu being trashed can be resolved.

CCBUG: 185466

 M +4 -3 ViewContainer.cpp

WebSVN link: http://websvn.kde.org/?view=rev&revision=1217498

Revision history for this message
Andrew Kohlsmith (akohlsmith) wrote :
Revision history for this message
In , Akohlsmith-kde (akohlsmith-kde) wrote :

This bug does not appear to have anything to do with the "close tab" button; I can make the problem occur with a normal ^D to log out of the shell in the tab (which closes the tab).

I'm running Ubuntu 11.04, upgraded from 10.10. The bug was NOT in 10.10, but rather it appeared when I updated to 11.04. There have been a few updates to the kdebase package in 11.04 but none have corrected this bug.

Revision history for this message
In , Ivo Anjo (knuckles) wrote :

(In reply to comment #52)
> This bug does not appear to have anything to do with the "close tab" button; I
> can make the problem occur with a normal ^D to log out of the shell in the tab
> (which closes the tab).

That part of the bug is fixed, but the fix causes the close tab regression. The fix is supposed to be on KDE 4.6.1, so if you're running on stable packages, you'll have to wait for it to be released.

Revision history for this message
In , Akohlsmith-kde (akohlsmith-kde) wrote :

Ok; I'm happy to wait, I just wanted to make sure it was addressed (reading the bug log did not make it clear to me that the ^D part was indeed fixed) -- Thank you for the clarification!

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Git commit e52b6b0ac0292abdf654e4fb408fd501542c02fa by Kurt Hindenburg.
Committed on 05/02/11 at 22:00.
Pushed by hindenburg into branch 'KDE/4.6'.

Disable tab close methods until the issue of menu being trashed can be
resolved.

Backport to 4.6 branch.
CCBUG: 185466

M +3 -2 src/ViewContainer.cpp

http://commits.kde.org/konsole/e52b6b0ac0292abdf654e4fb408fd501542c02fa

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Git commit 18dd5bd012dae86b118c7b7a132866c0c7781297 by Kurt Hindenburg.
Committed on 05/02/11 at 21:58.
Pushed by hindenburg into branch 'KDE/4.6'.

Fix issue where the context menu popup no longer appeared after closing
a tab.

Backport to 4.6 branch.
CCBUG: 185466

M +2 -0 src/MainWindow.cpp
M +1 -1 src/MainWindow.h
M +4 -0 src/ViewManager.cpp
M +6 -0 src/ViewManager.h

http://commits.kde.org/konsole/18dd5bd012dae86b118c7b7a132866c0c7781297

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 265706 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ingmar Vanhassel (ingmar) wrote :

I applied both the patches from #55 and #56 and these patches seem to break Ctrl + shift + w to close a tab.

Can anyone confirm?

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

re #58 - the shortcut works fine for me under trunk. What happens when you do it?

Revision history for this message
In , BRULE Herman (alpha-one-x86) wrote :

re #59, re read the threads, the problem is not the shortcut, it's this action break the menu on right click.

Revision history for this message
In , Ingmar Vanhassel (ingmar) wrote :

@ Kurt:
Sorry, I meant to add that I applied those 2 patches on our 4.4.0 packages. Am I missing a patch?
I'm just making sure that this will be fixed in 4.4.1. :)

Revision history for this message
In , Dhaval Patel (dhuv) wrote :

Ingmar, you mean 4.6.1? By the way, when is that scheduled to come out?

Revision history for this message
In , Ingmar Vanhassel (ingmar) wrote :

Yes, I meant 4.6.1 :/. tagged 24/2, released 1/3.

Revision history for this message
In , X-wstephenson (x-wstephenson) wrote :

Fix has been backported to openSUSE KDE:Distro:Factory 4.6.0 packages.

Revision history for this message
In , Karoly Negyesi (karoly) wrote :

I am on 4:4.5.3-0ubuntu1~lucid1~ppa1 and the bug affects me. Any chance of a fix?

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

*** Bug 267651 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Vincent Batts (vbatts) wrote :

I've confirmed this patch fixes the issue on KDE-4.5.5

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Git commit 467fb1edcbc53081de348251cef490ed5002fa3b by Kurt Hindenburg.
Committed on 05/04/2011 at 17:11.
Pushed by hindenburg into branch 'master'.

Restore 'Close Tab' on the tab context menu and the close tabbar button.

These 2 options were disabled due to they messed up the menu texts
after the fix for bko 185466.
The close method via dbus has been disabled as it causes menu issues.

Most of patch to fix 'Close Tab' by Albert Astals Cid <email address hidden>
BUG: 267896
CCBUG: 185466
FIXED-IN: 4.6.3

M +2 -1 src/Session.h
M +7 -14 src/ViewContainer.cpp
M +1 -1 src/ViewContainer.h
M +13 -0 src/ViewManager.cpp
M +2 -0 src/ViewManager.h

http://commits.kde.org/konsole/467fb1edcbc53081de348251cef490ed5002fa3b

Revision history for this message
In , Dhaval Patel (dhuv) wrote :

Is it too late for this change to make it into 4.6.2?

Revision history for this message
In , Rakuco-h (rakuco-h) wrote :

Yes, 4.6.2 was tagged a few days ago, and should be out really soon.

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Git commit 05367a7e7463435e7b0a50827875f6dd6ee1940c by Kurt Hindenburg.
Committed on 09/04/2011 at 22:10.
Pushed by hindenburg into branch 'KDE/4.6'.

Restore 'Close Tab' on the tab context menu and the close tabbar button.

These 2 options were disabled due to they messed up the menu texts
after the fix for bko 185466.
The close method via dbus has been disabled as it causes menu issues.

Most of patch to fix 'Close Tab' by Albert Astals Cid <email address hidden>
CCBUG: 267896
CCBUG: 185466
FIXED-IN: 4.6.3
CCMAIL: <email address hidden>
(cherry picked from commit 467fb1edcbc53081de348251cef490ed5002fa3b)

M +2 -1 src/Session.h
M +6 -13 src/ViewContainer.cpp
M +1 -1 src/ViewContainer.h
M +13 -0 src/ViewManager.cpp
M +2 -0 src/ViewManager.h

http://commits.kde.org/konsole/05367a7e7463435e7b0a50827875f6dd6ee1940c

affects: kdebase (Ubuntu) → konsole (Ubuntu)
Changed in konsole:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Harald Sitter (apachelogger) wrote :

Closing in favor of upstream report, this issue ultimately needs to be resolved in Konsole directly rather than Kubuntu.

Changed in konsole (Ubuntu):
status: New → Invalid
Revision history for this message
In , adaptee (adaptee) wrote :

I think this problem has been fixed for quite some time. Feel free to reopen or leave comment if this still happens in recent version of KDE SC.

Changed in konsole:
status: Confirmed → Fix Released
Revision history for this message
In , Bart (bart-swennen) wrote :

Using plasma 5.2.2 (KDE frameworks 5.8):
when I select some text and right click on it, the context menu disappears and the entire Konsole window freezes.
The freeze on right-click does not happen when I haven't selected any text.

Revision history for this message
In , Trefoils (trefoils) wrote :

I'm experiencing the same thing with konsole 2.14.2, kde 4.14.8.
No extra tabs or running programs are needed, it all happens with a plain new session on a single tab.
It doesn't freeze if there is no selection or if the selected text consists of whitespaces only.
With nontrivial text it freezes temporarily for about 3 minutes, after which it unfreezes and the menu works perfectly ever after. It also works on other instances of konsole opened after the first one unfreezed, or on other tabs, but freezes again in yakuake. If I kill all instances of konsole and open a new one the whole story repeats itself.
Another thing I found out while experimenting is that the freeze does _not_ happen when kded4 is not running - e.g. if I kill it before making the selection.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.