Closed
Bug 218675
Opened 21 years ago
Closed 21 years ago
ipcService::~ipcService() ASSERTION: no xpcom-shutdown event??: 'mTransport == nsnull' is incorrect
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: timeless, Assigned: timeless)
Details
(Keywords: assertion)
Attachments
(1 file)
670 bytes,
patch
|
darin.moz
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
NS_ASSERTION(mTransport == nsnull, "no xpcom-shutdown event??"); nsDebug::Assertion(const char * 0x0386d4a8, const char * 0x0386d490, const char * 0x0386d45c, int 167) line 109 ipcService::~ipcService() line 167 + 35 bytes ipcService::`scalar deleting destructor'(unsigned int 1) + 15 bytes ipcService::Release(ipcService * const 0x00914c20) line 296 + 215 bytes nsSupportsArray::Clear(nsSupportsArray * const 0x00910230) line 559 + 54 bytes nsSupportsArray::DeleteArray() line 304 nsSupportsArray::~nsSupportsArray() line 147 nsSupportsArray::`vector deleting destructor'(unsigned int 1) + 81 bytes nsSupportsArray::Release(nsSupportsArray * const 0x00910230) line 238 + 148 bytes nsCOMPtr<nsISupportsArray>::~nsCOMPtr<nsISupportsArray>() line 475 nsObserverList::~nsObserverList() line 58 + 11 bytes nsObserverList::`scalar deleting destructor'(unsigned int 1) + 15 bytes ReleaseObserverList(nsHashKey * 0x009102a0, void * 0x009103d0, void * 0x00000000) line 106 + 28 bytes hashEnumerateRemove(PLDHashTable * 0x008ed938, PLDHashEntryHdr * 0x0102dc4c, unsigned int 4, void * 0x0012fd2c) line 315 + 26 bytes PL_DHashTableEnumerate(PLDHashTable * 0x008ed938, int (PLDHashTable *, PLDHashEntryHdr *, unsigned int, void *)* 0x0024b8a0 hashEnumerateRemove(PLDHashTable *, PLDHashEntryHdr *, unsigned int, void *), void * 0x0012fd2c) line 619 + 34 bytes nsHashtable::Reset(int (nsHashKey *, void *, void *)* 0x00246f50 ReleaseObserverList(nsHashKey *, void *, void *), void * 0x00000000) line 336 + 21 bytes nsObjectHashtable::Reset() line 778 nsObjectHashtable::~nsObjectHashtable() line 737 nsObjectHashtable::`vector deleting destructor'(unsigned int 1) + 81 bytes nsObserverService::~nsObserverService() line 81 + 33 bytes nsObserverService::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsObserverService::Release(nsObserverService * const 0x008eda70) line 71 + 142 bytes nsCOMPtr_base::assign_assuming_AddRef(nsISupports * 0x00000000) line 429 nsCOMPtr_base::assign_with_AddRef(nsISupports * 0x00000000) line 75 nsCOMPtr<nsISupports>::operator=(nsISupports * 0x00000000) line 815 FreeServiceContractIDEntryEnumerate(PLDHashTable * 0x008b6e9c, PLDHashEntryHdr * 0x0105dcf8, unsigned int 783, void * 0x00000000) line 2094 PL_DHashTableEnumerate(PLDHashTable * 0x008b6e9c, int (PLDHashTable *, PLDHashEntryHdr *, unsigned int, void *)* 0x00291910 FreeServiceContractIDEntryEnumerate(PLDHashTable *, PLDHashEntryHdr *, unsigned int, void *), void * 0x00000000) line 619 + 34 bytes nsComponentManagerImpl::FreeServices() line 2108 + 19 bytes NS_ShutdownXPCOM(nsIServiceManager * 0x00000000) line 744 main(int 0, char * * 0x008b42f4, char * * 0x008b0e00) line 1097 + 8 bytes mainCRTStartup() line 338 + 17 bytes The assertion is incorrect. testcase: run xpcshell Components.classes["@mozilla.org/ipc/service;1"].getService(); quit(); ###!!! ASSERTION: no xpcom-shutdown event??: 'mTransport == nsnull', file i:/build/mozilla/ipc/ipcd/client/src/ipcService.cpp, line 167 Break: at file i:/build/mozilla/ipc/ipcd/client/src/ipcService.cpp, line 167 Set a breakpoint in ::Observe() + topic 0x003291f4 "xpcom-shutdown" ipcService::Observe(ipcService * const 0x00914a08, nsISupports * 0x008b5274, const char * 0x003291f4, const unsigned short * 0x00000000) line 479 nsObserverService::NotifyObservers(nsObserverService * const 0x008edab0, nsISupports * 0x008b5274, const char * 0x003291f4, const unsigned short * 0x00000000) line 210 NS_ShutdownXPCOM(nsIServiceManager * 0x00000000) line 710 main(int 0, char * * 0x008b42f4, char * * 0x008b0e00) line 1097 + 8 bytes mainCRTStartup() line 338 + 17 bytes
Comment 1•21 years ago
|
||
IPC is not a priority at the moment. Patches welcome.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
if someone could explain what's supposed to clean out mTransport or whether it's acceptable for the destructor to do it...
Comment 3•21 years ago
|
||
yeah, this is bad. the ipcService needs to both release the ipcTransport as well as clear the ipcTransport's back reference to the ipcService. that is stored under ipcTransport::mObserver. i think the xpcom-shutdown notification can take care of this, but it is also probably ok to do the same from the ipcService destructor. it might be good to move all the code from Observe("xpcom-shutdown") into a method that can be called from both places. of course, i would prefer to assume that "xpcom-shutdown" will always happen since that'd be less code.
Attachment #131156 -
Flags: superreview?(darin)
Attachment #131156 -
Flags: review?(darin)
Comment 5•21 years ago
|
||
Comment on attachment 131156 [details] [diff] [review] honor expectation of assert looks good. thanks timeless! r+sr=darin
Attachment #131156 -
Flags: superreview?(darin)
Attachment #131156 -
Flags: superreview+
Attachment #131156 -
Flags: review?(darin)
Attachment #131156 -
Flags: review+
bonsai indicates i checked this in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
QA Contact: carosendahl → ipc
You need to log in
before you can comment on or make changes to this bug.
Description
•