Closed
Bug 43591
Opened 25 years ago
Closed 24 years ago
nsBasicDecoderSupport held past XPCOM shutdown in nsFSStringConversion
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla0.9
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
(Keywords: memory-leak, topembed+, Whiteboard: [tind-mlk])
Attachments
(4 files)
2.48 KB,
patch
|
Details | Diff | Splinter Review | |
9.74 KB,
patch
|
Details | Diff | Splinter Review | |
9.98 KB,
patch
|
Details | Diff | Splinter Review | |
943 bytes,
patch
|
Details | Diff | Splinter Review |
An nsCOMPtr<nsIUnicodeDecoder> pointing to an nsBasicDecoderSupport is held
past XPCOM shutdown by the global variable "nsFSStringConversion gConverter"
defined at:
http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsLocalFileCommon.cpp#124
See bug 43561 for more info.
Assignee | ||
Comment 1•25 years ago
|
||
This object holds on to an nsUnicodeDecodeHelper too.
Assignee | ||
Updated•25 years ago
|
Summary: nsBasicDecoderSupport held past XPCOM shutdown → nsBasicDecoderSupport held past XPCOM shutdown in nsFSStringConversion
Assignee | ||
Updated•25 years ago
|
Whiteboard: [tind-mlk]
Comment 2•25 years ago
|
||
My first guess is that this is a string issue that scc would handle better than
I. Reassigning to scc.
Assignee: rayw → scc
Comment 3•25 years ago
|
||
Un-related to string stuff, Ray. This is just an ordinary case of someone
keeping an owning reference in a static global, which delays the referents
destruction beyond the point where needed resources are already gone. You need
to figure out a way to shorten its lifetime.
Assignee: scc → rayw
Comment 4•25 years ago
|
||
I can create a listener to shorten the lifecycle, if everyone is willing to live
without conversion services in the I/O subsystem after xpcom shuts down.
Is there a document describing which services should be available when?
This seems to be part of the bigger question of whether string conversion
services should be tied to the initialization state of XPCOM.
Scott, any opinions? Am I owner of file I/O and string conversion services, so
I should fix it?
Comment 5•25 years ago
|
||
I think this has been mistagged as a memory leak. It is one case where XPCOM
file I/O does not release all resources during shutdown, and it is not clear
that it should. This may get cleared up if we can get time to better-describe
XPCOM lifecycle and relationship to conversion facilities. Marking futute.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 6•25 years ago
|
||
I think we are willing to live without any but the basic conversions (between
UTF8, ASCII, and UCS2 or whatever our double-byte format is) which I will ensure
live outside the range of XPCOM initialization.
Comment 7•25 years ago
|
||
Then we will have no conversion between native filesystem names and unicode.
Comment 8•24 years ago
|
||
can't we make this a static raw ptr and let some service w/ scope release it
when it goes away?
Keywords: nsbeta3
Comment 9•24 years ago
|
||
Why is it a static global variable if it is owned by some other object with
scope which comes and goes? We seem to lack an object model and discipline to
do it this way. I do not think spaghetti interdependencies help us.
If it is a static variable that must be managed by the scope of some singleton
object, it should be in the scope of that singleton object.
Comment 10•24 years ago
|
||
Edward: Welcome to xpcom!
Status: ASSIGNED → NEW
QA Contact: leger → rayw
Target Milestone: Future → mozilla1.0
Comment 11•24 years ago
|
||
Once again... attempting to reassign from Ray to Edward.
Assignee: rayw → kandrot
Assignee | ||
Comment 12•24 years ago
|
||
Assignee | ||
Comment 13•24 years ago
|
||
Assignee | ||
Comment 14•24 years ago
|
||
It seems the above patch also fixes bug 49575 (probably because OpenBSD has
problems with static constructors).
Comment 15•24 years ago
|
||
nice work. David, you should add an NS_StartUpLocalFile that basically noops to
compilment the NS_ShutdownLocalFile. or you could also allocate this class in
the heap in this startup method...
Fix this and you have an r=dougt
Assignee | ||
Comment 16•24 years ago
|
||
dougt: Where in NS_InitXPCOM2 would you want NS_StartupLocalFile to be called?
Without knowing what it would do, I'm not sure where to put it.
(While I'm here, assigning the bug to myself since I'm working on a fix.)
Assignee: kandrot → dbaron
Comment 17•24 years ago
|
||
Put it as early as possible; after the nsMemoryImpl::Startup would be perfect.
It would be for system initialization. For example, I would like to factor out
(on windows) the CoInitialize and CoUninitialize.
Assignee | ||
Comment 18•24 years ago
|
||
Comment 19•24 years ago
|
||
r=dougt.
--> SCC <-- can you please approve this change?
Comment 20•24 years ago
|
||
Chris could you approved this leak fix?
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla1.0 → mozilla0.9
Comment 21•24 years ago
|
||
sr=waterson
Assignee | ||
Comment 22•24 years ago
|
||
Fix checked in 2000-12-08 20:11 PST.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 23•24 years ago
|
||
Your fix broke XPCOM_STANDALONE. I'll attach a patch. If I can get a quick r=
and sr= I'll check it in and reclose this bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 24•24 years ago
|
||
Comment 25•24 years ago
|
||
r or sr=brendan@mozilla.org on jband's XPCOM_STANDALONE patch.
/be
Comment 26•24 years ago
|
||
duh! sorry about that jband. thanks for the quick patch.
Comment 27•24 years ago
|
||
dougt: turn that 'duh!' into an r= and I'll check it in when the tree clears.
Assignee | ||
Comment 28•24 years ago
|
||
r=dbaron Sorry about that.
Comment 29•24 years ago
|
||
No problem. Thanks for the quick reviews. Fix to XPCOM_STANDALONE checked in.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 30•24 years ago
|
||
*** Bug 58174 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•