Closed Bug 43589 Opened 24 years ago Closed 23 years ago

nsTimer and nsTimerManager held past XPCOM shutdown in static nsCOMPtr

Categories

(Core :: XUL, defect, P3)

x86
Windows 98
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.7

People

(Reporter: dbaron, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

(Keywords: memory-leak, topembed+, Whiteboard: [nsbeta3-])

Attachments

(1 file, 3 obsolete files)

There's no good component for the non-XP widget code anymore! The variable "static nsCOMPtr<nsITimerQueue> sTimerQueue" defined at http://lxr.mozilla.org/seamonkey/source/widget/timer/src/windows/nsTimer.cpp#40 holds an nsTimerManager past XPCOM shutdown. See bug 43561 for more info.
Let's make this bug also cover the nsTimerManager held in the static nsCOMPtr on the line before (the static nsCOMPtr<nsIWindowsTimerMap> sTimerMap).
Summary: nsTimerManager held past XPCOM shutdown in static nsCOMPtr → nsTimer and nsTimerManager held past XPCOM shutdown in static nsCOMPtr
Blocks: 43561
Keywords: mlk
this code has michael lowe's and ramiro's names all over it. doesn't look like anyone on xptoolkit ever touched a line of this code.
Assignee: trudelle → michael.lowe
Blocks: 38671
can't we make this a static raw ptr and let some service w/ scope release it when it goes away?
Keywords: nsbeta3
Jud, is this needed for your embedding stuff? And if so, could you make the nsbeta3 + or - call on it? Thanks.
Whiteboard: [nsbeta3+]
Not holding PR3 for this, marking nsbeta3-. Please nominate for rtm if we really need to fix this before shipping seamonkey
Whiteboard: [nsbeta3+] → [nsbeta3-]
it does not compile :( C:\moz_sour\mozilla\mozilla\widget\timer\src\windows>patch < timerpatch.txt patching file `nsTimer.cpp' patching file `nsWindowsTimer.h' C:\moz_sour\mozilla\mozilla\widget\timer\src\windows>nmake -f makefile.win depen d Microsoft (R) Program Maintenance-Dienstprogramm: Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. Alle Rechte vorbehalten. Analyzing dependencies... C:\moz_sour\mozilla\mozilla\widget\timer\src\windows>nmake -f makefile.win Microsoft (R) Program Maintenance-Dienstprogramm: Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. Alle Rechte vorbehalten. +++ make: exporting headers Installing nsWindowsTimer.h into ..\..\..\..\dist\include\nsWindowsTimer.h nsTimer.cpp C:\moz_sour\mozilla\mozilla\widget\timer\src\windows\nsTimer.cpp(113) : error C2 665: 'GetService' : Durch keine der 2 Ueberladungen kann Parameter 3 vom Typ 'cl ass nsIWindowsTimerMap ** ' konvertiert werden C:\moz_sour\mozilla\mozilla\widget\timer\src\windows\nsTimer.cpp(116) : error C2 665: 'GetService' : Durch keine der 2 Ueberladungen kann Parameter 3 vom Typ 'cl ass nsITimerQueue ** ' konvertiert werden NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~2\VC98\BIN\cl.exe' : Rueckgabe-Co de '0x2' Stop. NMAKE : fatal error U1077: '"C:\PROGRAMME\MICROSOFT VISUAL STUDIO\VC98\BIN\NMAKE .exe"' : Rueckgabe-Code '0x2' Stop. translations: No of the overload can convert Parameter 3 of type ...
Attached patch revised patch (obsolete) (deleted) — Splinter Review
Attached file bloat log with the applied patch (obsolete) (deleted) —
I can't believe it, no more assertions on exit. :-)
Blocks: 60697
the windows timer shutdown needs to be fixed before this patch gets checked in. Since the timer code is build as a static library, we will have to make the widget proper call nsTimer::Shutdown(). To make this call, you can either hack a state in the nsToolkit::WindowProc() which intercepts app quit and in that make the call to shutdown the timer, or as your comments note, make the windows widget a generic module similar to what was done for the gtk widget: http://lxr.mozilla.org/seamonkey/source/widget/timer/src/unix/gtk/nsTimerGtkFact ory.cpp#36
Windows widget is now a generic module.
Blocks: 92580
No longer blocks: 92580
taking
Assignee: michael.lowe → dbaron
Attached patch patch (deleted) — Splinter Review
Attachment #21632 - Attachment is obsolete: true
Attachment #21732 - Attachment is obsolete: true
Attachment #21734 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.7
Comment on attachment 60921 [details] [diff] [review] patch r=jag
Attachment #60921 - Flags: review+
Ooh, I meant to set |sCachedServices = PR_FALSE;| in nsTimer::Shutdown like in the previous patch.
Fix checked in 2001-12-08 14:40 PDT.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Keywords: topembed+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: