Bug 155196 - klipper breaks if i have enough entries to make "More >" sub-menu visible
Summary: klipper breaks if i have enough entries to make "More >" sub-menu visible
Status: RESOLVED FIXED
Alias: None
Product: klipper
Classification: Unclassified
Component: general (show other bugs)
Version: 4.0
Platform: Compiled Sources Linux
: NOR crash with 40 votes (vote)
Target Milestone: ---
Assignee: Esben Mose Hansen
URL:
Keywords:
: 156617 156996 163471 167137 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-06 19:15 UTC by Pavel Volkovitskiy
Modified: 2008-07-21 14:57 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (3.38 KB, text/plain)
2008-01-06 19:30 UTC, Simon St James
Details
Klipper.png (399.41 KB, image/png)
2008-03-20 12:55 UTC, Monkey 9
Details
klipper2.png (199.87 KB, image/png)
2008-03-20 13:10 UTC, Monkey 9
Details
Klipper3.png (160.28 KB, image/png)
2008-03-20 13:11 UTC, Monkey 9
Details
klipper crash backtrace (4.70 KB, application/octet-stream)
2008-06-25 12:26 UTC, tim taylor
Details
patch that fixes it (1.77 KB, patch)
2008-07-19 09:44 UTC, Sebastian Sauer
Details
patch that fixes it, 2th try (2.08 KB, patch)
2008-07-19 11:59 UTC, Sebastian Sauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Volkovitskiy 2008-01-06 19:15:47 UTC
Version:           4.0 (using KDE Devel)
Installed from:    Compiled sources

to reproduce: you need to have enough clipboard entries to make "More>" menu visible
(in my case it's about 30)

if you have "More>" sub-menu, then pointing to it makes klipper exit with:
ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 384
Program exited with code 01.

if you have "More>" submenu, then cliciking on other entries will fill your clipboard history with "More" entries
if you click on "clear history" history will have "<empty clipboard>" as first entry and other entries after it
(ie it doesn't clean properly)

clicking on entries after cleaning cause messages like this "klipper(28703) History::slotMoveToTop: Argument pos out of range:  22"
Comment 1 Ömer Fadıl USTA 2008-01-06 19:25:50 UTC
I'm confirming this bug still exists
Comment 2 Simon St James 2008-01-06 19:30:34 UTC
Created attachment 22874 [details]
Backtrace

Backtrace.  I can see if I can generate one with Qt-debug symbols, if needed.

r757829, from branches/4.o
Comment 3 Pino Toscano 2008-01-25 01:41:31 UTC
*** Bug 156617 has been marked as a duplicate of this bug. ***
Comment 4 Urs Wolfer 2008-02-23 13:36:57 UTC
*** Bug 156996 has been marked as a duplicate of this bug. ***
Comment 5 Monkey 9 2008-03-20 12:53:31 UTC
Over here also, this bug exists, added a png.
Sorry, bug in koqueror prevents me to send the png, try it with FF.
Comment 6 Monkey 9 2008-03-20 12:55:50 UTC
Created attachment 23973 [details]
Klipper.png

Page in Konqueror is not displayed properly, as i see in FF.
Comment 7 Monkey 9 2008-03-20 12:58:57 UTC
KDE Version  v0.9.7 (KDE 4.00.66 (KDE 4.0.66 >= 20080313) "release 6.1", compiled sources)
Application  Cut &amp;amp; Paste History Utility
Operating System  Linux (x86_64) release 2.6.25-rc5-git3-6-default
Compiler  gcc

Misformed, sometimes 'full' screen, multiple same entrances, crashes every now and then.

Pasted some info from Konq.
Comment 8 Monkey 9 2008-03-20 13:10:02 UTC
Created attachment 23974 [details]
klipper2.png
Comment 9 Monkey 9 2008-03-20 13:11:00 UTC
Created attachment 23975 [details]
Klipper3.png
Comment 10 Monkey 9 2008-03-20 13:31:35 UTC
***  Bug 159303  has been marked as a duplicate of this bug. *** 
Comment 11 Matthew Woehlke 2008-05-15 21:15:02 UTC
Here, too. Confirming the bug...

Most interesting bits of my backtrace for people that don't want to open the attachment :-) (also because I have more debug info than the existing attachment). The index looks suspicious...

Application: Klipper (klipper), signal SIGABRT
#6  0x00002aaaab3f773c in qt_message_output (msgType=QtFatalMsg, 
    buf=0x7fff6ec960e0 "ASSERT failure in QList<T>::at: \"index out of range\", file /usr/local/qt4-copy/include/QtCore/qlist.h, line 393")
    at /usr/local/src/kde/svn/trunk/qt-copy/src/corelib/global/qglobal.cpp:2058
#7  0x00002aaaab3f784b in qFatal (
    msg=0x2aaaab53e2f8 "ASSERT failure in %s: \"%s\", file %s, line %d")
    at /usr/local/src/kde/svn/trunk/qt-copy/src/corelib/global/qglobal.cpp:2260
#8  0x00002aaaab3f7888 in qt_assert_x (where=0x2aaaaaad883e "QList<T>::at", 
    what=0x2aaaaaad882b "index out of range", 
    file=0x2aaaaaad8800 "/usr/local/qt4-copy/include/QtCore/qlist.h", 
    line=393)
    at /usr/local/src/kde/svn/trunk/qt-copy/src/corelib/global/qglobal.cpp:1836
#9  0x00002aaaaaad390a in QList<QAction*>::indexOf (this=0x189aaad883e, 
    t=@0x2aaaab3f7888, from=32767)
    at /usr/local/qt4-copy/include/QtCore/qlist.h:621
#10 0x00002aaaaaad4242 in PopupProxy::tryInsertItem (this=0x709ce0, 
    item=0x9b47d0, remainingHeight=@0x7fff6ec9836c, index=0)
    at /usr/local/src/kde/svn/trunk/kdebase/workspace/klipper/popupproxy.cpp:95
#11 0x00002aaaaaad43fe in PopupProxy::tryInsertItem (this=0x9a9af8, 
    item=0x200000000, remainingHeight=@0x100000000726a18, index=0)
    at /usr/local/src/kde/svn/trunk/kdebase/workspace/klipper/popupproxy.cpp:108
#12 0x00002aaaaaad4584 in PopupProxy::insertFromSpill (this=0x33874f39, 
    index=9)
    at /usr/local/src/kde/svn/trunk/kdebase/workspace/klipper/popupproxy.cpp:145
#13 0x00002aaaaaad45e3 in PopupProxy::insertFromSpill (this=0x2aaaab3fb53b, 
    index=32767)
    at /usr/local/src/kde/svn/trunk/kdebase/workspace/klipper/popupproxy.cpp:151
#14 0x00002aaaab50065b in QMetaObject::activate (sender=0x9b5eb0, 
    from_signal_index=27, to_signal_index=27, argv=0x0)
    at /usr/local/src/kde/svn/trunk/qt-copy/src/corelib/kernel/qobject.cpp:3007
#15 0x00002aaaab500abf in QMetaObject::activate (sender=0x9b5eb0, 
    m=0x2aaaac929360, local_signal_index=0, argv=0x0)
    at /usr/local/src/kde/svn/trunk/qt-copy/src/corelib/kernel/qobject.cpp:3080
#16 0x00002aaaac332392 in QMenu::aboutToShow (this=0x9b5eb0)
    at .moc/debug-shared/moc_qmenu.cpp:143
#17 0x00002aaaac3369f4 in QMenu::popup (this=0x9b5eb0, p=@0x7fff6ec987c0, 
    atAction=0x0)
    at /usr/local/src/kde/svn/trunk/qt-copy/src/gui/widgets/qmenu.cpp:1726
#18 0x00002aaaac337fda in QMenu::internalDelayedPopup (this=0x70c1f0)
    at /usr/local/src/kde/svn/trunk/qt-copy/src/gui/widgets/qmenu.cpp:2838
#19 0x00002aaaac339e0a in QMenu::timerEvent (this=0x70c1f0, e=0x7fff6ec99460)
    at /usr/local/src/kde/svn/trunk/qt-copy/src/gui/widgets/qmenu.cpp:2687
Comment 12 Esben Mose Hansen 2008-05-16 09:41:42 UTC
The index looks suspecious? How about this one:

remainingHeight= 0x7fff6ec9836c

As I recall, the remaining height is the number of pixels still available in the popup. Unless the reporter is using a nearby planet as a screen, I think we are seeing a corruption here.
Comment 13 Matthew Woehlke 2008-05-19 17:43:23 UTC
No planets, but I *do* have three Xinerama screens... I wonder if that might have anything to do with it? (My panel, systray, and therefore Klipper, is on the middle one, with all three laid out in a horizontal row.)

Maybe a few of the other people experiencing this could report if they are also using Xinerama?
Comment 14 Esben Mose Hansen 2008-05-20 08:24:04 UTC
If you can reproduce it with any regularity, and if you have the patience for it, and the ability....you could try to run it under valgrind, and attach the result here. It might well pinpoint the problem. If you have no idea what I am going on about, ignore me :)
Comment 15 Giacomo Montagner 2008-05-21 15:58:39 UTC
Hi, 
this happens to me too; I just tried limiting the history size to avoid the need of a "More >" menu (I set it to 20 entries), but klipper goes on storing entries even after the 20th. Then, the entries from the 21st on do not work, if I click on one of them another one gets selected instead. The "More >"  menu gets displayed even before it's necessary and appears multiple times along the history (as already pointed out in other reports before). 

When cleaning clipboard history the first entry becomes <empty clipboard> but some other entries remain (a lot of "More" and the entries which before exceeded the 20th-and-sould-be-last entry). 

When I finally click on "More >" (the one with the arrow on the right) it crashes: 
ASSERT failure in QList<T>::at: "index out of range", file /usr/include/QtCore/qlist.h, line 391

I'm using Fedora 9, klipper is v.0.9.7 on KDE 4.0.3

Cheers.
Comment 16 tom 2008-05-27 15:10:49 UTC
Adding myself to be informed about this bug. Same case with gcc; fc9 ; kde4.0.4.
Comment 17 Alexander Yustus 2008-06-16 16:15:29 UTC
I confirm this bug too, fc9 ; kde4.0.5

very annoying stuff as I use klipper intensively
Comment 18 tim taylor 2008-06-25 12:26:18 UTC
Created attachment 25593 [details]
klipper crash backtrace
Comment 19 tim taylor 2008-06-25 12:28:22 UTC
Comment on attachment 25593 [details]
klipper crash backtrace

I have it too :) ( :( )

hope my crash log could help
Comment 20 Divan Santana 2008-06-30 16:08:33 UTC
I also have this problem.
Its a huge bummer because klipper is an NB tool and doesn't work very well at all because of this.
Comment 21 Sebastian Sauer 2008-07-19 09:44:12 UTC
Created attachment 26251 [details]
patch that fixes it

attached patch fixes the assert (first item in a submenu) and a crash that
happens later (expired items).

Urs:
could you please review or take a quik look at the patch? I ask since the logs
say, that you are more into that part of the code then me :) thanks in advance.
Comment 22 Urs Wolfer 2008-07-19 10:57:00 UTC
Sebastian: After having a short look at it, it seems to look good. Nice to have this showstopper (for some people) fixed. :)
Comment 23 Urs Wolfer 2008-07-19 10:58:38 UTC
Sebastian: Btw, does it also fix #165154?
Comment 24 Urs Wolfer 2008-07-19 11:00:11 UTC
*** Bug 163471 has been marked as a duplicate of this bug. ***
Comment 25 tom 2008-07-19 11:11:06 UTC
would be great if you can let know how to apply the patch.
Comment 26 Sebastian Sauer 2008-07-19 11:59:10 UTC
Created attachment 26255 [details]
patch that fixes it, 2th try

Updated patch. the prev one still had probs with multiple "More" submenus.

and it does NOT fix bug #165154 :-/ though my backtrace looks like;

Application: Klipper (klipper), signal SIGSEGV
0x00007fb13533db50 in nanosleep () from /lib/libc.so.6
Thread 1 (Thread 0x7fb13a701780 (LWP 31048)):
[KCrash Handler]
#5  0x00007fb137be77dd in QFlags<Qt::WindowType>::operator&
(this=0x6c0070002f0080, f=Qt::WindowType_Mask) at
../../include/QtCore/../../src/corelib/global/qglobal.h:1941
#6  0x00007fb137be7816 in QWidget::windowType (this=0x72ee50) at
../../include/QtGui/../../src/gui/kernel/qwidget.h:884
#7  0x00007fb137c55a4b in QETWidget::translateMouseEvent (this=0x72ee50,
event=0x7fff42738480) at kernel/qapplication_x11.cpp:4084
#8  0x00007fb137c53520 in QApplication::x11ProcessEvent (this=0x7fff427388a0,
event=0x7fff42738480) at kernel/qapplication_x11.cpp:3133
#9  0x00007fb137c7f5e5 in x11EventSourceDispatch (s=0x629340, callback=0,
user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#10 0x00007fb134125262 in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#11 0x00007fb134128516 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0x00007fb1341289af in g_main_context_iteration () from
/usr/lib/libglib-2.0.so.0
#13 0x00007fb13992df5c in QEventDispatcherGlib::processEvents (this=0x619040,
flags=@0x7fff42738700) at kernel/qeventdispatcher_glib.cpp:325
#14 0x00007fb137c7edf7 in QGuiEventDispatcherGlib::processEvents
(this=0x619040, flags=@0x7fff42738760) at
kernel/qguieventdispatcher_glib.cpp:204
#15 0x00007fb1398fce84 in QEventLoop::processEvents (this=0x7fff42738820,
flags=@0x7fff427387e0) at kernel/qeventloop.cpp:149
#16 0x00007fb1398fd080 in QEventLoop::exec (this=0x7fff42738820,
flags=@0x7fff42738840) at kernel/qeventloop.cpp:196
#17 0x00007fb139900584 in QCoreApplication::exec () at
kernel/qcoreapplication.cpp:845

@tom:
download the patch, cd /your/source/dir/to/kdebase/workspace/klipper && patch
-p0 < /path/to/patchfile.patch && recompile
Comment 27 Sebastian Sauer 2008-07-20 07:42:09 UTC
fixed in trunk with r835199 and in the 4.1-branch with r835200.
see also bug #165154

that the top-level "More" menuitem jumps after clicking an item from the bottom-position to a position in the middle (or to be more exact all items displayed after it are not corrected cleared within the top-level menu) is another issue and not a regression of the commit above ;)

Thanks for the feedback!
Comment 28 Sebastian Sauer 2008-07-20 10:02:34 UTC
the in comment #27 named "jumps around" is fixed now too in trunk with r835208 and in the 4.1-branch with r835209.
Comment 29 Pino Toscano 2008-07-21 13:56:26 UTC
*** Bug 167137 has been marked as a duplicate of this bug. ***
Comment 30 Datradan 2008-07-21 14:42:03 UTC
I'm 167137 bug reporter, and my bug has been marked by Pino Toscano as a duplicate of this (resolved) bug.
But in Klipper 0.9.7 on KDE 4.0.98 (KDE 4.1 RC1), this bug still exist.
Comment 31 Pino Toscano 2008-07-21 14:50:51 UTC
> But in Klipper 0.9.7 on KDE 4.0.98 (KDE 4.1 RC1), this bug still exist.

Reading comment #28 may help: the bug was fixed yesterday, of course it cannot be in an already released version.
Comment 32 Datradan 2008-07-21 14:57:33 UTC
> Reading comment #28 may help: the bug was fixed yesterday, of course it cannot be in an already released version. 

Ok, I'm sorry...
Thanks to KDE developers for the fix of this bug! :-)