Closed Bug 77362 Opened 24 years ago Closed 24 years ago

Trunk & M09 crash [@ PresShell::FireResizeEvent] because globalObj is n ull

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: Bienvenu, Assigned: joki)

References

Details

(Keywords: crash, topcrash, Whiteboard: [fixinhand])

Crash Data

Fix is trivial - check for null global obj as below: PresShell::FireResizeEvent() { //Send resize event from here. nsEvent event; nsEventStatus status = nsEventStatus_eIgnore; event.eventStructType = NS_EVENT; event.message = NS_RESIZE_EVENT; event.time = 0; nsCOMPtr<nsIScriptGlobalObject> globalObj; mDocument->GetScriptGlobalObject(getter_AddRefs(globalObj)); if (globalObj) globalObj->HandleDOMEvent(mPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status); } This seems to happen to me when I have a browser window open and then go back to a mail window and click on a folder. It's happened several times in the last couple days. Moving the IP past the crash lets me keep running, which makes me think the null check will fix the problem.
adding keywords
Keywords: crash, nsbeta1
Cool. I've got the fix in my tree, it'll go in once tree opens for 0.9.1.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
The fix is, of course, obvious. Index: layout/html/base/src/nsPresShell.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/html/base/src/nsPresShell.cpp,v retrieving revision 3.394 diff -u -r3.394 nsPresShell.cpp --- nsPresShell.cpp 2001/04/27 21:11:03 3.394 +++ nsPresShell.cpp 2001/04/30 18:39:51 @@ -2796,7 +2796,9 @@ nsCOMPtr<nsIScriptGlobalObject> globalObj; mDocument->GetScriptGlobalObject(getter_AddRefs(globalObj)); - globalObj->HandleDOMEvent(mPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status); + if (globalObj) { + globalObj->HandleDOMEvent(mPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status); + } }
sr=bienvenu
Adding topcrash keyword and [@ PresShell::FireResizeEvent] to summary for tracking. This is a topcrasher with a few of the latest Trunk builds. Here is some Talkback data for future reference: PresShell::FireResizeEvent 22 First BBID :29432161 Last BBID :29777573 Min Runtime :53 Max Runtime :65826 First Appearance Date : 2001-04-21 Last Appearance Date : 2001-04-29 First BuildID : 2001042014 Last BuildID : 2001042822 Stack Trace: PresShell::FireResizeEvent() PresShell::sResizeEventCallback() nsTimerGtk::FireTimeout() process_timers() TimerCallbackFunc() libglib-1.2.so.0 + 0x1104d (0x406bb04d) libglib-1.2.so.0 + 0x10186 (0x406ba186) libglib-1.2.so.0 + 0x10751 (0x406ba751) libglib-1.2.so.0 + 0x108f1 (0x406ba8f1) libgtk-1.2.so.0 + 0x8c8e9 (0x405e28e9) nsAppShell::Run() nsAppShellService::Run() main1() main() libc.so.6 + 0x189cb (0x401e99cb) (29777573) Comments: Marked one group on secnews all read and then selected View | Messages | Threads with Unread. I think clicked on another group on secnews and crashed. (29752271) Comments: Switched in mail reader from personal IMAP account to another IMAP account. When asking for the user password (29731184) Comments: crash switching newsgroups (29730369) Comments: Right-clicking on a mail folder (29713765) Comments: changed a folder-- clicked on a different folder (29483997) Comments: switching from news.mozilla.org to Imap server to read mail (29445935) Comments: opening a new newsgroup after adjusting columns in msg view (29442780) URL: http://www.askmen.com/love/love_tip_60/67b_love_tip.html (29442780) Comments: reading mozilla newsgroups (29432161) URL: http://www.askmen.com/love/love_tip_60/67b_love_tip.html (29432161) Comments: reading mozilla newsgroups
Keywords: topcrash
Summary: crash in PresShell::FireResizeEvent because globalObj is null → Trunk crash [@ PresShell::FireResizeEvent] because globalObj is null
r=jst
Summary: Trunk crash [@ PresShell::FireResizeEvent] because globalObj is null → Trunk crash [@ PresShell::FireResizeEvent] because globalObj is n ull
Also a topcrash for M09. Here are some comments from recent crashes: (29752271) Comments: Switched in mail reader from personal IMAP account to another IMAP account. When asking for the user password (29731184) Comments: crash switching newsgroups (29730369) Comments: Right-clicking on a mail folder Here is a recent stack trace: PresShell::FireResizeEvent [d:\builds\seamonkey\mozilla\layout\html\base\src\nsPresShell.cpp line 2800] nsTimer::Fire [d:\builds\seamonkey\mozilla\widget\timer\src\windows\nsTimer.cpp line 196] nsTimerManager::FireNextReadyTimer [d:\builds\seamonkey\mozilla\widget\timer\src\windows\nsTimerManager.cpp line 117] nsAppShell::Run [d:\builds\seamonkey\mozilla\widget\src\windows\nsAppShell.cpp line 118] nsAppShellService::Run [d:\builds\seamonkey\mozilla\xpfe\appshell\src\nsAppShellService.cpp line 408] main1 [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 1012] main [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 1303] WinMain [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 1321] WinMainCRTStartup() KERNEL32.DLL + 0x1b9e4 (0xbff7b9e4) KERNEL32.DLL + 0x1b896 (0xbff7b896) KERNEL32.DLL + 0x1a24f (0xbff7a24f)
Summary: Trunk crash [@ PresShell::FireResizeEvent] because globalObj is n ull → Trunk & M09 crash [@ PresShell::FireResizeEvent] because globalObj is n ull
Whiteboard: [fixinhand]
Fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 76939 has been marked as a duplicate of this bug. ***
Blocks: 80378
QA contact updated
QA Contact: gerardok → madhur
marking verified as per developers comments.
Status: RESOLVED → VERIFIED
Crash Signature: [@ PresShell::FireResizeEvent]
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.