Error: uncaught exception while dragging from Total Commander - nsITransferable.getAnyTransferData

RESOLVED WORKSFORME

Status

()

Core
Drag and Drop
--
minor
RESOLVED WORKSFORME
15 years ago
2 years ago

People

(Reporter: Adam Hauner, Unassigned)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
Repro:
1. inside Total Commander 5.50 open any ZIP file containing HTML document
2. drag-n-drop this HTML document into Mozilla

Actual error in JS console:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsITransferable.getAnyTransferData]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://global/content/nsTransferable.js :: anonymous :: line 130"  data: no]

2003090204/trunk/W2K
(Reporter)

Updated

15 years ago
Summary: Error: uncaught exception while draggin from Total Commander - nsITransferable.getAnyTransferData → Error: uncaught exception while dragging from Total Commander - nsITransferable.getAnyTransferData

Comment 1

14 years ago
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7)
Gecko/20040614 Firefox/0.9
Mac OS X 10.2.8

I find a similar exception is thrown in Firefox 0.9, when I try to
install a theme by dragging its previously downloaded .jar file onto
the Theme Manager. I note that this error appears independent of the
type of file I drag-and-drop. The error written to the JavaScript
console is:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsITransferable.getAnyTransferData]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://global/content/nsTransferable.js :: anonymous :: line 132"  data: no]

I can reproduce this error on a new profile.

Comment 2

12 years ago
*** Bug 140985 has been marked as a duplicate of this bug. ***

Updated

12 years ago
Assignee: firefox → nobody
QA Contact: pmac

Comment 3

12 years ago
This bug is not minor. It prevents the implementation of a proper drag and drop feature, which any software which aims at a large audience should possess.

I get the same message ('Erreur : uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITransferable.getAnyTransferData]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/nsTransferable.js :: anonymous :: line 132"  data: no]') when I try to drag and drop more than one message at a time from Outlook Express to TB.

That means that it prevents one means of migrating easily from OE to Thunderbird.

Comment 4

10 years ago
I get the same issue with a custom extension (chrome://global/content/nsTransferable.js line 132) using a XUL drop target on WinXP with Firefox 2.0.0.14 for nontraditional files. No error seen on the main Mozilla browser window, but in implementing a drop target per http://xulplanet.mozdev.org/tutorials/xultu/dragwrap.html, when the dragdrop handler is called and I call nsDragAndDrop.drop(event, observer), I get an exception before my observer's onDrop() function is called.

Easiest way to reproduce is to drag the "My Computer" pseudofile (Desktop -> My Computer) onto the XUL drop target.

I can understand for the browser it isn't really that important to handle Windows weird file types, but this is a general bug for drag & drop on Windows for any XUL-based program that tries to use chrome://global/content/nsTransferable.js for drag & drop helping.

Incidentally the nsDragAndDrop helper provides no way (that I can find at least!) to enumerate the possible "flavours" available from a given data object. ("What kind of salad dressings do you want?" "Well, tell me what you have." "NO! Just tell me what you want." "Um, how about Ranch or Italian." "Sorry, we don't have those." "Well, tell me what you do have, then." "No, I won't!...")  As much as I hate strange Microsoft features, the IDataObject enumeration of supported/provided data formats seems a lot easier to use than the alternatives available to XUL/javascript programmers.
The exception thrown is probably fixed in bug 296528 (patch awaiting review at the moment). But handling of the file is probably still not implemented.
(In reply to comment #5)
> The exception thrown is probably fixed in bug 296528 (patch awaiting review at
> the moment). But handling of the file is probably still not implemented.

It is not. The fix catching the exception was removed because of merge. It seems we still should catch the exception, at least because it breaks the logic - underlying drag service thinks the drag has successfully completed because it doesn't catch any JS exceptions. Also source of the drag doesn't know it failed on the target side.
QA Contact: drag-drop
I have a problem when my users drag emails in TB to a droptarget on my toolbar (actually a subfolder popup menu). the call to getAnyTransferData crashes Thunderbird with the 0x80004005 error message (data:no) - this exclusively happens to Linux users. Wrapping this into a try catch does not help it still crashes TB - any ideas for a workaround?
Axel, is it really making TB crash? In other words "unexpectedly quit"? If so, then I don't think it is this bug and you should report a new one, it seems to be a different issue (please CC me).
I got several bug reports about this so I installed a test VM with Ubuntu Jounty and could reproduce the issue. It actually crashes because of a call to hidePopup during the dragsession. I have tried both methods hidePopup and parentNode.removeChild but both maje Thunderbird crash in an unmotivated DragExit routine. The error can not be resolved with a try - catch, and TB completely closes without warning. Other OS are not affected.

This issue only affects TB2 on Ubuntu and OpenSuse (I think there are no debian packages for TB3 yet, so I didn't test with TB3). I can send you the extension if you like.

Another interesting quirk related to dragging within popup menus is the fact that the menuitems all later versions of Mozilla (TB3 / SeaMonkey / Postbox) do not react to the dragover events - any attempt to style them with CSS has been futile, so far. OTOH TB2 has no problems with styling them. I tried various methods including setting -moz-appearance to none.  I have a hunch it is to do with the way Mozilla tries to integrated shell style into its menus, maybe there is a gap in the definitions for the pseudo styles hover and -moz-drag-over. This gives me an idea - I should try it with XP Luna shell style disabled, maybe it works then...

Axel

Comment 10

5 years ago
Axel, can you test current version?
Flags: needinfo?(axelg)
(In reply to Wayne Mery (:wsmwk) from comment #10)
> Axel, can you test current version?

I have tested the current version 17.0.6 against my current version of QuickFolders (3.11) and it appears to be okay. However, the dragging routines have changed, so I should probably test with the (then) current version of QF...

just tried that with an old version QF 1.9.7.3  with a hacked max version but unfortunately it throws during init due to the new nsIExtensionManager. I would say close the bug,  it is probably not relevant any more.
Flags: needinfo?(axelg)

Comment 12

2 years ago
WFM per comment 11
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.