Closed
Bug 3147
Opened 26 years ago
Closed 26 years ago
crash when switching tests
Categories
(Core :: Layout: Form Controls, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: sdr, Assigned: pierre)
References
Details
Run viewerDebug.app
Command-2
-- crash in nsToolkit::SetFocus because the widget pointed to by mFocusedWidget
has been destroyed.
I was about to try the obvious - make nsWindow::Destroy() clear the focus if this
widget is the one with the focus - but I stopped when I found that Pierre had
removed this exact fix (added by David in 1.76) with a "TEMPORARY" note.
Changing Pierre's #if 0 to #if 1 solves this bug but presumably causes the other
that he noted.
Reporter | ||
Comment 1•26 years ago
|
||
Not sure if this is a kludge or a proper fix, but I have solved this problem by
using both Pierre's and David's tests together:
if (mToolkit)
{
if ( ((nsToolkit*)mToolkit)->GetFocus() == this
|| mParent == nsnull )
{
((nsToolkit*)mToolkit)->SetFocus(nsnull);
}
}
Assignee | ||
Updated•26 years ago
|
Assignee: kmcclusk → pierre
Assignee | ||
Comment 2•26 years ago
|
||
reassigning to myself
Assignee | ||
Comment 3•26 years ago
|
||
Pink reported a similar crash in MouseMoved events while loading a page.
------
Where it's crashing on mouse moved events nsMacEventHandler::HandleMouseEvents:
if (mLastWidgetPointed != nsnull)
{
mouseEvent.widget = mLastWidgetPointed;
mouseEvent.message = NS_MOUSE_EXIT;
* retVal |= mLastWidgetPointed->DispatchMouseEvent(mouseEvent);
mLastWidgetPointed = nsnull;
mouseEvent.widget = widgetPointed;
}
The crasher is on the line with the (*) because mLastWidgetPointed has
been already deleted by going to another page and its refcnt going to zero.
------
Assignee | ||
Comment 4•26 years ago
|
||
The crash above was described in #3141.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•26 years ago
|
||
Fix checked in for both problems (focused widget in nsToolkit + hit/pointed
widget in EventHandler)
Moving all Widget Set bugs, past and present, to new HTML Form Controls
component per request from karnaze. Widget Set component will be retired
shortly.
You need to log in
before you can comment on or make changes to this bug.
Description
•