Last Comment Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)
: Bookmarks with blank name are wrongly exported (broken codepage symbols in th...
Status: VERIFIED FIXED
: dataloss, regression
Product: Firefox
Classification: Client Software
Component: Bookmarks & History (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Firefox 7
Assigned To: Marco Bonardo [::mak]
:
Mentors:
: 645724 657099 (view as bug list)
Depends on:
Blocks: 420729 731663
  Show dependency treegraph
 
Reported: 2010-09-04 03:34 PDT by Virtual_ManPL [:Virtual] - (ni? me)
Modified: 2013-12-27 14:34 PST (History)
7 users (show)
mak77: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments
Good (3.25 KB, image/png)
2010-09-09 00:40 PDT, Virtual_ManPL [:Virtual] - (ni? me)
no flags Details
Bad (3.85 KB, image/png)
2010-09-09 00:40 PDT, Virtual_ManPL [:Virtual] - (ni? me)
no flags Details
BUG (162.90 KB, image/png)
2010-12-17 07:24 PST, Virtual_ManPL [:Virtual] - (ni? me)
no flags Details
bookmarks.html (48.32 KB, text/html)
2011-03-05 10:34 PST, Virtual_ManPL [:Virtual] - (ni? me)
no flags Details
BUG2 (155.73 KB, image/png)
2011-03-05 10:34 PST, Virtual_ManPL [:Virtual] - (ni? me)
no flags Details
patch v1.0 (29.47 KB, patch)
2011-06-08 04:57 PDT, Marco Bonardo [::mak]
dietrich: review+
Details | Diff | Splinter Review

Description Virtual_ManPL [:Virtual] - (ni? me) 2010-09-04 03:34:08 PDT
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre

Bookmarks with no names are wrongly imported.
Instead of blank names, they are some strange symbols.

Marking as Critical, because of strong data integration. (not data loss, but add some odd symbols to it)

Reproducible: Always

Steps to Reproduce:
1. Create e.g. bookmark on https://www.google.com/ in Bookmarks Toolbar without name to see only favicon
2. Export bookmarks to HTML file
3. Import this file
Actual Results:  
Some odd symbols in name

Expected Results:  
Properly blank name
Comment 1 Maniac Vlad Florin (:vladmaniac) 2010-09-06 02:35:46 PDT
Could you please provide some screenshots? 

I am also facing some trouble with the Import dialog and due to this 
I am very interested in seeing this, since I cannot reproduce the 
behavior on winXP with SP3. 

juan, what do you think?
Comment 2 Virtual_ManPL [:Virtual] - (ni? me) 2010-09-09 00:40:35 PDT
Created attachment 473433 [details]
Good
Comment 3 Virtual_ManPL [:Virtual] - (ni? me) 2010-09-09 00:40:54 PDT
Created attachment 473434 [details]
Bad
Comment 4 Virtual_ManPL [:Virtual] - (ni? me) 2010-09-09 00:42:01 PDT
Also with importing 4MB bookmarks.html
I get this error many times:

"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Script: jar:file:///C:/Program%20Files/Mozilla%20Firefox/omni.jar!/components/nsPlacesDBFlush.js:190"
Comment 5 Virtual_ManPL [:Virtual] - (ni? me) 2010-09-12 01:07:16 PDT
Marking as WORKSFORME, because it not happens with
Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100911 Firefox/4.0b6pre
Comment 6 Virtual_ManPL [:Virtual] - (ni? me) 2010-12-17 07:24:16 PST
Created attachment 498331 [details]
BUG

Reopening because I exported bookmarks on XP and imported it to 7 and get this...
Comment 7 Marco Bonardo [::mak] 2010-12-17 07:40:11 PST
could I please get a copy of your bookmarks.html file by mail (don't attach it here since it contains sensitive data)
Also, are all of your boxes confiured with the same language? which one is it?
Comment 8 Shawn Wilsher :sdwilsh 2010-12-17 15:11:48 PST
Is this a regression from Firefox 3.6?
Comment 9 Virtual_ManPL [:Virtual] - (ni? me) 2010-12-18 12:30:11 PST
(In reply to comment #8)
> Is this a regression from Firefox 3.6?

Don't know for sure, but probably yes.

(In reply to comment #7)
> could I please get a copy of your bookmarks.html file by mail (don't attach it
> here since it contains sensitive data)
> Also, are all of your boxes confiured with the same language? which one is it?

Sent (private bookmarks (less than 1%) was removed), exported with newest nightly of Firefox 4 64bit

Also I cant reproduce it anymore, only sometimes I get this funny symbols... and I don't know when this bookmarks are wrongly named, but probably on importing, not exporting
Comment 10 Virtual_ManPL [:Virtual] - (ni? me) 2010-12-18 12:37:12 PST
(In reply to comment #7)
> Also, are all of your boxes configured with the same language? which one is it?
Windows XP SP3 32bit Polish with Firefox 4 32bit
Windows 7 64bit Polish with Firefox 4 64bit

but this firstly occurred on exporting and importing on the same system like you can see on the first screenshots from XP
Comment 11 Marco Bonardo [::mak] 2010-12-20 05:46:03 PST
So, you noticed the problem in the 64 bit version on Windows? It's even possible there is some bug there, since we don't officially support 64bit Windows version yet. Btw, the fact this is Polish (thus localized) system is probably related.
I'll try to reproduce with your file, if this doesn't always happen could be hard to reproduce though.
Comment 12 Virtual_ManPL [:Virtual] - (ni? me) 2010-12-20 06:03:29 PST
Awww, I didn't mention that I use Firefox in EN-US language without any language packs
Comment 13 Marco Bonardo [::mak] 2010-12-23 02:53:55 PST
So, I tried importing in current nightly on Win7 x64, so far I don't see any problem, some bookmarks have japanese names, but that's expected. Maybe there's something wrong at system level with unicode fonts. It's pretty much hard to tell :(
Comment 14 Marco Bonardo [::mak] 2010-12-23 03:00:46 PST
Just in case, I tried to import multiple times with the win64 version, still no luck in reproducing.
Comment 15 Virtual_ManPL [:Virtual] - (ni? me) 2010-12-23 04:46:51 PST
I also tried many times and can't reproduce it anymore...
odd, I simply must stop auto-updating Fx & add-ons and backuping bookmarks next time when I see this to diagnose it completely ;p

so marking this RESOLVED WORKSFORME for now
Comment 16 Virtual_ManPL [:Virtual] - (ni? me) 2011-03-05 10:33:05 PST
OK, bug still exist on importing bookmarks with blank name from file  bookmarks.html.
Tested on Portable Firefox 3.6.15 and latest Firefox4b13pre 64bit nightly on Win 7 64bit.
Comment 17 Virtual_ManPL [:Virtual] - (ni? me) 2011-03-05 10:34:04 PST
Created attachment 517152 [details]
bookmarks.html
Comment 18 Virtual_ManPL [:Virtual] - (ni? me) 2011-03-05 10:34:36 PST
Created attachment 517153 [details]
BUG2
Comment 19 Virtual_ManPL [:Virtual] - (ni? me) 2011-03-06 01:49:56 PST
I see that this odd symbols in importing are caused by probably wrong exporting and writing some wired symbols instead of nothing

Example:

is
<DD>Wasz spob na studia
        <DT><A HREF="http://10minutemail.com/" ADD_DATE="1268738723" LAST_MODIFIED="1295440860"></A>

should be
<DD>Wasz spob na studia
        <DT><A HREF="http://10minutemail.com/" ADD_DATE="1268738723" LAST_MODIFIED="1298058452"></A>
Comment 20 Mike Beltzner [:beltzner, not reading bugmail] 2011-03-07 05:00:25 PST
This wouldn't block release, if it gets confirmed we could consider it as a .x issue.
Comment 21 Marco Bonardo [::mak] 2011-03-15 07:51:32 PDT
the bookmarks.html file has the same symbols, so importing seems correct.
The problem seems to be in exporting then?
Unfortunately this bug is still missing steps to reproduce the issue starting from a new clean profile, if you could find a certain page that once bookmarked and exported causes a broken bookmarks.html file, that would be useful.
Comment 22 Virtual_ManPL [:Virtual] - (ni? me) 2011-03-15 11:07:43 PDT
Yep looks like exporting is the problem. But I can hardly reproduce it. Once when I see that a bug occur I tried second time and it didn't happen anymore.

I will try with clean profile and new created bookmarks to give you guys detailed info.
Comment 23 Marco Bonardo [::mak] 2011-03-28 09:50:04 PDT
*** Bug 645724 has been marked as a duplicate of this bug. ***
Comment 24 Marco Bonardo [::mak] 2011-03-28 09:50:54 PDT
confirming for investigation of what could cause broken codepage symbols in the html file.
Comment 25 Rod Spade 2011-03-28 10:02:49 PDT
I first experienced this problem with Firefox 4.0 (after upgrading from 3.6) on Win 7 64-bit.  It occurs in the file generated by autoExportHTML.  It happens nearly every time.  The problem does not occur for me when I manually export my bookmarks to html.

I'd be happy to email files from my profile to one of the developers, if it might help.
Comment 26 Marco Bonardo [::mak] 2011-03-28 10:13:05 PDT
which locale is your OS and your Firefox?
Sure, I'd be interested in getting your places.sqlite by mail to try to reproduce if filesize allows sending it.
Comment 27 Rod Spade 2011-03-28 10:22:37 PDT
Sorry, I misspoke - I have *32* bit Win 7 Professional.  I believe all the locale stuff is US English.  (I don't remember where to check to confirm that.)  I will email a zip of my places.sqlite.
Comment 28 Virtual_ManPL [:Virtual] - (ni? me) 2011-05-12 01:29:38 PDT
What's the status in diagnosing this bug guys ?
Branching is in a week for Firefox 6.
Comment 29 Marco Bonardo [::mak] 2011-05-12 02:46:42 PDT
(In reply to comment #28)
> Branching is in a week for Firefox 6.

And then there will be 7 in 6 weeks, 8 in 6 weeks... we have a lot of work to do and not enough resources for every single bug. You're welcome to investigate the bug and make a patch if you wish, but as you said it's hard to reproduce, and that doesn't help.

Btw, looks like I never received the places.sqlite file :(
Comment 30 Virtual_ManPL [:Virtual] - (ni? me) 2011-05-12 03:30:48 PDT
Awww, I think you got already Rod Spades' places.sqlite file on your email to investigate it.

So Rod Spade could you resend this file to Marco Bonardo ?

Also sorry for bugspam, but I want only remind some critical (like this) or easy fix (about bookmark button) bugs.
Comment 31 Rod Spade 2011-05-12 07:04:25 PDT
> So Rod Spade could you resend this file to Marco Bonardo ?

Done.
Comment 32 Marco Bonardo [::mak] 2011-05-12 07:17:05 PDT
got it, was wrongly marked as spam :(
Comment 33 Marco Bonardo [::mak] 2011-05-15 02:35:20 PDT
*** Bug 657099 has been marked as a duplicate of this bug. ***
Comment 34 Marco Bonardo [::mak] 2011-06-07 13:57:59 PDT
OK, I got it! I introduced this bug in importexport code in bug 420729. Looking at it, it's probably a typo on my side since I didn't mean to change this behavior (most likely I moved a brace and then moved it back to the wrong position).

Thank you very much for the places.sqlite file, I was unable to reproduce the bug with it, but as soon as I added an empty titled bookmark it became reproduceable.

I'll try to make a test, but due to the nature of the bug (using uninitialized memory) it may work only randomly.
Comment 35 sezor 2011-06-08 00:01:49 PDT
Thanks guys for all the work you do. 
I'm not a programmer, just a user.  I enjoy Fx every day - all the more so when I'm forced to use another browser - whose name I won't mention - for sites that work only with it ..
Comment 36 Marco Bonardo [::mak] 2011-06-08 04:57:42 PDT
Created attachment 537987 [details] [diff] [review]
patch v1.0

To briefly explain what happens here:
- we are accessing uninitialized memory due to a missing '\0' when name is empty
- to test this I had to refactor the test
- the more complete test catched a bug causing dateAdded and lastModified to be ignored when importing to a folder, so I had to fix this as well, to have the test pass.

but I've been able to enable all the commented out subtests, so more testing!
Comment 37 Dietrich Ayala (:dietrich) 2011-06-08 13:06:10 PDT
Comment on attachment 537987 [details] [diff] [review]
patch v1.0

r=me. this looks fine. thanks for taking the time to fix those tests!
Comment 38 Marco Bonardo [::mak] 2011-06-08 14:08:29 PDT
http://hg.mozilla.org/projects/places/rev/1ef9f5d0795b
Comment 39 Marco Bonardo [::mak] 2011-06-09 03:54:26 PDT
http://hg.mozilla.org/mozilla-central/rev/1ef9f5d0795b
Comment 40 Virtual_ManPL [:Virtual] - (ni? me) 2011-06-09 12:48:05 PDT
At first glance looks fixed.
Thank you!

VERIFIED
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:7.0a1) Gecko/20110609 Firefox/7.0a1

Shouldn't this be pushed to next stable (Firefox 5) ?
Comment 41 Marco Bonardo [::mak] 2011-06-09 14:52:13 PDT
(In reply to comment #40)
> At first glance looks fixed.
> Thank you!

No, thanks always go to people who helped reporting and reproducing the bug, for patience and for trying to bring this on in a constructive way. Fixing it is the easy part often.

> Shouldn't this be pushed to next stable (Firefox 5) ?

Well, Firefox 5 is pretty hard (I'd say impossible) to do since it's already in beta stage.
Firefox 6 may be possible, but I'd not put a bet on that.  Even if I don't like the bug at all (using uninitialized memory is always bad) it's something that happens in edge cases, when you have empty-named bookmarks.  But don't be too much worried, releases happen every 6 weeks, so you won't have to wait like for previous major releases and Firefox 6 will soon be a beta.
Comment 42 Eric 2013-05-06 21:37:34 PDT
64 bit windows 7 doesn't seem to work.

Note You need to log in before you can comment on or make changes to this bug.