winEmbed (Debug Build) has a ASSERTION

VERIFIED FIXED

Status

()

Core
Embedding: APIs
VERIFIED FIXED
17 years ago
16 years ago

People

(Reporter: ian holsman, Assigned: Adam Lock)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
to reproduce.

start winEmbed. (and let it load the page)
kill it (via close button)

C:\src\mozilla\dist\WIN32_D.OBJ\bin>winEmbed.exe

You are embedded, man!

Type Manifest File: C:\src\mozilla\dist\WIN32_D.OBJ\bin\components\xpti.dat
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
WARNING: CSSLoaderImpl::LoadAgentSheet: Load of URL
'file:///C:/DOCUMENTS%20AND%20SETTINGS/IANH/APPLICATION%20DATA/Mozil
la/Users50/default/pyke9xa9.slt/chrome/userChrome.css' failed.  Error code: 18,
file c:\src\mozilla\content\html\style\s
rc\nsCSSLoader.cpp, line 1531
WARNING: CSSLoaderImpl::LoadAgentSheet: Load of URL
'file:///C:/DOCUMENTS%20AND%20SETTINGS/IANH/APPLICATION%20DATA/Mozil
la/Users50/default/pyke9xa9.slt/chrome/userContent.css' failed.  Error code: 18,
file c:\src\mozilla\content\html\style\
src\nsCSSLoader.cpp, line 1531
WEBSHELL+ = 1
nsPluginHostImpl ctor
plugins at: C:\src\mozilla\dist\WIN32_D.OBJ\bin\plugins
plugins at: C:\Program Files\Netscape\Communicator\Program\Plugins
###
### mDiskDevice->Init() failed (0x80520008)
###    - disabling disk cache for this session.
###
Start reading in bookmarks.html
Finished reading in bookmarks.html  (50000 microseconds)
Enabling Quirk StyleSheet
Note: verifyreflow is disabled
It's NOT UTF-16LE- byte 23(17)
It's NOT UTF-16BE- byte 118(76)
Enabling Quirk StyleSheet
Note: styleverifytree is disabled
It's NOT HZ-GB-2312- byte 4663(1237)
Note: frameverifytree is disabled
/projects/embedding/
nsPluginHostImpl::Observe "xpcom-shutdown"
### beging nsCacheService::Shutdown()
### starting ~nsMemoryCacheDevice()
###!!! ASSERTION: event dropped because event chain is dead: 'mElderQueue', file
c:\src\mozilla\xpcom\threads\nsEventQue
ue.cpp, line 238

Cheers
Ian

Comment 1

17 years ago
Marking NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

17 years ago
Seems to be related to some threads not being terminated when mfcEmbed shuts
down. Investigating further.
(Assignee)

Comment 3

17 years ago
Problem appears to occur because cache entries (nsCacheEntry.cpp) hold a pointer
to the thread they are created on which is used during destruction to obtain the
thread's event queue to release a proxy pointer to the data.

Embedding apps such as winEmbed are returning nsnull instead of the thread's
event queue, because it has already been explicitly destroyed earlier in
NS_TermEmbedding before NS_ShutdownXPCOM is called.

The solution is to remove the code in NS_TermEmbedding that destroys the main
event queue and hope it is destroyed up later during NS_ShutdownXPCOM when it is
safe to do so.

nsCacheService::ProxyObjectRelease(nsISupports * 0x028c17d8, PRThread *
0x003554e8) line 877
nsCacheEntry::~nsCacheEntry() line 74 + 16 bytes
nsCacheEntry::`scalar deleting destructor'(unsigned int 0x00000001) + 15 bytes
nsMemoryCacheDevice::Shutdown() line 148 + 28 bytes
nsMemoryCacheDevice::~nsMemoryCacheDevice() line 69
nsMemoryCacheDevice::`scalar deleting destructor'(unsigned int 0x00000001) + 15
bytes
nsCacheService::Shutdown(nsCacheService * const 0x0271a818) line 308 + 33 bytes
nsCacheService::Observe(nsCacheService * const 0x0271a81c, nsISupports *
0x00358f70, const unsigned short * 0x0012fdec, const unsigned short *
0x00000000) line 1149
nsObserverService::Notify(nsObserverService * const 0x00f73790, nsISupports *
0x00358f70, const unsigned short * 0x0012fdec, const unsigned short *
0x00000000) line 238
NS_ShutdownXPCOM(nsIServiceManager * 0x00000000) line 452
NS_TermEmbedding() line 187 + 13 bytes
CMfcEmbedApp::ExitInstance() line 386
CWinThread::Run() line 481 + 11 bytes
CWinApp::Run() line 400
AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
0x0013342d, int 0x00000001) line 49 + 11 bytes
WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x0013342d,
int 0x00000001) line 30
WinMainCRTStartup() line 330 + 54 bytes
KERNEL32! 77e992a6()
(Assignee)

Comment 4

17 years ago
CC'ing a few more embedders for their opinion on the patch which follows.
(Assignee)

Comment 5

17 years ago
Created attachment 40099 [details] [diff] [review]
Patch removes explicit DestroyThreadEventQueue() to remove assertions. It gets destroyed safely later on when the event queue service is destroyed. Reviews please

Comment 6

17 years ago
r=rpotts
sr=blizzard
(Assignee)

Comment 8

17 years ago
Fix is checked into trunk
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 9

16 years ago
Clean up verification of dated code change bus
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.