Closed Bug 37280 Opened 25 years ago Closed 24 years ago

datasource leaks after clicking 'add' menu in sidebar

Categories

(Core Graveyard :: RDF, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: slamm, Assigned: waterson)

Details

(Keywords: memory-leak)

Attachments

(1 file)

WEBSHELL- = 2 WEBSHELL- = 1 nsWidget::~nsWidget() of toplevel: 3 widgets still exist. Shut down app shell component {18c2f989-b09f-11d2-bcde-00805f0e1353}, rv=0x00000000 ###!!! ASSERTION: unable to acquire resource manager: 'NS_SUCCEEDED(rv)', file nsContainerEnumerator.cpp, line 104 ###!!! Break: at file nsContainerEnumerator.cpp, line 104 ###!!! ASSERTION: null ptr: 'property != nsnull', file nsInMemoryDataSource.cpp, line 927 I am working on the panel picker for the sidebar panels. Starting this week, I noticed that if I hide or show a panel via the panel picker menu, it causes an error during the flush of panels.rdf (and corrupts the file): [...] WEBSHELL- = 1 nsWidget::~nsWidget() of toplevel: 3 widgets still exist. Shut down app shell component {18c2f989-b09f-11d2-bcde-00805f0e1353}, rv=0x00000000 ###!!! ASSERTION: unable to acquire resource manager: 'NS_SUCCEEDED(rv)', file nsContainerEnumerator.cpp, line 104 ###!!! Break: at file nsContainerEnumerator.cpp, line 104 ###!!! ASSERTION: null ptr: 'property != nsnull', file nsInMemoryDataSource.cpp, line 927 ###!!! Break: at file nsInMemoryDataSource.cpp, line 927 ~nsProfile killing plugin host nsWidget::~nsWidget() of toplevel: 0 widgets still exist. WEBSHELL- = 0 CanUnload_enumerate: skipping native GC Cache: hits: 2220 433 119 84 30 44 29 33 12 24 hits: 3028, misses: 682, hit percent: 81.617249% The error only occurs on exit. If I check panels.rdf immediately after the menu operation, the file looks fine. It even has the last changes, because I flush the file after the action. I tried this on windows too and it ran without a problem. I checked in all the code for the panel picker this morning (4/26/00), but I commented out the menu because of this problem. To use the menu, you need to edit sidebarOverlay.xul. Uncomment the <menu> with id="panel-picker" and comment out the <button> above it. I will attach a patch of the change too.
I tested on Windows again, and I do see the problem there as well.
Here is the windows stack when the assertion is hit: ContainerEnumeratorImpl::ContainerEnumeratorImpl(nsIRDFDataSource * 0x02ef1300, nsIRDFResource * 0x02e8a890) line 104 + 35 bytes NS_NewContainerEnumerator(nsIRDFDataSource * 0x02ef1300, nsIRDFResource * 0x02e8a890, nsISimpleEnumerator * * 0x0012f418) line 254 + 35 bytes RDFXMLDataSourceImpl::SerializeContainer(nsIOutputStream * 0x039214f4, nsIRDFResource * 0x02e8a890) line 1545 + 46 bytes RDFXMLDataSourceImpl::Serialize(RDFXMLDataSourceImpl * const 0x02ef137c, nsIOutputStream * 0x039214f4) line 1679 + 19 bytes RDFXMLDataSourceImpl::Flush(RDFXMLDataSourceImpl * const 0x02ef1374) line 822 + 25 bytes RDFXMLDataSourceImpl::~RDFXMLDataSourceImpl() line 515 + 12 bytes RDFXMLDataSourceImpl::`scalar deleting destructor'(unsigned int 1) + 15 bytes RDFXMLDataSourceImpl::Release(RDFXMLDataSourceImpl * const 0x02ef1370) line 562 + 154 bytes CompositeDataSourceImpl::Release(CompositeDataSourceImpl * const 0x02d7ffa0) line 579 + 12 bytes nsCOMPtr<nsIRDFCompositeDataSource>::~nsCOMPtr<nsIRDFCompositeDataSource>() line 465 nsXULElement::Slots::~Slots() line 4518 + 42 bytes nsXULElement::Slots::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsXULElement::~nsXULElement() line 423 + 31 bytes nsXULElement::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsXULElement::Release(nsXULElement * const 0x02d7d1f0) line 597 + 157 bytes nsSupportsArray::Clear(nsSupportsArray * const 0x02d7d190) line 319 + 36 bytes nsSupportsArray::DeleteArray() line 64 nsSupportsArray::~nsSupportsArray() line 41 nsSupportsArray::`vector deleting destructor'(unsigned int 1) + 81 bytes nsSupportsArray::Release(nsSupportsArray * const 0x02d7d190) line 59 + 127 bytes nsCOMPtr<nsISupportsArray>::~nsCOMPtr<nsISupportsArray>() line 465 nsXULElement::~nsXULElement() line 489 + 22 bytes nsXULElement::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsXULElement::Release(nsXULElement * const 0x02d7d4c0) line 597 + 157 bytes nsSupportsArray::Clear(nsSupportsArray * const 0x02d7d2c0) line 319 + 36 bytes nsSupportsArray::DeleteArray() line 64 nsSupportsArray::~nsSupportsArray() line 41 nsSupportsArray::`vector deleting destructor'(unsigned int 1) + 81 bytes nsSupportsArray::Release(nsSupportsArray * const 0x02d7d2c0) line 59 + 127 bytes nsCOMPtr<nsISupportsArray>::~nsCOMPtr<nsISupportsArray>() line 465 nsXULElement::~nsXULElement() line 489 + 22 bytes nsXULElement::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsXULElement::Release(nsXULElement * const 0x02d7da50) line 597 + 157 bytes nsSupportsArray::Clear(nsSupportsArray * const 0x02dd57c0) line 319 + 36 bytes nsSupportsArray::DeleteArray() line 64 nsSupportsArray::~nsSupportsArray() line 41 nsSupportsArray::`vector deleting destructor'(unsigned int 1) + 81 bytes nsSupportsArray::Release(nsSupportsArray * const 0x02dd57c0) line 59 + 127 bytes nsCOMPtr<nsISupportsArray>::~nsCOMPtr<nsISupportsArray>() line 465 nsXULElement::~nsXULElement() line 489 + 22 bytes nsXULElement::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsXULElement::Release(nsXULElement * const 0x02b9bd50) line 597 + 157 bytes nsSupportsArray::Clear(nsSupportsArray * const 0x02b9bcf0) line 319 + 36 bytes nsSupportsArray::DeleteArray() line 64 nsSupportsArray::~nsSupportsArray() line 41 nsSupportsArray::`vector deleting destructor'(unsigned int 1) + 81 bytes nsSupportsArray::Release(nsSupportsArray * const 0x02b9bcf0) line 59 + 127 bytes nsCOMPtr<nsISupportsArray>::~nsCOMPtr<nsISupportsArray>() line 465 nsXULElement::~nsXULElement() line 489 + 22 bytes nsXULElement::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsXULElement::Release(nsXULElement * const 0x02b9bde0) line 597 + 157 bytes nsSupportsArray::Clear(nsSupportsArray * const 0x0239dc10) line 319 + 36 bytes nsSupportsArray::DeleteArray() line 64 nsSupportsArray::~nsSupportsArray() line 41 nsSupportsArray::`vector deleting destructor'(unsigned int 1) + 81 bytes nsSupportsArray::Release(nsSupportsArray * const 0x0239dc10) line 59 + 127 bytes nsCOMPtr<nsISupportsArray>::~nsCOMPtr<nsISupportsArray>() line 465 nsXULElement::~nsXULElement() line 489 + 22 bytes nsXULElement::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsXULElement::Release(nsXULElement * const 0x02b2ef90) line 597 + 157 bytes nsCOMPtr<nsIContent>::~nsCOMPtr<nsIContent>() line 465 nsXULDocument::~nsXULDocument() line 534 + 398 bytes nsXULDocument::`scalar deleting destructor'() + 15 bytes nsXULDocument::Release(nsXULDocument * const 0x025024d0) line 628 + 158 bytes nsEventStateManager::~nsEventStateManager() line 160 + 36 bytes nsEventStateManager::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsEventStateManager::Release(nsEventStateManager * const 0x02e095e0) line 232 + 154 bytes nsSupportsArray::Clear(nsSupportsArray * const 0x02497610) line 319 + 36 bytes nsSupportsArray::DeleteArray() line 64 nsSupportsArray::~nsSupportsArray() line 41 nsSupportsArray::`vector deleting destructor'(unsigned int 1) + 81 bytes nsSupportsArray::Release(nsSupportsArray * const 0x02497610) line 59 + 127 bytes nsObserverList::~nsObserverList() line 186 + 27 bytes nsObserverList::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsObserverList::Release(nsObserverList * const 0x02497830) line 157 + 152 bytes ReleaseObserverList(nsHashKey * 0x024976b0, void * 0x02497830, void * 0x00000000) line 98 + 12 bytes _hashEnumerateRemove(PLHashEntry * 0x02497670, int 5, void * 0x0012fcd8) line 227 + 26 bytes PL_HashTableEnumerateEntries(PLHashTable * 0x01051e80, int (PLHashEntry *, int, void *)* 0x10016240 _hashEnumerateRemove(PLHashEntry *, int, void *), void * 0x0012fcd8) line 368 + 15 bytes nsHashtable::Reset(int (nsHashKey *, void *, void *)* 0x10023d40 ReleaseObserverList(nsHashKey *, void *, void *), void * 0x00000000) line 243 + 20 bytes nsObjectHashtable::Reset() line 347 nsObjectHashtable::~nsObjectHashtable() line 313 nsObjectHashtable::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsObserverService::~nsObserverService() line 63 + 31 bytes nsObserverService::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsObserverService::Release(nsObserverService * const 0x01051fe0) line 46 + 127 bytes DeleteEntry(nsHashKey * 0x01051f60, void * 0x01051fa0, void * 0x00000000) line 210 + 18 bytes _hashEnumerateRemove(PLHashEntry * 0x01051f20, int 29, void * 0x0012fdcc) line 227 + 26 bytes PL_HashTableEnumerateEntries(PLHashTable * 0x00c45da0, int (PLHashEntry *, int, void *)* 0x10016240 _hashEnumerateRemove(PLHashEntry *, int, void *), void * 0x0012fdcc) line 368 + 15 bytes nsHashtable::Reset(int (nsHashKey *, void *, void *)* 0x10053e50 DeleteEntry(nsHashKey *, void *, void *), void * 0x00000000) line 243 + 20 bytes nsObjectHashtable::Reset() line 347 nsObjectHashtable::~nsObjectHashtable() line 313 nsObjectHashtable::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsServiceManagerImpl::~nsServiceManagerImpl() line 235 + 31 bytes nsServiceManagerImpl::`scalar deleting destructor'(unsigned int 1) + 15 bytes nsServiceManagerImpl::Release(nsServiceManagerImpl * const 0x00c44090) line 244 + 152 bytes nsServiceManager::ShutdownGlobalServiceManager(nsIServiceManager * * 0x00000000) line 484 + 17 bytes NS_ShutdownXPCOM(nsIServiceManager * 0x00000000) line 606 + 7 bytes main(int 1, char * * 0x00c441e0) line 1002 + 8 bytes mainCRTStartup() line 338 + 17 bytes KE
Blocks: 24035
This no longer blocks 24035 because Chris found a workaround.
No longer blocks: 24035
Changing this to mean a memory leak, which is sort of the root of this problem.
Status: NEW → ASSIGNED
Keywords: mlk
Summary: menu from template causes datasource errors on exit → datasource leaks after clicking 'add' menu in sidebar
Target Milestone: --- → M18
Tested in current build: 1. Bring up browser window, use sidebar popup menu to tinker with displayed panel. 2. Use "customize" dialog to add and remove panels. In both cases, no leaks (beyond startup leaks) were introduced. Marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified per engineer's comments
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: