Closed
Bug 42145
Opened 25 years ago
Closed 25 years ago
Crash on sonydirect.com
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: phil, Assigned: sfraser_bugs)
References
()
Details
(Keywords: crash, Whiteboard: fix in hand)
Attachments
(1 file)
4.65 KB,
text/plain
|
Details |
Using 06-09-09 commercial build on NT
1. Go to http://www.sonydirect.com/sneakpreview
2. Click on SR series notebooks
3. Popup window appears
4. Click in content area of popup window
5. Boom
I think that step (3) may be a bug, since in the 4.x product, we don't show a
popup window, but rather the image in the window displays in the page when you
roll the mouse over the link.
I filed a Talkback incident 12158267 on this, and the stack trace seems to point
to the editor clipboard command-enabling code, so I'll start with the editor.
Reporter | ||
Comment 1•25 years ago
|
||
Comment 3•25 years ago
|
||
asked Sujay to test on other platoforms and to get us a reduced test case.
I cannot reproduce this at all...I tried Win 98, Mac, Linux using latest
builds..therefore I can't come up with a reduced test case either...
Reporter | ||
Comment 5•25 years ago
|
||
Worksforme in today's build too. Now when the popup window opens, the cursor
does not turn into the link-clicking-finger cursor, so I suspect some content-
side change.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Comment 6•25 years ago
|
||
Reopening based on akkana's comment:
Line 102 of nsEditorCommands.cpp is nsCutCommand::IsCommandEnabled
dereferencing its string argument. So we could stop the crash by
checking the string argument in each of the nsEditorCommands (if we
change nsCutCommand, we should presumably change all the rest of the
commands as well) but that doesn't explain how a null pointer could
have been passed through xpconnect, which appears to be what happened
here.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee | ||
Comment 7•25 years ago
|
||
This still crashes mac.
Assignee | ||
Comment 8•25 years ago
|
||
I added assertions in the command code to catch cases where they were being
called with null arguments, and never hit them (but still crashed). I think this
bug is memory corruption somewhere, but I've not been able to track it down.
Assignee | ||
Comment 9•25 years ago
|
||
Maybe someone with purify can help?
Comment 10•25 years ago
|
||
I don't crash when following these steps. But the content area of the dialog
that comes up isn't a link or anything else clickable (in fact, I can't even
select in it).
Assignee | ||
Comment 11•25 years ago
|
||
Well, I see at least one thing bad here. nsGfxTextControlFrame2::Destroy() needs
to clear out the editor in its controller, thusly:
Index: nsGfxTextControlFrame2.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp,v
retrieving revision 1.35
diff -w -c -1 -r1.35 nsGfxTextControlFrame2.cpp
*** nsGfxTextControlFrame2.cpp 2000/06/14 03:01:31 1.35
--- nsGfxTextControlFrame2.cpp 2000/06/14 18:55:20
***************
*** 723,724 ****
--- 723,755 ----
{
+ // Clean up the controller
+ nsCOMPtr<nsIDOMNSHTMLTextAreaElement> textAreaElement =
do_QueryInterface(mContent);
+ nsCOMPtr<nsIDOMNSHTMLInputElement> inputElement =
do_QueryInterface(mContent);
+ nsCOMPtr<nsIControllers> controllers;
+ nsresult rv;
+ if (textAreaElement)
+ rv = textAreaElement->GetControllers(getter_AddRefs(controllers));
+ else if (inputElement)
+ rv = inputElement->GetControllers(getter_AddRefs(controllers));
+ else
+ rv = NS_ERROR_FAILURE;
+ if (NS_SUCCEEDED(rv))
+ {
+ PRUint32 numControllers;
+ rv = controllers->GetControllerCount(&numControllers);
+ NS_ASSERTION((NS_SUCCEEDED(rv)), "bad result in gfx text control
destructor");
+ for (PRUint32 i = 0; i < numControllers; i ++)
+ {
+ nsCOMPtr<nsIController> controller;
+ rv = controllers->GetControllerAt(i, getter_AddRefs(controller));
+ if (NS_SUCCEEDED(rv) && controller)
+ {
+ nsCOMPtr<nsIEditorController> editController =
do_QueryInterface(controller);
+ if (editController)
+ {
+ editController->SetCommandRefCon(nsnull);
+ }
+ }
+ }
+ }
+
mSelCon = 0;
Assignee | ||
Comment 12•25 years ago
|
||
That patch fixes the crash on Windows. However, on Mac, we then crash down in
nsHTMLInputElement::HandleDOMEvent(), when handling an update event for the
window, because the frame returned from nsGenericHTMLElement::GetPrimaryFrame()
is null.
saari: nsEventStateManager is calling HandleDOMEvent on gLastFocusedContent
(which is the input element), even though that input field has been hidden, so it
no longer has any frames. It seems that something needs to tell
nsEventStateManager to nuke its gLastFocusedContent pointer when content is
dynamically hidden, as in this case. Over to you...
BTW, I'll check in an assertion in nsHTMLInputElement::HandleDOMEvent() that
you'll hit in this case, instead of crashing badly.
Assignee: sfraser → saari
Status: REOPENED → NEW
OS: Windows NT → Mac System 9.0
Hardware: PC → Macintosh
Assignee | ||
Comment 13•25 years ago
|
||
Ooops, it was actually crashing in code that I added, so there is no crash now.
However, It still seems wrong that we're calling HandleDOMEvent on an element
that is hidden.
Assignee: saari → sfraser
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Whiteboard: fix in hand
Assignee | ||
Comment 14•25 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 15•25 years ago
|
||
Hmm. Sort of fixed. Now we open the popup window rather than crashing, but the
Sneak Preview page under the popup window blanks out. Is this a different bug?
Assignee | ||
Comment 16•25 years ago
|
||
I'm pretty sure that would be different; my changes will not affect URL loading.
Updated•21 years ago
|
OS: Mac System 9.x
You need to log in
before you can comment on or make changes to this bug.
Description
•