Bug 255611

Summary: keditbookmarks: multiple bookmarks moved to a subfolder often deletes bookmarks & subfolder
Product: keditbookmarks Reporter: Ben Kohler <bkohler>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Severity: normal CC: dilfridge, johu, kensington, wonko
Priority: NOR    
Version: 4.11.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: screenshot of strange behavior

Description Ben Kohler 2010-10-29 21:53:17 UTC
Version:           unspecified (using KDE 4.5.2) 
OS:                Linux

I'm noticing a lot of quirks in the bookmark management, but the most critical and reproducible is seen when trying to move bookmarks from the top level bookmarks dir to a subdir.  The source bookmarks & destination folder both disappear.

Reproducible: Sometimes

Steps to Reproduce:
1.  Create a dozen or more bookmarks in the top-level "Bookmarks" folder.  You can make one then copy/paste-paste-paste to make a bunch real quick.
2.  Create a new folder "foo" within "Bookmarks".
3.  Select 4 of these bookmarks, click-drag them to "foo"
4.  If it works fine, select another 4 and move them.

Actual Results:  
"foo" AND the 4 selected bookmarks disappear, usually on the first, second, or third move.  It rarely takes longer than that to see the problem.

Expected Results:  
The 4 bookmarks should be moved to the "foo" subdir.

When running krdc from a terminal, I see this output when the folder & bookmarks disappear:

keditbookmarks(22494) KBookmarkManager::findByAddress: KBookmarkManager::findByAddress: couldn't find item  "/5" 
keditbookmarks(22494) KBookmarkManager::findByAddress: KBookmarkManager::findByAddress: couldn't find item  "/6" 
keditbookmarks(22494) KBookmarkManager::findByAddress: KBookmarkManager::findByAddress: couldn't find item  "/0/2"

I don't know if this output is related or not, but I see it (with different numbers on the end) every time the problem happens.
Comment 1 Urs Wolfer 2010-11-07 15:58:47 UTC
Bookmark support in KRDC is based on keditbookmarks. Can you please run this application from Konsole and try if you can reproduce this isse there as well (without KRDC). If yes, we can assign this bug to keditbookmarks.

Thanks for your support!
Comment 2 Ben Kohler 2010-11-08 20:12:57 UTC
Ah, didn't know about keditbookmarks.  Yes, I can reproduce this issue from keditbookmarks-4.5.3 directly.  Same console output also.
Comment 3 Ben Kohler 2010-12-03 20:24:29 UTC
Problem still exists on keditbookmarks-4.5.4
Comment 4 Andreas K. Huettel 2011-04-17 23:52:44 UTC
Problem still exists on keditbookmarks-4.6.2
Comment 5 alancio 2011-07-22 00:52:50 UTC
I just hit this bug, I lost my bookmarks!
Comment 6 Ben Kohler 2011-12-31 04:21:11 UTC
Just to update, this is still happening in keditbookmarks-4.7.4
Comment 7 Johannes Huber 2012-02-09 21:45:31 UTC
Comment 8 Ben Kohler 2012-02-28 20:14:42 UTC
Created attachment 69165 [details]
screenshot of strange behavior

Tested this on keditbookmarks-4.8.0 today, very sporadic behavior.  First, I create 20+ bookmarks, then create a folder.  After selecting sets of 4 bookmarks and dragging them into the folder, here is a screenshot of what I end up with.  Note the strange "Bookmarks" starred item as a subitem of existing bookmarks, and the strange blank/corrupt bookmark in the test folder.  Both of these were a result of simply dragging 4 bookmarks from the top-level bookmarks folder into a sub-folder.

As I continue to move more, bookmarks start disappearing, changing to other icons, and other randomness.  And eventually the app will segfault.
Comment 9 Wonko 2012-05-18 16:40:16 UTC
I'm on 4.8.3, and something is really strange indeed. I was organizing my bookmarks - mainly because I thought about switching to Firefox, but before I do so I wanted to have my bookmarks sorted. I noticed some weird things happen when multiple bokmarks are dragged from one into another folder - sometimes only part of them are moved, sometimes some stay, and empty bookmarks are being created. You want to undo? No way, press the undo botton, and keditbookmarks crashes.
But the worst thing is that somehow many bookmark folders (with hundreds of bookmarks) are lost. I have a backup (of course I do, KDE really often messes up my data), but I am really pissed because I just spent over an hour re-organizing the bookmarks, and now I have to start from scratch. Or, better, abandon Konqueror completely, and do the sorting in Firefox.

Really, guys, editing bookmarks in KDE45 has been a pain from the very beginning, see for example bug 187892... and still, years later, bookmarks are lost, and the application crashes often. I'm outta here.
Comment 10 Wonko 2012-08-01 20:17:51 UTC
My bad, I wanted to stop using Konqueror, but sometimes I still do. And because I forgot about this bug, I ran into it, again. But I want to mention that this time the very first folder was deleted, too, when keditbookmarks crashed. This has happened before at least twice, but at that time I did not notice when it happened, I just was missing the first folder later and wondered if I'm crazy.
Comment 11 Michael Palimaka 2013-08-20 13:46:51 UTC
Can reproduce these issues with 4.11
Comment 12 Ben Kohler 2013-12-07 17:06:43 UTC
This appears to be fixed by commit ae76d6f3ff367a152d511581161b87742d6934ab as detailed in bug #287038.

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