Re: crash during gDirServiceProvider destruction
David Byron <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.embedding |
|---|---|
| Message-ID | <[email protected]> |
On 11/22/2010 3:50 PM, David Byron wrote: > I'm working on an app running under Win7 that embeds Gecko and I've run > into a crash during XRE_TermEmbedding that I'm trying to resolve. The > stack track for the crash is: > > xul.dll!nsCOMPtr<nsIDirectoryServiceProvider>::~nsCOMPtr<nsIDirectoryServiceProvider>() > > xul.dll!nsXREDirProvider::~nsXREDirProvider() > xul.dll!nsXREDirProvider::`scalar deleting destructor'() > xul.dll!XRE_TermEmbedding() > > Or most likely, I need to change something > in my code. I think I found the problem. As far as I can tell, XRE_TermEmbedding deletes the object I pass as aAppDirProvider to XRE_InitEmbedding so I need to make sure I don't delete it myself. I suppose this depends on how I've implemented reference counting and whether I keep an extra reference myself. I'm still wrapping my head around all of that but at least I have a way that doesn't crash (or at least doesn't crash in this particular way). -DB