Closed Bug 11790 Opened 25 years ago Closed 25 years ago

Crash on quit, after "listeners not removed or notified" assert

Categories

(Core :: XPCOM, defect, P2)

All
Mac System 8.5
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: sfraser_bugs, Assigned: dp)

Details

(Keywords: crash, Whiteboard: Crash fixes checked in. dp still needs to eliminate the assert)

In today's debug build, I'm crashing on quit. First, I hit the assertion in nsServiceEntry::~nsServiceEntry() that says "listeners not removed or notified". Then, on continuing, I crash in the uconv DLL when ~nsServiceManagerImpl calls delete mServices
Priority: P3 → P2
Target Milestone: M9
M9, P2
Severity: normal → major
Status: NEW → ASSIGNED
I will remove the listener.
Whiteboard: fix ready?
I also see this when closing either the browser or editor by clicking in the closebox.
Whiteboard: fix ready? → working on a fix.
a partial stack trace: nsServiceEntry::~nsServiceEntry DeleteEntry hashEnumerateRemove PL_HashTableEnumerateEntries nsHashtable::Reset nsObjectHashtable::Reset nsObjectHashtable::~nsObjectHashtable nsServiceManagerImpl::~nsServiceManagerImpl nsServiceManagerImpl::Release NS_ShutdownXPCOM ...
ok, that was the stack crawl to get to the assertion... let me try again to get a *crash* stack crawl
Here's the crash: 035DA6C0 PPC 17E4BF30 main+0006C 035DA670 PPC 15A6832C NS_ShutdownXPCOM(nsIServiceManager*)+00028 035DA630 PPC 15A0CF88 nsServiceManagerImpl::Release()+00070 035DA5F0 PPC 15A0CE10 nsServiceManagerImpl::~nsServiceManagerImpl()+00044 035DA5B0 PPC 15A082AC nsObjectHashtable::~nsObjectHashtable()+00024 035DA570 PPC 15A084E4 nsObjectHashtable::Reset()+00020 035DA530 PPC 15A07CB4 nsHashtable::Reset(int (*)(nsHashKey*, void*, void* ), void*)+00044 035DA4E0 PPC 15A9463C PL_HashTableEnumerateEntries+00060 035DA470 PPC 15A07B98 _hashEnumerateRemove(PLHashEntry*, int, void*)+00038 035DA430 PPC 15A0CC60 DeleteEntry(nsHashKey*, void*, void*)+00024 035DA3F0 PPC 16A238DC nsCharsetConverterManager::Release()+00070 035DA3B0 PPC 16A23C24 nsCharsetConverterManager::~nsCharsetConverterManager()+00048 035DA370 PPC 17E362DC __destroy_new_array+00050
I managed to make some fixes to nsCharsetConverterManager.cpp and put off the crash until: * delete * nsHTMLEntities::ReleaseTable * nsParserFactory::~nsParserFactory * nsParserFactory::Release * nsFactoryEntry::~nsFactoryEntry * nsFactoryEntry_Destroy * hashEnumerateRemove * PL_HashTableEnumerateEntries * nsHashtable::Reset * nsObjectHashtable::Reset * nsObjectHashtable::~nsObjectHashtable ...
dp and I fixed 3 shutdown crashes. Save, localized fixes (e.g. delete [] instead of delete]
I fixed three things: html parser: Index: nsHTMLEntities.cpp =================================================================== RCS file: /cvsroot/mozilla/htmlparser/src/nsHTMLEntities.cpp,v retrieving revision 1.7 diff -r1.7 nsHTMLEntities.cpp 124c124 < delete gEntityArray; --- > delete[] gEntityArray; uconv: Index: nsCharsetConverterManager.cpp =================================================================== RCS file: /cvsroot/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp,v retrieving revision 1.24 diff -r1.24 nsCharsetConverterManager.cpp 52c52,53 < ConverterInfo() {} --- > ConverterInfo() > : mCharset(nsnull), mCID(nsnull) {} 54c55 < virtual ~ConverterInfo() --- > ~ConverterInfo() xpcom: Index: nsComponentManager.cpp =================================================================== RCS file: /cvsroot/mozilla/xpcom/components/nsComponentManager.cpp,v retrieving revision 1.58 diff -r1.58 nsComponentManager.cpp 164c164,166 < delete entry; --- > // nasty hack. We "know" that kNoCID was entered into the hash table. > if (entry != &kNoCID) > delete entry; 1273c1275 < mProgIDs->Put(&key, (void*) &kNoCID); --- > mProgIDs->Put(&key, (void *)&kNoCID); 1994c1996 < const nsFileSpec fs; --- > nsFileSpec fs;
Whiteboard: working on a fix. → Crash fixes checked in. dp still needs to eliminate the assert
Fixes checked in. dp still needs to eliminate the assert
Thanks simon for all this help. I will close the bug once I get the assertion out.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed assert also by calling shutdown listeners on xpcom shutdown.
Adding crash keyword
Keywords: crash
Component: XPCOM Registry → XPCOM
QA Contact: dp → xpcom
You need to log in before you can comment on or make changes to this bug.