Bug 294008

Summary: crash after Undo after buggy drag and drop
Product: [Applications] keditbookmarks Reporter: Ivan D Vasin <ivan>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: adaptee
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ivan D Vasin 2012-02-13 17:19:57 UTC
Application: keditbookmarks (4.7.97 (4.8 RC2 (4.7.97))
KDE Platform Version: 4.8.00 (4.8.0
Qt Version: 4.7.4
Operating System: Linux 3.0.0-16-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
steps to reproduce:
1. open the Bookmark Editor.
2. expand a folder with bookmarks in it.
3. select two or more bookmarks in the folder.
4. drag the selected bookmarks.  drop them in the root folder.
5. press Ctrl + z.


actual behavior:
* after step 4, usually (but not always) this happens:
  * the first selected bookmark A is properly moved to the root folder.
  * a blank bookmark B (no name, no location, etc.) is created after A.
  * if N > 2 bookmarks were selected, then (N - 2) blank bookmarks are created after the bookmark after B.
* if the result of the drag and drop is buggy as described above, then step 5 causes a crash.


expected behavior:
* after step 4, all selected bookmarks are properly moved to the location of the drop action in the root folder.
* after step 5, all of the moved bookmarks are returned to their previous locations.


related info:
i imported all of my bookmarks from Firefox using "File --> Import --> Import Mozilla Bookmarks..." on a file that contains all of my Firefox boomarks.  i chose to replace the existing bookmarks.

The crash can be reproduced some of the time.

-- Backtrace:
Application: Bookmark Editor (keditbookmarks), signal: Segmentation fault
[KCrash Handler]
#6  QDomNode::QDomNode (this=0x7fff78fdb9f0, n=...) at dom/qdom.cpp:2038
#7  0x00007f5d0fb66bdd in KBookmark (this=0x7fff78fdb9f0) at /usr/include/kbookmark.h:34
#8  TreeItem::bookmark (this=<optimized out>) at ../../../keditbookmarks/kbookmarkmodel/treeitem.cpp:87
#9  0x00007f5d0fb64d35 in KBookmarkModel::bookmarkForIndex (this=<optimized out>, index=<optimized out>) at ../../../keditbookmarks/kbookmarkmodel/model.cpp:396
#10 0x00007f5d0fb64da0 in KBookmarkModel::parent (this=0x1151860, index=...) at ../../../keditbookmarks/kbookmarkmodel/model.cpp:263
#11 0x00007f5d0e655607 in parent (this=0x7fff78fdbc60) at ../../include/QtCore/../../src/corelib/kernel/qabstractitemmodel.h:389
#12 can_create_mapping (source_parent=..., this=0x12cc700) at itemviews/qsortfilterproxymodel.cpp:399
#13 QSortFilterProxyModelPrivate::can_create_mapping (this=0x12cc700, source_parent=...) at itemviews/qsortfilterproxymodel.cpp:396
#14 0x00007f5d0e658769 in QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted (this=0x12cc700, source_parent=..., start=<optimized out>, end=<optimized out>) at itemviews/qsortfilterproxymodel.cpp:1271
#15 0x00007f5d0e65c6ec in QSortFilterProxyModel::qt_metacall (this=0x12cc110, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x7fff78fdbbd0) at .moc/release-shared/moc_qsortfilterproxymodel.cpp:136
#16 0x00007f5d0d6d7eba in QMetaObject::activate (sender=0x1151860, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff78fdbbd0) at kernel/qobject.cpp:3278
#17 0x00007f5d0d720884 in QAbstractItemModel::rowsAboutToBeInserted (this=<optimized out>, _t1=<optimized out>, _t2=1, _t3=1) at .moc/release-shared/moc_qabstractitemmodel.cpp:174
#18 0x00007f5d0d6bf108 in QAbstractItemModel::beginInsertRows (this=0x1151860, parent=..., first=<optimized out>, last=1) at kernel/qabstractitemmodel.cpp:2395
#19 0x00007f5d0fb659ea in KBookmarkModel::beginInsert (this=0x1151860, group=<optimized out>, first=1, last=1) at ../../../keditbookmarks/kbookmarkmodel/model.cpp:404
#20 0x00007f5d0fb60a7f in CreateCommand::redo (this=0x175cfd0) at ../../../keditbookmarks/kbookmarkmodel/commands.cpp:113
#21 0x00007f5d0fb6072a in DeleteCommand::undo (this=0x16cefa0) at ../../../keditbookmarks/kbookmarkmodel/commands.cpp:332
#22 0x00007f5d0fb605fe in MoveCommand::undo (this=0x15fcbe0) at ../../../keditbookmarks/kbookmarkmodel/commands.cpp:388
#23 0x00007f5d0e71c5c1 in QUndoCommand::undo (this=0x160f330) at util/qundostack.cpp:226
#24 0x00007f5d0e71cdd1 in QUndoStack::undo (this=<optimized out>) at util/qundostack.cpp:659
#25 0x00007f5d0fb6052b in CommandHistory::undo (this=0x1161c40) at ../../../keditbookmarks/kbookmarkmodel/commandhistory.cpp:72
#26 0x00007f5d0fb605dc in CommandHistory::qt_metacall (this=0x1161c40, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff78fdbfa0) at ./commandhistory.moc:78
#27 0x00007f5d0d6d7eba in QMetaObject::activate (sender=0x11494c0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff78fdbfa0) at kernel/qobject.cpp:3278
#28 0x00007f5d0e0bfbb2 in QAction::triggered (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#29 0x00007f5d0e0bfd9f in QAction::activate (this=0x11494c0, event=<optimized out>) at kernel/qaction.cpp:1257
#30 0x00007f5d0e0bff0f in QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1183
#31 0x00007f5d0e0c6474 in notify_helper (e=0x7fff78fdc380, receiver=0x11494c0, this=0xff57d0) at kernel/qapplication.cpp:4486
#32 QApplicationPrivate::notify_helper (this=0xff57d0, receiver=0x11494c0, e=0x7fff78fdc380) at kernel/qapplication.cpp:4458
#33 0x00007f5d0e0cb2e1 in QApplication::notify (this=0x7fff78fdd630, receiver=0x11494c0, e=0x7fff78fdc380) at kernel/qapplication.cpp:4365
#34 0x00007f5d0eddbae6 in KApplication::notify (this=0x7fff78fdd630, receiver=0x11494c0, event=0x7fff78fdc380) at ../../kdeui/kernel/kapplication.cpp:311
#35 0x00007f5d0d6c4afc in QCoreApplication::notifyInternal (this=0x7fff78fdd630, receiver=0x11494c0, event=0x7fff78fdc380) at kernel/qcoreapplication.cpp:787
#36 0x00007f5d0e0f84e9 in sendEvent (event=0x7fff78fdc380, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#37 QShortcutMap::dispatchEvent (this=<optimized out>, e=0x7fff78fdc790) at kernel/qshortcutmap.cpp:879
#38 0x00007f5d0e0f99ba in QShortcutMap::tryShortcutEvent (this=0xff58f8, o=<optimized out>, e=0x7fff78fdc790) at kernel/qshortcutmap.cpp:364
#39 0x00007f5d0e0ccb62 in QApplication::notify (this=0x7fff78fdd630, receiver=0x12b2f90, e=0x7fff78fdc790) at kernel/qapplication.cpp:3928
#40 0x00007f5d0eddbae6 in KApplication::notify (this=0x7fff78fdd630, receiver=0x12b2f90, event=0x7fff78fdc790) at ../../kdeui/kernel/kapplication.cpp:311
#41 0x00007f5d0d6c4afc in QCoreApplication::notifyInternal (this=0x7fff78fdd630, receiver=0x12b2f90, event=0x7fff78fdc790) at kernel/qcoreapplication.cpp:787
#42 0x00007f5d0e16a029 in QKeyMapper::sendKeyEvent (keyWidget=0x12b2f90, grab=<optimized out>, type=QEvent::KeyPress, code=90, modifiers=..., text=..., autorepeat=false, count=1, nativeScanCode=61, nativeVirtualKey=122, nativeModifiers=4) at kernel/qkeymapper_x11.cpp:1866
#43 0x00007f5d0e16a49b in QKeyMapperPrivate::translateKeyEvent (this=0x103da70, keyWidget=0x12b2f90, event=0x7fff78fdd1d0, grab=false) at kernel/qkeymapper_x11.cpp:1836
#44 0x00007f5d0e1453d7 in QApplication::x11ProcessEvent (this=0x7fff78fdd630, event=0x7fff78fdd1d0) at kernel/qapplication_x11.cpp:3586
#45 0x00007f5d0e16e4a2 in x11EventSourceDispatch (s=0xff85b0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#46 0x00007f5d09fc6a5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007f5d09fc7258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007f5d09fc7429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007f5d0d6efed6 in QEventDispatcherGlib::processEvents (this=0xfd1fa0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#50 0x00007f5d0e16e10e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#51 0x00007f5d0d6c3cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#52 0x00007f5d0d6c3ef7 in QEventLoop::exec (this=0x7fff78fdd5a0, flags=...) at kernel/qeventloop.cpp:201
#53 0x00007f5d0d6c8789 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#54 0x00007f5d10126afe in kdemain (argc=<optimized out>, argv=<optimized out>) at ../../keditbookmarks/main.cpp:212
#55 0x00007f5d0fd8d30d in __libc_start_main (main=0x400640 <main(int, char**)>, argc=1, ubp_av=0x7fff78fdded8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff78fddec8) at libc-start.c:226
#56 0x0000000000400671 in _start ()

This bug may be a duplicate of or related to bug 287038.

Possible duplicates by query: bug 287038.

Reported using DrKonqi
Comment 1 Jekyll Wu 2012-06-23 15:12:31 UTC

*** This bug has been marked as a duplicate of bug 287038 ***