After registering a component, can't start mozilla (crashes)

VERIFIED FIXED in mozilla1.3alpha

Status

()

Core
XPCOM
--
blocker
VERIFIED FIXED
15 years ago
15 years ago

People

(Reporter: David Epstein, Assigned: dougt)

Tracking

({crash})

Trunk
mozilla1.3alpha
All
Windows XP
crash
Points:
---
Bug Flags:
blocking1.3a +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
11/25/02 Mozilla 1.3 trunk build. Happens on Win and Linux. Note that mozilla
could launch after each of these steps below, until after step 6; or if steps
1-6 were run in succession, then mozilla wouldn't launch.
1. cd /mozilla/dist/bin/components
2. mv xpcomsmp.dll /temp (out of ../dist/bin folder). For linux, move
libxpcomsample.so
3. rm compreg.dat
4. cd .. (to /dist/bin)
5. ./regxpcom
6. ./regxpcom <path to xpcomsmp.dll (or libxpcomsample.so) component>
7. ./mozilla
Result: All these web shells try opening. Crash, unhandled exception.

Stack trace:
getter_AddRefs(nsCOMPtr<nsIEventQueue> & {...}) line 1083 + 7 bytes
nsEventQueueImpl::GetYoungestActive(nsEventQueueImpl * const 0x0533223c,
nsIEventQueue * * 0x00033040) line 571 + 13 bytes
nsEventQueueImpl::GetYoungestActive(nsEventQueueImpl * const 0x053194a4,
nsIEventQueue * * 0x00033060) line 571 + 42 bytes
nsEventQueueImpl::GetYoungestActive(nsEventQueueImpl * const 0x0530070c,
nsIEventQueue * * 0x00033080) line 571 + 42 bytes
... etc (several times for each web shell I guess)
...
nsEventQueueServiceImpl::GetYoungestEventQueue(nsIEventQueue * 0x00d0c0f8,
nsIEventQueue * * 0x00035e6c) line 247 + 47 bytes
nsEventQueueServiceImpl::GetThreadEventQueue(nsEventQueueServiceImpl * const
0x00d0ad80, PRThread * 0x00000000, nsIEventQueue * * 0x053a0ed8) line 387 + 41 bytes
nsEventQueueServiceImpl::GetSpecialEventQueue(nsEventQueueServiceImpl * const
0x00d0ad80, int 0, nsIEventQueue * * 0x053a0ed8) line 432 + 18 bytes
nsRequestObserverProxy::SetEventQueue(nsIEventQueue * 0x00000000) line 328 + 54
bytes
nsRequestObserverProxy::Init(nsRequestObserverProxy * const 0x053a0ec8,
nsIRequestObserver * 0x053a0a6c, nsIEventQueue * 0x00000000) line 306
nsStreamListenerProxy::Init(nsStreamListenerProxy * const 0x053a0e60,
nsIStreamListener * 0x053a0a6c, nsIEventQueue * 0x00000000, unsigned int 4096,
unsigned int 16384) line 412 + 31 bytes
NS_NewStreamListenerProxy(nsIStreamListener * * 0x053a0bd4, nsIStreamListener *
0x053a0a6c, nsIEventQueue * 0x00000000, unsigned int 4096, unsigned int 16384)
line 527 + 39 bytes
nsFileTransport::AsyncRead(nsFileTransport * const 0x053a0b78, nsIStreamListener
* 0x053a0a6c, nsISupports * 0x00000000, unsigned int 0, unsigned int 4294967295,
unsigned int 0, nsIRequest * * 0x053a0af4) line 517 + 52 bytes
nsJARChannel::AsyncReadJARElement() line 363 + 119 bytes
nsJARChannel::EnsureJARFileAvailable() line 318 + 8 bytes
nsJARChannel::AsyncOpen(nsJARChannel * const 0x053a0a68, nsIStreamListener *
0x053a0b30, nsISupports * 0x00000000) line 279 + 8 bytes
nsDocumentOpenInfo::Open(nsIChannel * 0x053a0a68, int 0, nsISupports *
0x053983a0) line 171 + 18 bytes
nsURILoader::OpenURIVia(nsURILoader * const 0x010fecd0, nsIChannel * 0x053a0a68,
int 0, nsISupports * 0x053983a0, unsigned int 0) line 611 + 20 bytes
nsURILoader::OpenURI(nsURILoader * const 0x010fecd0, nsIChannel * 0x053a0a68,
int 0, nsISupports * 0x053983a0) line 573
nsDocShell::DoChannelLoad(nsIChannel * 0x053a0a68, nsIURILoader * 0x010fecd0)
line 5516 + 39 bytes
nsDocShell::DoURILoad(nsIURI * 0x05398b18, nsIURI * 0x00000000, nsISupports *
0x00000000, nsIInputStream * 0x00000000, nsIInputStream * 0x00000000, int 1,
nsIDocShell * * 0x00000000, nsIRequest * * 0x00000000) line 5291 + 38 bytes
nsDocShell::InternalLoad(nsDocShell * const 0x053983a0, nsIURI * 0x05398b18,
nsIURI * 0x00000000, nsISupports * 0x00000000, int 1, const unsigned short *
0x05398cf0, nsIInputStream * 0x00000000, nsIInputStream * 0x00000000, unsigned
int 1, nsISHEntry * 0x00000000, int 1, nsIDocShell * * 0x00000000, nsIRequest *
* 0x00000000) line 5083 + 51 bytes
nsDocShell::LoadURI(nsDocShell * const 0x053983a0, nsIURI * 0x05398b18,
nsIDocShellLoadInfo * 0x05398c88, unsigned int 0, int 1) line 725 + 73 bytes
nsDocShell::LoadURI(nsDocShell * const 0x053983b0, const unsigned short * 
...
(Reporter)

Comment 1

15 years ago
note that other apps in /dist/bin like MfcEmbed don't start as well.
QA Contact: scc → depstein
(Reporter)

Updated

15 years ago
Keywords: crash
(Assignee)

Comment 2

15 years ago
Created attachment 108083 [details] [diff] [review]
patch v1

The problem was that only AutoRegisterImpl() would initalize the
mCategoryManager variable.  This method is only called by some applications
(mozilla, not regxpcom.)  So, after you registered a new component with
regxpcom, you would lose the category info.  So, this mCategory varialble is
required to be set so that we could write out the category entries when
shutting down (assuming that they were dirty).	To fix this problem, I moved
this initalization of mCategoryManager to ReadPersistentRegistry where it
should have been in the first place (as this method is always called by
InitXPCOM).
(Assignee)

Updated

15 years ago
Severity: critical → blocker
Target Milestone: --- → mozilla1.3alpha

Comment 3

15 years ago
Comment on attachment 108083 [details] [diff] [review]
patch v1

sr=alecf
Attachment #108083 - Flags: superreview+

Comment 4

15 years ago
We need this for 1.3alpha so I've set the blocking1.3a+ flag.
Flags: blocking1.3a+

Comment 5

15 years ago
Comment on attachment 108083 [details] [diff] [review]
patch v1

>Index: nsComponentManager.cpp

>+    if (!mCategoryManager) {
>+		NS_WARNING("mCategoryManager is null");
>+		return NS_ERROR_UNEXPECTED;
>+	}

remove tabs and r=darin
Attachment #108083 - Flags: review+
(Assignee)

Comment 6

15 years ago
Checking in nsComponentManager.cpp;
/cvsroot/mozilla/xpcom/components/nsComponentManager.cpp,v  <-- 
nsComponentManager.cpp
new revision: 1.216; previous revision: 1.215
done

thanks everyone - especially David for finding this bug!
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
(Reporter)

Comment 7

15 years ago
verified Mozilla 1.3a Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a)
Gecko/20021205 
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.