Closed Bug 3147 Opened 26 years ago Closed 26 years ago

crash when switching tests

Categories

(Core :: Layout: Form Controls, defect, P2)

PowerPC
Mac System 8.5
defect

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.
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: kmcclusk → pierre
reassigning to myself
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. ------
The crash above was described in #3141.
*** Bug 3141 has been marked as a duplicate of this bug. ***
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fix checked in for both problems (focused widget in nsToolkit + hit/pointed widget in EventHandler)
Status: RESOLVED → VERIFIED
verified on MacOS 8.51, build 99031209
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.