Closed
Bug 216800
Opened 22 years ago
Closed 22 years ago
drag-n-drop to a GTK2 mozilla build often fails
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.6alpha
People
(Reporter: darin.moz, Assigned: darin.moz)
Details
Attachments
(3 files)
|
46.38 KB,
text/plain
|
Details | |
|
1.43 KB,
patch
|
blizzard
:
review+
blizzard
:
superreview+
asa
:
approval1.5b+
|
Details | Diff | Splinter Review |
|
662 bytes,
patch
|
blizzard
:
review+
blizzard
:
superreview+
|
Details | Diff | Splinter Review |
drag-n-drop to a GTK2 mozilla build often fails. i see this JS exception:
JavaScript error:
line 0: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsITransferable.getAnyTransferData]" nsresult:
"0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::
chrome://global/content/nsDragAndDrop.js :: anonymous :: line 89" data: no]
it seems like there are no problems if the GTK2 build is initiating a
drag-n-drop, but if the GTK2 build is on the receiving end, it will often fail.
i'll attach a Widget:5,nsDragService:5 NSPR log...
| Assignee | ||
Comment 1•22 years ago
|
||
| Assignee | ||
Comment 2•22 years ago
|
||
i meant to say that the log file captures two drag-n-drops. the first is
successful, but in the second case the JS exception is hit. i cut-n-paste the
JS exception into the log file at the right place in case that helps track down
the cause of this bug.
right now, i'm trying to figure out why the JS code (nsDragAndDrop.js's
nsTransferable) is being invoked at all prior to
nsDragService::TargetDataReceived getting called.
| Assignee | ||
Comment 3•22 years ago
|
||
ok, this turns out to be a consequence of the 20ms timeout in
nsDragService::GetTargetDragData in conjunction with the 0ms timeout in
nsWindow::OnDragLeaveEvent. raising the latter timeout value to 30ms seems to
fix drag-n-drop. this explains why the problem seemed to be intermittent for
me. sometimes the call to gtk_main_iteration() in
nsDragService::GetTargetDragData would dispatch the timer callback event and
sometimes it would not. maybe we just need to flush any pending events before
calling EndDragSession. i'm not really sure... blizzard, what do you think?
it'd be nice to get some kind of fix for this into 1.5.
Severity: normal → major
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.5beta
| Assignee | ||
Comment 4•22 years ago
|
||
i just thought about my last comment some more... the 20ms timeout value in
GetTargetDragData should not matter at all. i think what is important is that
we give some time (more than 0ms anyways) to process any events that are already
in our event queue when we get the drag_leave GTK signal.
| Assignee | ||
Comment 5•22 years ago
|
||
hackish "delay the drag_leave event some" patch. is there a better solution??
| Assignee | ||
Updated•22 years ago
|
Attachment #130217 -
Flags: review?(blizzard)
Comment 6•22 years ago
|
||
Comment on attachment 130217 [details] [diff] [review]
v1 patch
r+sr=blizzard
Just a caveat, though. I don't expect this to work in all cases since the
underlying problem, that drops on unix are async, is the real problem here and
we're only just causing reentrancy that lasts a little longer this way. We're
just making an exisiting hack worse, that's all.
Attachment #130217 -
Flags: superreview+
Attachment #130217 -
Flags: review?(blizzard)
Attachment #130217 -
Flags: review+
| Assignee | ||
Comment 7•22 years ago
|
||
Comment on attachment 130217 [details] [diff] [review]
v1 patch
this is a hack, but i think it'd be a good hack to get into the 1.5 release.
without this patch, drag-n-drop between tbird and fbird is hosed.
Attachment #130217 -
Flags: approval1.5b?
Comment 8•22 years ago
|
||
Comment on attachment 130217 [details] [diff] [review]
v1 patch
a=asa (on behalf of drivers) for checkin to 1.5beta
Attachment #130217 -
Flags: approval1.5b? → approval1.5b+
| Assignee | ||
Comment 9•22 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 10•22 years ago
|
||
hmm.. the behavior in today's firebird build (nightly GTK2 linux) is better, but
it seems like the problem still exists 30-40% of the time :-(
perhaps the timeout needs to be increased... ugh... what a hack...
at any rate, reopening this bug. maybe there is a real solution...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 11•22 years ago
|
||
More async apis required (bryner).
| Assignee | ||
Updated•22 years ago
|
Target Milestone: mozilla1.5beta → mozilla1.6alpha
Comment 12•22 years ago
|
||
I recently migrated my mozilla builds to GTK2 and hit this bug, which
is really the GTK2 version of Bug 161824. I've attached a GTK2 version
of the patch I previously submitted for GTK1. See Bug 161824 for an
explanation of why it's necessary to explicitly cancel the drag leave
timer. The patch is relative to mozilla 1.4 and fixes the problem on
my system. It's probably too late for 1.4.1 and 1.5, but it would be
nice to get into 1.4.2 and trunk builds at least.
Updated•22 years ago
|
Flags: blocking1.6a?
Flags: blocking1.4.2?
Updated•22 years ago
|
Attachment #132442 -
Flags: review?(blizzard)
| Assignee | ||
Comment 13•22 years ago
|
||
thanks for the patch glen!
Comment 14•22 years ago
|
||
Comment on attachment 132442 [details] [diff] [review]
patch ported from GTK1 version
r+sr=blizzard
Attachment #132442 -
Flags: superreview+
Attachment #132442 -
Flags: review?(blizzard)
Attachment #132442 -
Flags: review+
| Assignee | ||
Comment 16•22 years ago
|
||
.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•