Last Comment Bug 398422 - Dragging bookmarks folder fails with "aArray has no properties"
: Dragging bookmarks folder fails with "aArray has no properties"
Status: RESOLVED FIXED
: fixed1.8.1.9, regression, verified1.8.1.8
Product: Core
Classification: Components
Component: XUL (show other bugs)
: 1.8 Branch
: x86 Linux
: -- normal (vote)
: ---
Assigned To: jag (Peter Annema)
:
Mentors:
Depends on:
Blocks: 179658
  Show dependency treegraph
 
Reported: 2007-10-03 09:45 PDT by Andrew Schultz
Modified: 2007-11-08 10:29 PST (History)
10 users (show)
dveditz: blocking1.8.1.8+
dveditz: blocking1.8.1.9+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
nsDragService log before/after bug 179658 (1.58 KB, text/plain)
2007-10-06 08:52 PDT, Andrew Schultz
no flags Details

Description Andrew Schultz 2007-10-03 09:45:19 PDT
 
Comment 1 Andrew Schultz 2007-10-03 09:56:27 PDT
(oops)

With a branch build (1.1.5pre), I made a bookmarks folder and tried to move it.  That failed with:

Error: aArray has no properties
Source File: chrome://communicator/content/bookmarks/bookmarks.js
Line: 1042

Looking at the code...
http://mxr.mozilla.org/seamonkey/source/suite/common/bookmarks/bookmarks.js#1421
moveSelection does:
aSelection.isValid = BookmarksUtils.isSelectionValidForInsertion(aSelection, aTarget, "move");

isSelectionValidForInsertion checks some things and (in my case) returns |aSelection.isValid| (which happens to be void).  So, the net result is:

aSelection.isValid = aSelection.isValid;

so aSelection.isValid is bogus and then later on it tries to use it (in BookmarksUtils.any(transaction.isValid);).

moveSelection is being called by onDrag in bookmarksTree.xml (line 605), which gets |seletion| from BookmarksUtils.getSelectionFromXferData(dragSession).
Comment 2 Andrew Schultz 2007-10-05 05:26:35 PDT
this regressed on the branch (although bookmarks code itself hasn't changed).  1.1.4 doesn't have the problem. trunk is also OK.
Comment 3 neil@parkwaycc.co.uk 2007-10-05 09:02:53 PDT
Regression from bug 267833 perhaps?
Comment 4 neil@parkwaycc.co.uk 2007-10-05 09:57:08 PDT
I actually get a different JS error just by opening Bookmarks, but it goes away if I back out attachment 280936 [details] [diff] [review] locally...
Comment 5 Boris Zbarsky [:bz] 2007-10-05 19:56:31 PDT
So... I just opened bookmarks manager, pointed the mouse at a folder, dragged it to another folder, and dropped.  That works, with no JS errors.

Am I using the wrong steps to reproduce?  What are the right ones?  Are people testing in a build with the patch for bug 398404 in it?
Comment 6 Andrew Schultz 2007-10-05 20:34:32 PDT
> So... I just opened bookmarks manager, pointed the mouse at a folder, dragged
> it to another folder, and dropped.  That works, with no JS errors.

I was dragging a folder and dropping between two existing bookmarks, but using your steps also fails.

I see the bug with today's nightly branch build.
Comment 7 Andrew Schultz 2007-10-05 22:31:49 PDT
this regressed due to bug 179658... not sure how 267833 is related (I don't see an error just opening bookmarks manager)
Comment 8 Boris Zbarsky [:bz] 2007-10-05 22:36:24 PDT
I suggest filing a core bug to track the issue too, so branch drivers will see it.
Comment 9 Andrew Schultz 2007-10-05 23:03:28 PDT
actually, I'm going to move this to core since (AFAICT) there is no bug in SeaMonkey code...

this is failing because on

http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/xpfe/components/bookmarks/resources/bookmarksTree.xml&rev=1.18.24.2&mark=585#583

DS.getCurrentSession() returns a session whose numDropItems = 0 (before bug 179658, it was 1).
Comment 10 neil@parkwaycc.co.uk 2007-10-06 02:52:21 PDT
(In reply to comment #5)
>Are people testing in a build with the patch for bug 398404 in it?
I wasn't. Sorry about that.
Comment 11 Andrew Schultz 2007-10-06 08:52:20 PDT
Created attachment 283838 [details]
nsDragService log before/after bug 179658

This is an nsDragService:5 log before (1 items) and after (0 items)
Comment 12 Andrew Schultz 2007-10-06 12:21:36 PDT
FWIW, I see the same behavior in a current Firefox branch CVS build.
Comment 13 Carsten Book [:Tomcat] 2007-10-07 15:43:48 PDT
(In reply to comment #12)
> FWIW, I see the same behavior in a current Firefox branch CVS build.
> 
confirmed, i see the same with 2.0.0.8rc1 builds like Mozilla/5.0 (X11; U; Linux i686; da; rv:1.8.1.8) Gecko/2007100416 Firefox/2.0.0.8 on Linux. Windows and Mac are fine.
Comment 14 Marcia Knous [:marcia - use ni] 2007-10-08 12:53:29 PDT
Speaking briefly with dveditz, I wondered whether this would affect Thunderbird. I just tested version 2.0.0.7pre (20071008) on Ubuntu and I do not see this problem in Thunderbird.
Comment 15 Daniel Veditz [:dveditz] 2007-10-08 13:16:37 PDT
Backed the fix out of the 1.8 branch as well as the GECKO181_20071004_RELBRANCH
Comment 16 Carsten Book [:Tomcat] 2007-10-09 05:19:48 PDT
verified fixed 1.8.1.8 using  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/2007100816 Firefox/2.0.0.8 (Firefox 2.0.0.8 RC2) 

Dragging bookmarks folder works now as expected and without any JS error in the Error Console

-> Adding verified keyword
Comment 17 Daniel Veditz [:dveditz] 2007-11-08 10:29:16 PST
Correcting blocking flags that got renamed due to firedrill release insertions

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