Closed Bug 19941 Opened 26 years ago Closed 26 years ago

can't drag url from outside app into content area, then crash

Categories

(Core :: XUL, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mikepinkerton, Assigned: mikepinkerton)

References

Details

(Keywords: crash)

Drag some text from WordPad and hover over the content area on win32. The calls into the dragSession are throwing in C++, but we can't catch them so the go up to OLE and are thrown away. it looks like our internal data members are bad, but only when the app is in the bg. This all works fine when the drag comes from us. This will then crash at some later time GC'ing in JS, probably because we never finish executing the JS routine in the drag handler.
Status: NEW → ASSIGNED
First response from jband: Oh man, you are playing with OLE here! I tracked it into your call to dragSession.isDataFlavorSupported. At about line 227 in nsDragService.cpp you have nsDataObjCollection * dataObjCol = (nsDataObjCollection *)mDataObject; PRUint32 i; PRUint32 cnt = dataObjCol->GetNumDataObjects(); But dataObjCol does not look valid. It has some bogus data. When it tries to look at one of that object's memebers it throws bad exceptions in Win32. I see in the debugger: First-chance exception in mozilla.exe (XPCOM.DLL): 0xC0000005: Access Violation. First-chance exception in mozilla.exe (RPCRT4.DLL): 0x80010105: (no name). These blow right past *our* code but since you are running this all inside an OLE scope, when the stack unwinds up to there OLE catches it and eats the expection. This completely screws us but OLE continues on. So, I don't know why your drag service has a bogus mDataObject. Normally this would just crash imediately. But our friend OLE is just trying to help. ---------------------- 2nd message from jband: Yeah, even in nsDragService::SetIDataObject (where I assume this value is first set) doing a cast of (nsDataObjCollection *)mDataObject yields an object that has some funny looking members. Are you getting handed something different from what you expect? -------------------------------- 3rd message from jband: In msdev (once the target app is running) in the debug menu there is an 'Exceptions' item that brings up a dialog in which you can set options for handling particular kinds of exceptions. The default for most types is "stop if not handled". When working with OLE you might want to set the access violation to "stop always" so that you can see the exception in the debugger before OLE eats it.
Target Milestone: M13
m13
*** Bug 21821 has been marked as a duplicate of this bug. ***
Severity: major → critical
Whiteboard: [HELP WANTED]
marking help wanted. this is some bizarre js threading problem that i need help from brendan/jband on to really fix. probably means camping out in my cube for a while ;)
I don't see what js and threads have to do with this; sounds like you need expert OLE help (who doesn't?). Jband? /be
drag&drop is once again post-beta according to marketing. moving all d&d bugs to M15.
So, is this disabled in some way? or does it just crash if the user drags something onto the app? I'm no OLE guru, but I have some Win32 experience and can try to help with this problem.
has this been disabled? I looked with the 2000011908 builds on NT and when try to drag some selection form wordpad to Seamonkey all I get is the international symbol for 'no'. Thereafter no ill affects.
all d&d was hidden behind a pref yesterday, that is off by default.
Keywords: helpwanted
I want this fixed for m14.
Target Milestone: M15 → M14
Putting on beta1 radar.
Keywords: beta1
Adding "crash" keyword to all known open crasher bugs.
Keywords: crash
Putting on PDT+ radar for beta1. Stop the crash as opposed to implementing the feature.
Whiteboard: [HELP WANTED] → [PDT+]
ccing jevering per his request.
...though blizzard is making good progress on linux d&d.... anyway, I don't think this needs to be pdt+, as the offending code never gets called for normal users (read: it won't crash). Only people who have the d&d pref turned on (eg, developers working on implementing d&d) will see this crash. I want seriously to fix this for M14 (it gets in the way for d&d developers) but we should _not_ hold beta for this bug. removing the pdt+ for reconsideration.
Whiteboard: [PDT+]
removing beta1 nomination.
Keywords: beta1
Sigh, five seconds of thought and consideration on this one and i know what the problem is. looking back, i have no idea where i got the multi-thread idea into my head. jband was right on the money, though i stumbled onto this one independantly. i should have this fixed in a day or so. then perhaps we can get d&d turned on everywhere. removing "help wanted" from keywords since i can fix this one.
Keywords: helpwanted
fixed and dragging to the content area has been re-enabled on all platforms.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
QA Contact: claudius → elig
Verified fixed using 2.7.00 AM builds on Win32 & Mac OS.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.