Closed Bug 336586 Opened 18 years ago Closed 18 years ago

Crash when window gets destroyed when dragdropping something in iframe

Categories

(Core :: Widget, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla1.9alpha1

People

(Reporter: martijn.martijn, Assigned: bzbarsky)

References

Details

(5 keywords)

Attachments

(5 files)

This could be related to bug 300675.
See upcoming testcase, which crashes current Mozilla builds when dragdropping some text in the textarea.

This regressed between 2004-11-07 and 2004-11-10 (Ria, you have builds in between?):
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-11-07+08&maxdate=2004-11-10+09&cvsroot=%2Fcvsroot
I guess bug 219400 could be a possible culprit.
Attached file testcase
Talkback ID: TB18285312X
nsNativeDragTarget::Drop   ole32.dll + 0xea0f9 (0x7725a0f9)
ole32.dll + 0xea31f (0x7725a31f)
ole32.dll + 0xb1f0e (0x77221f0e)
ole32.dll + 0xb1dc7 (0x77221dc7)
nsDragService::StartInvokingDragSession   nsDragService::InvokeDragSession   0x0012eed8
nsAutoCMonitor::operator new   0xfffffe59
Build ID=2004110806 crashes.
Thanks Ria, that makes bug 219400 a more likely candidate.
Martijn, this looks to be Windows-only.  Can you get this in a debugger?  If so, are we crashing in nsNativeDragTarget::Drop?  On which line?

My guess would be that we're on line 360, mDragService is null and we need to hold a local nsCOMPtr to the drag service in that method because ProcessDrag destroys us or something....
(In reply to comment #5)
> My guess would be that we're on line 360, mDragService is null and we need to
> hold a local nsCOMPtr to the drag service in that method because ProcessDrag
> destroys us or something....

http://talkback-public.mozilla.org/search/start.jsp?search=2&type=iid&id=TB18350240E

Seems to indicate you're right there, since the top frame is indeed ::Drop, line 360.

I'm afraid I don't know anything else, but it seems you've figured it out :-)

Flags: blocking1.9a1?
Making it use "nsCOMPtr<nsIDragService> serv = mDragService;[...]serv->EndDragSession();" did not help here. I'll attach a stacktrace from a debug build here (with this patch included) since it looks a bit different.
Attached file Stacktrace
So.. that's not the same stack as others were seeing for this bug, right?  I wouldn't be surprised if that only actually crashes reliably in debug builds, and only sometimes in others.

Frank, I'll post a patch for you to try; lemme know whether it helps?
Attached patch Patch to testSplinter Review
No, this patch does not seem to help, the stacktrace on crash is still the same.
That patch fixes the crash on my trunk opt build.
Blocks: 219400
Attachment #221106 - Flags: superreview?(darin)
Attachment #221106 - Flags: review?(emaijala)
Blocks: 336916
Comment on attachment 221106 [details] [diff] [review]
Patch for my first suggestion

Hrm... maybe move this down just before ProcessDrag is called?  sr=darin
Attachment #221106 - Flags: superreview?(darin) → superreview+
Comment on attachment 221106 [details] [diff] [review]
Patch for my first suggestion

Agreed, move it down a bit to be more clear.
Attachment #221106 - Flags: review?(emaijala) → review+
Assignee: general → bzbarsky
Flags: blocking1.9a1?
Target Milestone: --- → mozilla1.9alpha
Fixed on trunk.  I think we want this on branches....
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: blocking1.8.1?
Flags: blocking1.8.0.5?
Resolution: --- → FIXED
Attachment #221778 - Flags: approval1.8.0.5?
Attachment #221778 - Flags: approval-branch-1.8.1?(emaijala)
Attachment #221778 - Flags: approval-branch-1.8.1?(emaijala) → approval-branch-1.8.1+
Verified FIXED using build 2006-05-12-07 of SeaMonkey trunk under Windows XP with the testcase: https://bugzilla.mozilla.org/attachment.cgi?id=220769.

No crash.
Status: RESOLVED → VERIFIED
Fixed on 1.8 branch.
Keywords: fixed1.8.1
Comment on attachment 221778 [details] [diff] [review]
Patch updated to comments

approved for 1.8.0 branch, a=dveditz for drivers
Attachment #221778 - Flags: approval1.8.0.5? → approval1.8.0.5+
Flags: blocking1.8.1?
Flags: blocking1.8.1+
Flags: blocking1.8.0.5?
Flags: blocking1.8.0.5+
Fixed for 1.8.0.5.
Keywords: fixed1.8.0.5
verified with Windows Fx 2.0b2 build from 22060821
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: