Klipper crashes when any modifier key (with the exception of ALT) is pressed. This is because it enters into an infinite recursion. This happens because Klipper popup delegates all events to its input field. The input field does not consume the event, so it is propagated to the parent widget, which is the popup. The popup tries to send the event to the input field again. Reproducible: Always Steps to Reproduce: 1. Open the Klipper popup (Using the shortcut) 2. Press Shift 3. Actual Results: Klipper crashes Expected Results: Klipper does not crash. Since klipper is now part of plasma, this bug kills the entire shell
Created attachment 90465 [details] Proposed Patch This patch fixes the problem
Thanks for directly adding a patch :-) I wish all bug reports were that easy. Small suggestion on the patch: use a local static variable for the recursion check. Something like: void KlipperPopup::keyPressEvent( QKeyEvent* e ) { static QEvent *s_recursionCheck = nullptr; if (s_recursionCheck == e) { s_recursionCheck = nullptr; return; } s_recursionCheck = e; ... And may I ask to upload the patch to git.reviewboard.kde.org?
I really wanted to attach it to the review board, but it seems horribly slow. In addition, when I try to attach the diff it simply stays there forever. Exporting from Kdevelop causes an error as well. As for the static, I prefer to avoid static variables. The variable s_recursionCheck is shared among all instances of KlipperPoppup. It may be the case that there is only one instance of the popup available at any given time, but that may change in the future. In general, I prefer to avoid statics if possible. Having said that, since I am a "guest" I'll change it to use the static variable. Is there any documentation on how I am supposed to use the review board? It is either broken, or it is very fragile and I am doing something wrong. I get a internal server error (500) when uploading my diff. That should never happen
OK, finally managed to add the review using the rbt tooling. Review on https://git.reviewboard.kde.org/r/122106/
Git commit c01ab8aa2a7e2b2deefea34950650daf57030673 by David Edmundson, on behalf of Filip Wieladek. Committed on 17/01/2015 at 14:31. Pushed by davidedmundson into branch 'master'. Fix the infinite event recursion in the klipper popup. Klipper crashes when any modifier key (with the exception of ALT) is pressed. This is because it enters into an infinite recursion. This happens because Klipper popup delegates all events to its input field. The input field does not consume the event, so it is propagated to the parent widget, which is the popup. The popup tries to send the event to the input field again. Since klipper is now part of plasma, this bug kills the entire shell REVIEW: 122106 M +13 -2 klipper/klipperpopup.cpp M +5 -0 klipper/klipperpopup.h http://commits.kde.org/plasma-workspace/c01ab8aa2a7e2b2deefea34950650daf57030673
Git commit cc6216a3f514d6696a884bb5b6617d62c3702d7f by David Edmundson, on behalf of Filip Wieladek. Committed on 17/01/2015 at 14:31. Pushed by davidedmundson into branch 'Plasma/5.2'. Fix the infinite event recursion in the klipper popup. Klipper crashes when any modifier key (with the exception of ALT) is pressed. This is because it enters into an infinite recursion. This happens because Klipper popup delegates all events to its input field. The input field does not consume the event, so it is propagated to the parent widget, which is the popup. The popup tries to send the event to the input field again. Since klipper is now part of plasma, this bug kills the entire shell REVIEW: 122106 M +13 -2 klipper/klipperpopup.cpp M +5 -0 klipper/klipperpopup.h http://commits.kde.org/plasma-workspace/cc6216a3f514d6696a884bb5b6617d62c3702d7f