Closed Bug 234916 Opened 20 years ago Closed 20 years ago

Remove global/static NS_NAMED_LITERAL_C?STRING usage [was: Firefox crashes on startup on Mac OS X]

Categories

(Core :: XPCOM, defect)

PowerPC
macOS
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla1.7beta

People

(Reporter: jtalkington, Assigned: darin.moz)

References

Details

(Keywords: regression)

Attachments

(1 file, 3 obsolete files)

User-Agent:       
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

This looks to be the result of the checkin for bug 231995:

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x15037d74 in nsACString::GetReadableBuffer(char const**) const (this=0x10df780,
data=0xbfffd040) at nsTAString.cpp:368
368         AsObsoleteString()->GetReadableFragment(frag,
obsolete_string_type::kFirstFragment, 0);
(gdb) bt 8
#0  0x15037d74 in nsACString::GetReadableBuffer(char const**) const
(this=0x10df780, data=0xbfffd040) at nsTAString.cpp:368
#1  0x15037f88 in nsACString::ToSubstring() const (this=0x10df780) at
nsTAString.cpp:403
#2  0x1503dccc in nsCSubstringTuple::IsDependentOn(char const*, char const*)
const (this=0xbfffd310, start=0xbfffd2b4 "", end=0xbfffd2b4 "") at
nsTSubstringTuple.cpp:126
#3  0x1503dc70 in nsCSubstringTuple::IsDependentOn(char const*, char const*)
const (this=0xbfffd300, start=0xbfffd2b4 "", end=0xbfffd2b4 "") at
nsTSubstringTuple.cpp:124
#4  0x1503c9d0 in nsCSubstring::Assign(nsCSubstringTuple const&)
(this=0xbfffd2a0, tuple=@0xbfffd300) at nsTSubstring.cpp:313
#5  0x00d2d3d4 in nsCAutoString::nsCAutoString(nsCSubstringTuple const&)
(this=0xbfffd2a0, tuple=@0xbfffd300) at ../../../dist/include/string/nsTString.h:516
#6  0x00d2d1a4 in nsCAutoString::nsCAutoString(nsCSubstringTuple const&)
(this=0xbfffd2a0, tuple=@0xbfffd300) at ../../../dist/include/string/nsTString.h:517
#7  0x001a4984 in nsScriptSecurityManager::InitDomainPolicy(JSContext*, char
const*, DomainPolicy*) (this=0x142e97a0, cx=0x14a9fd40, aPolicyName=0xce3260
"default", aDomainPolicy=0x1ab0bc60) at nsScriptSecurityManager.cpp:2913
(More stack frames follow...)

It works fine on my Linux box, but I can't seem to get gdb to recognize the
source files to make a comparison.  From what I was able to dig out, it's taking
the same source path.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Blocks: 231995
confirmed in build 2004-02-19-10-trunk , on Mac OS X 10.2.8, G3/300Mhz
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: string → darin
ok, kicking off a firefox debug build on 10.3 now...
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.7beta
i wonder if this has something to do with sPolicyPrefix being declared static:

static NS_NAMED_LITERAL_CSTRING(sPolicyPrefix, "capability.policy.");

that might be messing things up here.  can you try this patch:

Index: nsScriptSecurityManager.cpp
===================================================================
RCS file: /cvsroot/mozilla/caps/src/nsScriptSecurityManager.cpp,v
retrieving revision 1.225
diff -u -r1.225 nsScriptSecurityManager.cpp
--- nsScriptSecurityManager.cpp 9 Feb 2004 22:48:29 -0000       1.225
+++ nsScriptSecurityManager.cpp 20 Feb 2004 02:02:29 -0000
@@ -2574,7 +2574,7 @@
 // Method implementing nsIObserver //
 /////////////////////////////////////
 static const char sPrincipalPrefix[] = "capability.principal";
-static NS_NAMED_LITERAL_CSTRING(sPolicyPrefix, "capability.policy.");
+static const char sPolicyPrefix[] = "capability.policy.";
  
 NS_IMETHODIMP
 nsScriptSecurityManager::Observe(nsISupports* aObject, const char* aTopic,
@@ -2591,7 +2591,8 @@
 #endif
         )
         JSEnabledPrefChanged(mSecurityPref);
-    if(PL_strncmp(message, sPolicyPrefix.get(), sPolicyPrefix.Length()) == 0)
+    NS_NAMED_LITERAL_CSTRING(policyPrefix, sPolicyPrefix);
+    if(PL_strncmp(message, policyPrefix.get(), policyPrefix.Length()) == 0)
         mPolicyPrefsChanged = PR_TRUE; // This will force re-initialization of
the pref table
     else if((PL_strncmp(message, sPrincipalPrefix, sizeof(sPrincipalPrefix)-1)
== 0) &&
             !mIsWritingPrefs)
@@ -2908,7 +2909,7 @@
                                           DomainPolicy* aDomainPolicy)
 {
     nsresult rv;
-    nsCAutoString policyPrefix(sPolicyPrefix +
+    nsCAutoString policyPrefix(NS_LITERAL_CSTRING(sPolicyPrefix) +
                                nsDependentCString(aPolicyName) +
                                NS_LITERAL_CSTRING("."));
     PRUint32 prefixLength = policyPrefix.Length() - 1; // subtract the '.'
@@ -3196,7 +3197,7 @@
     char** prefNames;
  
     // Set a callback for policy pref changes
-    prefBranchInternal->AddObserver(sPolicyPrefix.get(), this, PR_FALSE);
+    prefBranchInternal->AddObserver(sPolicyPrefix, this, PR_FALSE);
  
     //-- Initialize the principals database from prefs
     rv = mPrefBranch->GetChildList(sPrincipalPrefix, &prefCount, &prefNames);
Attached patch v0 patch (obsolete) — Splinter Review
actually, scratch that... this one actually compiles.
That looks like it did the trick, startup and browsing a few links work now.
Oops, spoke too soon.  After hitting cmd-q to quit:

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x15034d8c in ?? () at nsTObsoleteAStringThunk.cpp:51
51            static const void* get_vptr()
(gdb) bt
#0  0x15034d8c in ?? () at nsTObsoleteAStringThunk.cpp:51
#1  0x15034d84 in ?? () at nsTObsoleteAStringThunk.cpp:51
#2  0x00d168c8 in nsSubstring::~nsSubstring() (this=0x10df684, __in_chrg=0) at
../../../../dist/include/string/nsTDependentSubstring.h:64
#3  0x00d16844 in nsSubstring::~nsSubstring() (this=0x10df684) at
../../../../dist/include/string/nsTDependentSubstring.h:64
#4  0x00d167c0 in nsString::~nsString() (this=0x10df684, __in_chrg=0) at
../../../../dist/include/string/nsTString.h:482
#5  0x00d16704 in nsString::~nsString() (this=0x10df684) at
../../../../dist/include/string/nsTString.h:482
#6  0x00d19820 in nsDependentString::~nsDependentString() (this=0x10df684,
__in_chrg=2) at mozJSComponentLoader.cpp:773
#7  0x00d18e8c in nsDependentString::~nsDependentString() (this=0x10df684) at
mozJSComponentLoader.cpp:773
#8  0x00ff47d4 in __static_initialization_and_destruction_0(int, int)
(__initialize_p=0, __priority=65535) at nsIndexedToHTML.cpp:132
#9  0x00ff4844 in _GLOBAL__D__ZN15nsIndexedToHTML6AddRefEv () at
nsIndexedToHTML.cpp:596
#10 0x8fe16a38 in __dyld__dyld_mod_term_funcs ()
#11 0x90005718 in exit ()
#12 0x000043e4 in _start (argc=3, argv=0xbffff42c, envp=0xbffff43c) at
/SourceCache/Csu/Csu-45/crt.c:267
#13 0x00004260 in start ()
yup, looks like line 132 has another static NS_NAMED_LITERAL_STRING.  now, for
the life of me i don't understand why this didn't cause trouble in my builds on
OSX.  can you upload your mozconfig file?  thx
# you have to check this file out in addition to client.mk for this to work
. $topsrcdir/browser/config/mozconfig

#for PATCH in ../conf/patches/*.patch
#do
#       patch -p0 < $PATCH
#done
#autoconf

export MOZILLA_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1

# make it faster on two processors
mk_add_options MOZ_MAKE_FLAGS=-j2

ac_add_options --disable-tests
ac_add_options --enable-pthreads
ac_add_options --without-system-nspr
ac_add_options --without-system-zlib
ac_add_options --without-system-jpeg
ac_add_options --without-system-png
ac_add_options --without-system-mng
ac_add_options --enable-prebinding
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --disable-installer

ac_add_options --disable-debug
ac_add_options --enable-optimize="-O2"

That is the base one, that I use for the nightlies.  For debugging, the only
difference is that I use --enable-optimize="-g3", and the patch lines are
uncommented, but there are no patches in that directory, so none are applied.
thx.. i'm guessing this either has something to do with the static build and/or
the prebinding option.
this LXR query gives the likely list of problem sites:

http://lxr.mozilla.org/seamonkey/search?string=static+NS_NAMED

there may be more lurking in the codebase.
*** Bug 234907 has been marked as a duplicate of this bug. ***
*** Bug 234900 has been marked as a duplicate of this bug. ***
Is this bug specific to Firefox?  I downloaded some nightly builds of mozilla
and they crash on startup (as the profile picker is being opened). 
Specifically, I've tested the latest (2/14) and 2/13.  The build from 2/3
launches fine (as does 1.6).
(In reply to comment #13)
> Is this bug specific to Firefox?  I downloaded some nightly builds of mozilla
> and they crash on startup (as the profile picker is being opened). 
> Specifically, I've tested the latest (2/14) and 2/13.  The build from 2/3
> launches fine (as does 1.6).

Hmm, I'm not sure.  It probably affects Mozilla as well, but there's no way to
tell if you are experiencing the same bug without a backtrace.  Can you attach
the Crashreporter log, or a gdb backtrace?
(In reply to comment #14)
I had the same experience yesterday (2/19) with Camino nighly build.
> (In reply to comment #13)
> > Is this bug specific to Firefox?  I downloaded some nightly builds of mozilla
> > and they crash on startup (as the profile picker is being opened). 
> > Specifically, I've tested the latest (2/14) and 2/13.  The build from 2/3
> > launches fine (as does 1.6).
> 
> Hmm, I'm not sure.  It probably affects Mozilla as well, but there's no way to
> tell if you are experiencing the same bug without a backtrace.  Can you attach
> the Crashreporter log, or a gdb backtrace?
(In reply to comment #13)
> Is this bug specific to Firefox?  I downloaded some nightly builds of mozilla
> and they crash on startup (as the profile picker is being opened). 
> Specifically, I've tested the latest (2/14) and 2/13.  The build from 2/3
> launches fine (as does 1.6).

The trunk builds have their own problems : see bug 232972
(In reply to comment #16)
I again downloaded latest OS X Firefox nightly, 2-20, (latest Camino nighlty
too) download went smoothly. When I tried to open the browser I received the
following error message: "The application firefox-bin has unexpectedly quit".  I
deleted the download and tried 3 additional times downloading and opening and
received the same error message. Tried clean install, opening of browsers still
ends with crashes. 

Crash Log entry: 

Date/Time: 2004-02-19 14:56:51 -0500
OS Version: 10.3.2 (Build 7D24)
Report Version: 2

Command: Camino
Path: /
Version: 0.7.0 (0.7+)
PID: 1273
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000064

Thread 0 Crashed:
0 libxpcom.dylib 0x0505b26c _ZNK10nsACString17GetReadableBufferEPPKc + 0x44
1 libxpcom.dylib 0x0505b42c _ZNK10nsACString11ToSubstringEv + 0x28
2 libxpcom.dylib 0x050611e4 _ZNK17nsCSubstringTuple13IsDependentOnEPKcS1_ + 0x10c
3 libxpcom.dylib 0x0506119c _ZNK17nsCSubstringTuple13IsDependentOnEPKcS1_ + 0xc4
4 libxpcom.dylib 0x050601c8 _ZN12nsCSubstring6AssignERK17nsCSubstringTuple + 0x38
5 org.mozilla.navigator 0x0013b15c
_ZN23nsScriptSecurityManager16InitDomainPolicyEP9JSContextPKcP12DomainPolicy + 0xcc
6 org.mozilla.navigator 0x0013aad0 _ZN23nsScriptSecurityManager12InitPoliciesEv
+ 0x180
7 org.mozilla.navigator 0x001358e0
_ZN23nsScriptSecurityManager12LookupPolicyEP12nsIPrincipalPKcljPP11ClassPolicyP13SecurityLevel
+ 0x44
8 org.mozilla.navigator 0x00137330
_ZN23nsScriptSecurityManager17CanExecuteScriptsEP9JSContextP12nsIPrincipalPi + 0x348
9 org.mozilla.navigator 0x002ea11c _ZN10nsDocument15IsScriptEnabledEv + 0x124
10 org.mozilla.navigator 0x00270f20 _ZN9PresShell19SetPrefNoScriptRuleEv + 0x28
11 org.mozilla.navigator 0x00270880 _ZN9PresShell23SetPreferenceStyleRulesEi + 0x1ac
12 org.mozilla.navigator 0x0026f6dc
_ZN9PresShell4InitEP11nsIDocumentP14nsIPresContextP14nsIViewManagerP10nsStyleSet15nsCompatibility
+ 0x13c
13 org.mozilla.navigator 0x002e3538
_ZN10nsDocument13doCreateShellEP14nsIPresContextP14nsIViewManagerP10nsStyleSet15nsCompatibilityPP12nsIPresShell
+ 0x70
14 org.mozilla.navigator 0x002b7eb0
_ZN18DocumentViewerImpl21InitPresentationStuffEi + 0x6c
15 org.mozilla.navigator 0x002b87ac
_ZN18DocumentViewerImpl12InitInternalEP9nsIWidgetP16nsIDeviceContextRK6nsRectii
+ 0x37c
16 org.mozilla.navigator 0x00202904
_ZN10nsDocShell14SetupNewViewerEP16nsIContentViewer + 0x744
17 org.mozilla.navigator 0x00200d4c
_ZN10nsDocShell5EmbedEP16nsIContentViewerPKcP11nsISupports + 0x40
18 org.mozilla.navigator 0x00201974
_ZN10nsDocShell29CreateAboutBlankContentViewerEv + 0x358
19 org.mozilla.navigator 0x001f768c _ZN10nsDocShell12GetInterfaceERK4nsIDPPv + 0x2ac
20 libxpcom.dylib 0x05066188 _ZNK14nsGetInterfaceclERK4nsIDPPv + 0x90
21 libxpcom.dylib 0x05064958
_ZN13nsCOMPtr_base18assign_from_helperERK15nsCOMPtr_helperRK4nsID + 0x34
22 org.mozilla.navigator 0x0054bb58
_ZN16GlobalWindowImpl11GetDocumentEPP14nsIDOMDocument + 0x74
23 org.mozilla.navigator 0x000208b8 -[CHBrowserView getCurrentURLSpec] + 0x90
24 org.mozilla.navigator 0x0000baf0 -[BrowserWrapper setTabTitle:windowTitle:] +
0x2c
25 org.mozilla.navigator 0x0000ad38 -[BrowserWrapper
makePrimaryBrowserView:status:windowController:] + 0x1bc
26 <<00000000>> 0x92ec191c 0 + 0x92ec191c
27 <<00000000>> 0x92f3e220 0 + 0x92f3e220
28 org.mozilla.navigator 0x00029948 -[BrowserTabView addTabViewItem:] + 0x3c
29 org.mozilla.navigator 0x00017354 -[BrowserWindowController createNewTab:] + 0x1ac
30 org.mozilla.navigator 0x000126e4 -[BrowserWindowController windowDidLoad] + 0x550
31 <<00000000>> 0x92e82d94 0 + 0x92e82d94
32 <<00000000>> 0x92e74d04 0 + 0x92e74d04
33 <<00000000>> 0x92f316c0 0 + 0x92f316c0
34 org.mozilla.navigator 0x0000eb5c -[MainController
openBrowserWindowWithURL:andReferrer:] + 0xb0
35 org.mozilla.navigator 0x0000dabc -[MainController newWindow:] + 0xc0
36 org.mozilla.navigator 0x0000d2c4 -[MainController
applicationDidFinishLaunching:] + 0xfc
37 <<00000000>> 0x909f794c 0 + 0x909f794c
38 <<00000000>> 0x901aa7f0 0 + 0x901aa7f0
39 <<00000000>> 0x901af200 0 + 0x901af200
40 <<00000000>> 0x909f5798 0 + 0x909f5798
41 <<00000000>> 0x92ee3210 0 + 0x92ee3210
42 <<00000000>> 0x92ee30fc 0 + 0x92ee30fc
43 <<00000000>> 0x92ee332c 0 + 0x92ee332c
44 <<00000000>> 0x90a4aca8 0 + 0x90a4aca8
45 <<00000000>> 0x90a513b8 0 + 0x90a513b8
46 <<00000000>> 0x91674a68 0 + 0x91674a68
47 <<00000000>> 0x916778b0 0 + 0x916778b0
48 <<00000000>> 0x91674ca8 0 + 0x91674ca8
49 <<00000000>> 0x928c47bc 0 + 0x928c47bc
50 <<00000000>> 0x92dd2790 0 + 0x92dd2790
51 <<00000000>> 0x92de8f34 0 + 0x92de8f34
52 <<00000000>> 0x92dfd27c 0 + 0x92dfd27c
53 <<00000000>> 0x92eb95f0 0 + 0x92eb95f0
54 org.mozilla.navigator 0x0000a308 _start + 0x17c
55 org.mozilla.navigator 0x0000a188 start + 0x30

Thread 1:
0 libSystem.B.dylib 0x900075c8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007118 mach_msg + 0x38
2 com.unsanity.ape 0xc000a954 __ape_internal + 0x90b8
3 com.unsanity.ape 0xc0001328 __ape_agent + 0x40
4 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

Thread 2:
0 libSystem.B.dylib 0x9000b30c select + 0xc
1 libnspr4.dylib 0x00ca078c poll + 0x188
2 libnspr4.dylib 0x00c9cfd8 _pr_poll_with_poll + 0x32c
3 org.mozilla.navigator 0x000ab4bc _ZN24nsSocketTransportService3RunEv + 0x19c
4 libxpcom.dylib 0x05043d6c _ZN8nsThread4MainEPv + 0x38
5 libnspr4.dylib 0x00c9e420 _pt_root + 0xac
6 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

Thread 3:
0 libSystem.B.dylib 0x900075c8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007118 mach_msg + 0x38
2 libjvm.dylib 0x9253c68c JNI_CreateJavaVM_Impl + 0x173c
3 libjvm.dylib 0x9253c624 JNI_CreateJavaVM_Impl + 0x16d4
4 libjvm.dylib 0x924fdc9c JVM_GetClassMethodsCount + 0x21c
5 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

Thread 4:
0 libSystem.B.dylib 0x900075c8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007118 mach_msg + 0x38
2 libjvm.dylib 0x9249a89c JVM_NewInstance + 0x1fcc
3 libjvm.dylib 0x924b9f18 JVM_FillInStackTrace + 0x2b8
4 libjvm.dylib 0x924bf948 JVM_Send + 0x42e8
5 libjvm.dylib 0x9255173c JNI_CreateJavaVM_Impl + 0x167ec
6 libjvm.dylib 0x924fdc9c JVM_GetClassMethodsCount + 0x21c
7 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

Thread 5:
0 libSystem.B.dylib 0x900075c8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007118 mach_msg + 0x38
2 libjvm.dylib 0x9249a808 JVM_NewInstance + 0x1f38
3 libjvm.dylib 0x924a2a20 JVM_ArrayCopy + 0x4d0
4 libjvm.dylib 0x924b8b48 JVM_MonitorNotify + 0x778
5 libjvm.dylib 0x924b97a8 JVM_MonitorWait + 0xd8
6 <<00000000>> 0x0d10a668 0 + 0xd10a668
7 <<00000000>> 0x0d10868c 0 + 0xd10868c
8 <<00000000>> 0x0d10868c 0 + 0xd10868c
9 <<00000000>> 0xa24a3720 _ZTSSt13bad_exception + 0x6e7c
10 libjvm.dylib 0x9249808c JVM_CurrentTimeMillis + 0x136c
11 libjvm.dylib 0x924cd518 JVM_GetCPClassNameUTF + 0x1798
12 libjvm.dylib 0x924d2ce4 JVM_FindClassFromClass + 0x9e4
13 libjvm.dylib 0x924ec170 JVM_IsSameClassPackage + 0xfc0
14 libjvm.dylib 0x924e66d8 JVM_GetMethodIxExceptionTableEntry + 0x2058
15 libjvm.dylib 0x92577054 JVM_UnloadLibrary + 0x85c4
16 libjvm.dylib 0x924fdc9c JVM_GetClassMethodsCount + 0x21c
17 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

Thread 6:
0 libSystem.B.dylib 0x900075c8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007118 mach_msg + 0x38
2 libjvm.dylib 0x9249a808 JVM_NewInstance + 0x1f38
3 libjvm.dylib 0x924a2a20 JVM_ArrayCopy + 0x4d0
4 libjvm.dylib 0x924b8b48 JVM_MonitorNotify + 0x778
5 libjvm.dylib 0x924b97a8 JVM_MonitorWait + 0xd8
6 <<00000000>> 0x0d10a668 0 + 0xd10a668
7 <<00000000>> 0x0d10868c 0 + 0xd10868c
8 <<00000000>> 0x0d1085cc 0 + 0xd1085cc
9 <<00000000>> 0x0d1085cc 0 + 0xd1085cc
10 <<00000000>> 0xa24a3720 _ZTSSt13bad_exception + 0x6e7c
11 libjvm.dylib 0x9249808c JVM_CurrentTimeMillis + 0x136c
12 libjvm.dylib 0x924cd518 JVM_GetCPClassNameUTF + 0x1798
13 libjvm.dylib 0x924d2ce4 JVM_FindClassFromClass + 0x9e4
14 libjvm.dylib 0x924ec170 JVM_IsSameClassPackage + 0xfc0
15 libjvm.dylib 0x924e66d8 JVM_GetMethodIxExceptionTableEntry + 0x2058
16 libjvm.dylib 0x92577054 JVM_UnloadLibrary + 0x85c4
17 libjvm.dylib 0x924fdc9c JVM_GetClassMethodsCount + 0x21c
18 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

Thread 7:
0 libSystem.B.dylib 0x900075c8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007118 mach_msg + 0x38
2 libjvm.dylib 0x9249a89c JVM_NewInstance + 0x1fcc
3 libjvm.dylib 0x924a1a04 JVM_GetClassLoader + 0x1824
4 libjvm.dylib 0x924a17a4 JVM_GetClassLoader + 0x15c4
5 libjvm.dylib 0x924fdc9c JVM_GetClassMethodsCount + 0x21c
6 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

Thread 8:
0 libSystem.B.dylib 0x900075c8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007118 mach_msg + 0x38
2 libjvm.dylib 0x9249a808 JVM_NewInstance + 0x1f38
3 libjvm.dylib 0x924b9f70 JVM_FillInStackTrace + 0x310
4 libjvm.dylib 0x92553b20 JVM_InitProperties + 0x1b10
5 libjvm.dylib 0x92553920 JVM_InitProperties + 0x1910
6 libjvm.dylib 0x92577054 JVM_UnloadLibrary + 0x85c4
7 libjvm.dylib 0x924fdc9c JVM_GetClassMethodsCount + 0x21c
8 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

Thread 9:
0 libSystem.B.dylib 0x900075c8 mach_msg_trap + 0x8
1 libSystem.B.dylib 0x90007118 mach_msg + 0x38
2 libjvm.dylib 0x9249a808 JVM_NewInstance + 0x1f38
3 libjvm.dylib 0x924b9f70 JVM_FillInStackTrace + 0x310
4 libjvm.dylib 0x924e22b0 JVM_StartThread + 0x580
5 libjvm.dylib 0x924d0e04 JVM_FindLoadedClass + 0xa44
6 libjvm.dylib 0x92577054 JVM_UnloadLibrary + 0x85c4
7 libjvm.dylib 0x924fdc9c JVM_GetClassMethodsCount + 0x21c
8 libSystem.B.dylib 0x900247e8 _pthread_body + 0x28

PPC Thread State:
srr0: 0x0505b26c srr1: 0x0000f030 vrsave: 0x00000000
cr: 0x24004248 xer: 0x00000018 lr: 0x0505b230 ctr: 0x0505b404
r0: 0x05088988 r1: 0xbfffd0c0 r2: 0x00000000 r3: 0x008994d8
r4: 0xbfffd160 r5: 0xbfffd314 r6: 0x80808080 r7: 0x00000003
r8: 0x05088988 r9: 0x00000007 r10: 0x0505a598 r11: 0x05084854
r12: 0x0505b404 r13: 0xbfffde30 r14: 0xbfffde90 r15: 0xbfffdf30
r16: 0xbfffdf20 r17: 0xbfffdf20 r18: 0x02b018d0 r19: 0x02b9b4b0
r20: 0x00830000 r21: 0xbfffd370 r22: 0x019ff080 r23: 0xbfffd300
r24: 0xbfffd788 r25: 0x050810e0 r26: 0xbfffd314 r27: 0xbfffd314
r28: 0xbfffd1c0 r29: 0xbfffd1c0 r30: 0xbfffd160 r31: 0x0505b230

Binary Images Description:
0x1000 - 0x81efff org.mozilla.navigator 0.7.0 (0.7+)
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/Camino
0xc81000 - 0xcb3fff libnspr4.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libnspr4.dylib
0xf72000 - 0xf8efff com.unsanity.windowshadex.cocoa WindowShade X Cocoa Bits
version 3.1 (3.1) /Users/gordongriswold/Library/Application
Enhancers/WindowShade X.ape/Contents/PlugIns/WindowShade X Cocoa
Bits.ape/Contents/MacOS/WindowShade X Cocoa Bits
0xfa7000 - 0xfaffff com.unsanity.xounds Xounds version 2.1 (2.1)
/Users/gordongriswold/Library/Application Enhancers/Xounds.ape/Contents/MacOS/Xounds
0xfc4000 - 0xfccfff com.unsanity.xounds.cocoa Xounds Cocoa Bits version 2.1
(2.1) /Users/gordongriswold/Library/Application
Enhancers/Xounds.ape/Contents/PlugIns/Xounds Cocoa
Bits.ape/Contents/MacOS/Xounds Cocoa Bits
0xff5000 - 0xff53c2 Java Applet Plugin Enabler PEF binary: Java Applet Plugin
Enabler
0x18c8000 - 0x18e0fff com.unsanity.shapeshifter ShapeShifter Version 1.1 (1.1)
/Users/gordongriswold/Library/Application
Enhancers/ShapeShifter.ape/Contents/MacOS/ShapeShifter
0x1a17000 - 0x1a24fff com.unsanity.shapeshifter ShapeShifter Version 1.1 (1.1)
/Users/gordongriswold/Library/Application
Enhancers/ShapeShifter.ape/Contents/PlugIns/CocoaStuff.plugIn/Contents/MacOS/CocoaStuff
0x1a29000 - 0x1a2bfff com.unsanity.menuextraenabler Menu Extra Enabler version
1.0.1 (1.0.1) /Users/gordongriswold/Library/InputManagers/Menu Extra
Enabler/Menu Extra Enabler.bundle/Contents/MacOS/Menu Extra Enabler
0x2000000 - 0x200dfff libplds4.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libplds4.dylib
0x2aca000 - 0x2ad6fff com.apple.JavaAppletPlugin 1.2.0 /Library/Internet
Plug-Ins/Java Applet.plugin/Contents/MacOS/Java Applet
0x2b4e630 - 0x2b4e6e2 CFMPriv_CoreFoundation PEF binary: CFMPriv_CoreFoundation
0x2b4ecf0 - 0x2b4ed67 CFMPriv_System PEF binary: CFMPriv_System
0x2b4efe0 - 0x2b4f0b0 CFMPriv_CarbonSound PEF binary: CFMPriv_CarbonSound
0x2b4f120 - 0x2b4f1f3 CFMPriv_CommonPanels PEF binary: CFMPriv_CommonPanels
0x2b4f2c0 - 0x2b4f37b CFMPriv_Help PEF binary: CFMPriv_Help
0x2b4f380 - 0x2b4f44a CFMPriv_HIToolbox PEF binary: CFMPriv_HIToolbox
0x2b4f4c0 - 0x2b4f596 CFMPriv_HTMLRendering¥Ôp¥&#63743;¿ PEF binary:
CFMPriv_HTMLRendering¥Ôp¥&#63743;¿
0x2b4f600 - 0x2b4f6d3 CFMPriv_ImageCapture PEF binary: CFMPriv_ImageCapture
0x2b4f750 - 0x2b4f835 CFMPriv_NavigationServices PEF binary:
CFMPriv_NavigationServices
0x2b4f8a0 - 0x2b4f976 CFMPriv_OpenScripting&#63743;MacBLib PEF binary:
CFMPriv_OpenScripting&#63743;MacBLib
0x2b4fa40 - 0x2b4fafe CFMPriv_Print PEF binary: CFMPriv_Print
0x2b4fb10 - 0x2b4fbdd CFMPriv_SecurityHI PEF binary: CFMPriv_SecurityHI
0x2b4fc50 - 0x2b4fd32 CFMPriv_SpeechRecognition PEF binary:
CFMPriv_SpeechRecognition
0x2b4fda0 - 0x2b4fe73 CFMPriv_CarbonCore PEF binary: CFMPriv_CarbonCore
0x2b4fee0 - 0x2b4ffb3 CFMPriv_OSServices PEF binary: CFMPriv_OSServices
0x2b50080 - 0x2b50142 CFMPriv_AE PEF binary: CFMPriv_AE
0x2b50150 - 0x2b50215 CFMPriv_ATS PEF binary: CFMPriv_ATS
0x2b50280 - 0x2b50357 CFMPriv_ColorSync PEF binary: CFMPriv_ColorSync
0x2b503d0 - 0x2b504b3 CFMPriv_FindByContent¥ÙP¥&#731;Ä PEF binary:
CFMPriv_FindByContent¥ÙP¥&#731;Ä
0x2b50520 - 0x2b505fa CFMPriv_HIServices PEF binary: CFMPriv_HIServices
0x2b50660 - 0x2b50740 CFMPriv_LangAnalysis PEF binary: CFMPriv_LangAnalysis
0x2b507c0 - 0x2b508a6 CFMPriv_LaunchServices PEF binary: CFMPriv_LaunchServices
0x2b50970 - 0x2b50a47 CFMPriv_PrintCore PEF binary: CFMPriv_PrintCore
0x2b50a50 - 0x2b50b12 CFMPriv_QD PEF binary: CFMPriv_QD
0x2b50c00 - 0x2b50ce9 CFMPriv_SpeechSynthesis PEF binary: CFMPriv_SpeechSynthesis
0x2dfb000 - 0x2e469b1 CarbonLibpwpc PEF binary: CarbonLibpwpc
0x3000000 - 0x300efff libplc4.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libplc4.dylib
0x4000000 - 0x4066fff libmozjs.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libmozjs.dylib
0x5000000 - 0x5082fff libxpcom.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libxpcom.dylib
0x6000000 - 0x601afff libssl3.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libssl3.dylib
0x7000000 - 0x705cfff libnss3.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libnss3.dylib
0x8000000 - 0x801dfff libsmime3.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libsmime3.dylib
0x9000000 - 0x9079fff libsoftokn3.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libsoftokn3.dylib
0xa000000 - 0xa019fff libxpcom_compat.dylib
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/libxpcom_compat.dylib
0x30000000 - 0x30004fff ??? SharedMenusCocoa version 0.2 (0.0.3)
/Users/gordongriswold/Desktop/Camino.app/Contents/MacOS/../Frameworks/SharedMenusCocoa.framework/Versions/A/SharedMenusCocoa
0x780c0000 - 0x780c9fff libz.1.1.3.dylib /usr/lib/libz.1.1.3.dylib
0x8e250000 - 0x8e25efff com.apple.JavaEmbedding 1.0.4
/System/Library/Frameworks/JavaEmbedding.framework/Versions/A/JavaEmbedding
0x8fe00000 - 0x8fe4ffff dyld /usr/lib/dyld
0x90000000 - 0x90122fff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x92490000 - 0x92616fff libjvm.dylib
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjvm.dylib
0xc0000000 - 0xc000efff com.unsanity.ape 1.4.1
/Library/Frameworks/ApplicationEnhancer.framework/Versions/A/ApplicationEnhancer
*********** 
(In reply to comment #17)
**********

This is the crash log for Firefox, the previous post was for Camino.


Host Name:      Dr-Michael-Genzuks-Computer.local
Date/Time:      2004-02-20 13:37:18 -0800
OS Version:     10.3.2 (Build 7D24)
Report Version: 2

Command: firefox-bin
Path:    /Volumes/Firefox/Firefox.app/Contents/MacOS/firefox-bin
Version: @0.8.0+@ (@0.8.0+@)
PID:     988
Thread:  0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000064

Thread 0 Crashed:
0   libxpcom.dylib      	0x0505c0ac _ZNK10nsACString17GetReadableBufferEPPKc + 0x44
1   libxpcom.dylib      	0x0505c26c _ZNK10nsACString11ToSubstringEv + 0x28
2   libxpcom.dylib      	0x050620fc
_ZNK17nsCSubstringTuple13IsDependentOnEPKcS1_ + 0x10c
3   libxpcom.dylib      	0x050620b4
_ZNK17nsCSubstringTuple13IsDependentOnEPKcS1_ + 0xc4
4   libxpcom.dylib      	0x050610b8
_ZN12nsCSubstring6AssignERK17nsCSubstringTuple + 0x38
5   org.mozilla.mozilla 	0x0010ae98
_ZN23nsScriptSecurityManager16InitDomainPolicyEP9JSContextPKcP12DomainPolicy + 0xd8
6   org.mozilla.mozilla 	0x0010a7ec _ZN23nsScriptSecurityManager12InitPoliciesEv
+ 0x180
7   org.mozilla.mozilla 	0x00105580
_ZN23nsScriptSecurityManager12LookupPolicyEP12nsIPrincipalPKcljPP11ClassPolicyP13SecurityLevel
+ 0x44
8   org.mozilla.mozilla 	0x0010700c
_ZN23nsScriptSecurityManager17CanExecuteScriptsEP9JSContextP12nsIPrincipalPi + 0x348
9   org.mozilla.mozilla 	0x002c4a04 _ZThn4_N15HTMLContentSink7ReleaseEv + 0x19c
10  org.mozilla.mozilla 	0x002c4b68
_ZN15HTMLContentSink4InitEP11nsIDocumentP6nsIURIP11nsISupportsP10nsIChannel + 0x140
11  org.mozilla.mozilla 	0x002c41a8
_Z21NS_NewHTMLContentSinkPP18nsIHTMLContentSinkP11nsIDocumentP6nsIURIP11nsISupportsP10nsIChannel
+ 0xa4
12  org.mozilla.mozilla 	0x002592cc
_ZN14nsHTMLDocument17StartDocumentLoadEPKcP10nsIChannelP12nsILoadGroupP11nsISupportsPP17nsIStreamListeneriP14nsIContentSink
+ 0xa60
13  org.mozilla.mozilla 	0x002e80d0
_ZN12nsContentDLF14CreateDocumentEPKcP10nsIChannelP12nsILoadGroupP11nsISupportsRK4nsIDPP17nsIStreamListenerPP16nsIContentViewer
+ 0x15c
14  org.mozilla.mozilla 	0x002e7a64
_ZN12nsContentDLF14CreateInstanceEPKcP10nsIChannelP12nsILoadGroupS1_P11nsISupportsS7_PP17nsIStreamListenerPP16nsIContentViewer
+ 0x5ec
15  org.mozilla.mozilla 	0x00556150
_ZN10nsDocShell19NewContentViewerObjEPKcP10nsIRequestP12nsILoadGroupPP17nsIStreamListenerPP16nsIContentViewer
+ 0x440
16  org.mozilla.mozilla 	0x00555aec
_ZN10nsDocShell19CreateContentViewerEPKcP10nsIRequestPP17nsIStreamListener + 0xc8
17  org.mozilla.mozilla 	0x0055f108
_ZN22nsDSURIContentListener9DoContentEPKciP10nsIRequestPP17nsIStreamListenerPi +
0x120
18  org.mozilla.mozilla 	0x00536900
_ZN18nsDocumentOpenInfo18TryContentListenerEP21nsIURIContentListenerP10nsIChannel
+ 0x22c
19  org.mozilla.mozilla 	0x00535ed8
_ZN18nsDocumentOpenInfo15DispatchContentEP10nsIRequestP11nsISupports + 0x3f8
20  org.mozilla.mozilla 	0x005359ac
_ZN18nsDocumentOpenInfo14OnStartRequestEP10nsIRequestP11nsISupports + 0x2c0
21  org.mozilla.mozilla 	0x000a1620 _ZN17nsInputStreamPump12OnStateStartEv + 0x70
22  org.mozilla.mozilla 	0x000a1534
_ZN17nsInputStreamPump18OnInputStreamReadyEP19nsIAsyncInputStream + 0x68
23  libxpcom.dylib      	0x050800c4 0x5000000 + 0x800c4
24  libxpcom.dylib      	0x05041d0c PL_HandleEvent + 0x24
25  libxpcom.dylib      	0x05041c30 PL_ProcessPendingEvents + 0x80
26  libxpcom.dylib      	0x05042114 PL_IsQueueNative + 0x88
27  com.apple.HIToolbox 	0x94c59384 DispatchEventToHandlers + 0x150
28  com.apple.HIToolbox 	0x94c595f8 SendEventToEventTargetInternal + 0x174
29  com.apple.HIToolbox 	0x94c5da60 SendEventToEventTargetWithOptions + 0x28
30  com.apple.HIToolbox 	0x94c6a0f8
_Z29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv
+ 0x2b8
31  com.apple.HIToolbox 	0x94c59440 DispatchEventToHandlers + 0x20c
32  com.apple.HIToolbox 	0x94c595f8 SendEventToEventTargetInternal + 0x174
33  com.apple.HIToolbox 	0x94c6ba88 SendEventToEventTarget + 0x28
34  com.apple.HIToolbox 	0x94c6f980 ToolboxEventDispatcher + 0x5c
35  com.apple.HIToolbox 	0x94c7fba0 TryEventDispatcher + 0x6c
36  com.apple.HIToolbox 	0x94c60154 GetOrPeekEvent + 0x134
37  com.apple.HIToolbox 	0x94c60308 GetNextEventMatchingMask + 0xa0
38  com.apple.HIToolbox 	0x94c73ebc WNEInternal + 0xa0
39  com.apple.HIToolbox 	0x94c84b90 WaitNextEvent + 0x4c
40  org.mozilla.mozilla 	0x001fc36c
_ZN16nsMacMessagePump8GetEventER11EventRecord + 0x74
41  org.mozilla.mozilla 	0x001fc250 _ZN16nsMacMessagePump13DoMessagePumpEv + 0x30
42  org.mozilla.mozilla 	0x001e2c38 _ZN10nsAppShell3RunEv + 0x38
43  org.mozilla.mozilla 	0x007f2730 _Z10getCountryRK9nsAStringRS_ + 0x1738
44  org.mozilla.mozilla 	0x007f2e9c _Z8xre_mainiPPcRK12nsXREAppData + 0x2e4
45  org.mozilla.mozilla 	0x00004310 main + 0xa0
46  org.mozilla.mozilla 	0x00003fa0 start + 0x1b0
47  org.mozilla.mozilla 	0x00003e20 start + 0x30

Thread 1:
0   libSystem.B.dylib   	0x9000b30c select + 0xc
1   libnspr4.dylib      	0x00db57bc poll + 0x188
2   libnspr4.dylib      	0x00db2008 PR_OpenDir + 0x3b0
3   org.mozilla.mozilla 	0x000adc28 _ZN24nsSocketTransportService3RunEv + 0x19c
4   libxpcom.dylib      	0x05044ae8 _ZN8nsThread4MainEPv + 0x38
5   libnspr4.dylib      	0x00db3450 PR_Select + 0x33c
6   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 2:
0   libSystem.B.dylib   	0x900075c8 mach_msg_trap + 0x8
1   libSystem.B.dylib   	0x90007118 mach_msg + 0x38
2   libjvm.dylib        	0x9253c68c JNI_CreateJavaVM_Impl + 0x173c
3   libjvm.dylib        	0x9253c624 JNI_CreateJavaVM_Impl + 0x16d4
4   libjvm.dylib        	0x924fdc9c JVM_GetClassMethodsCount + 0x21c
5   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 3:
0   libSystem.B.dylib   	0x900075c8 mach_msg_trap + 0x8
1   libSystem.B.dylib   	0x90007118 mach_msg + 0x38
2   libjvm.dylib        	0x9249a89c JVM_NewInstance + 0x1fcc
3   libjvm.dylib        	0x924b9f18 JVM_FillInStackTrace + 0x2b8
4   libjvm.dylib        	0x924bf948 JVM_Send + 0x42e8
5   libjvm.dylib        	0x9255173c JNI_CreateJavaVM_Impl + 0x167ec
6   libjvm.dylib        	0x924fdc9c JVM_GetClassMethodsCount + 0x21c
7   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 4:
0   libSystem.B.dylib   	0x900075c8 mach_msg_trap + 0x8
1   libSystem.B.dylib   	0x90007118 mach_msg + 0x38
2   libjvm.dylib        	0x9249a808 JVM_NewInstance + 0x1f38
3   libjvm.dylib        	0x924a2a20 JVM_ArrayCopy + 0x4d0
4   libjvm.dylib        	0x924b8b48 JVM_MonitorNotify + 0x778
5   libjvm.dylib        	0x924b97a8 JVM_MonitorWait + 0xd8
6   <<00000000>> 	0x0d10a668 0 + 0xd10a668
7   <<00000000>> 	0x0d10868c 0 + 0xd10868c
8   <<00000000>> 	0x0d10868c 0 + 0xd10868c
9   <<00000000>> 	0xa24a3720 _ZTSSt13bad_exception + 0x6e7c
10  libjvm.dylib        	0x9249808c JVM_CurrentTimeMillis + 0x136c
11  libjvm.dylib        	0x924cd518 JVM_GetCPClassNameUTF + 0x1798
12  libjvm.dylib        	0x924d2ce4 JVM_FindClassFromClass + 0x9e4
13  libjvm.dylib        	0x924ec170 JVM_IsSameClassPackage + 0xfc0
14  libjvm.dylib        	0x924e66d8 JVM_GetMethodIxExceptionTableEntry + 0x2058
15  libjvm.dylib        	0x92577054 JVM_UnloadLibrary + 0x85c4
16  libjvm.dylib        	0x924fdc9c JVM_GetClassMethodsCount + 0x21c
17  libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 5:
0   libSystem.B.dylib   	0x900075c8 mach_msg_trap + 0x8
1   libSystem.B.dylib   	0x90007118 mach_msg + 0x38
2   libjvm.dylib        	0x9249a808 JVM_NewInstance + 0x1f38
3   libjvm.dylib        	0x924a2a20 JVM_ArrayCopy + 0x4d0
4   libjvm.dylib        	0x924b8b48 JVM_MonitorNotify + 0x778
5   libjvm.dylib        	0x924b97a8 JVM_MonitorWait + 0xd8
6   <<00000000>> 	0x0d10a668 0 + 0xd10a668
7   <<00000000>> 	0x0d10868c 0 + 0xd10868c
8   <<00000000>> 	0x0d1085cc 0 + 0xd1085cc
9   <<00000000>> 	0x0d1085cc 0 + 0xd1085cc
10  <<00000000>> 	0xa24a3720 _ZTSSt13bad_exception + 0x6e7c
11  libjvm.dylib        	0x9249808c JVM_CurrentTimeMillis + 0x136c
12  libjvm.dylib        	0x924cd518 JVM_GetCPClassNameUTF + 0x1798
13  libjvm.dylib        	0x924d2ce4 JVM_FindClassFromClass + 0x9e4
14  libjvm.dylib        	0x924ec170 JVM_IsSameClassPackage + 0xfc0
15  libjvm.dylib        	0x924e66d8 JVM_GetMethodIxExceptionTableEntry + 0x2058
16  libjvm.dylib        	0x92577054 JVM_UnloadLibrary + 0x85c4
17  libjvm.dylib        	0x924fdc9c JVM_GetClassMethodsCount + 0x21c
18  libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 6:
0   libSystem.B.dylib   	0x900075c8 mach_msg_trap + 0x8
1   libSystem.B.dylib   	0x90007118 mach_msg + 0x38
2   libjvm.dylib        	0x9249a89c JVM_NewInstance + 0x1fcc
3   libjvm.dylib        	0x924a1a04 JVM_GetClassLoader + 0x1824
4   libjvm.dylib        	0x924a17a4 JVM_GetClassLoader + 0x15c4
5   libjvm.dylib        	0x924fdc9c JVM_GetClassMethodsCount + 0x21c
6   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 7:
0   libSystem.B.dylib   	0x900075c8 mach_msg_trap + 0x8
1   libSystem.B.dylib   	0x90007118 mach_msg + 0x38
2   libjvm.dylib        	0x9249a808 JVM_NewInstance + 0x1f38
3   libjvm.dylib        	0x924b9f70 JVM_FillInStackTrace + 0x310
4   libjvm.dylib        	0x92553b20 JVM_InitProperties + 0x1b10
5   libjvm.dylib        	0x92553920 JVM_InitProperties + 0x1910
6   libjvm.dylib        	0x92577054 JVM_UnloadLibrary + 0x85c4
7   libjvm.dylib        	0x924fdc9c JVM_GetClassMethodsCount + 0x21c
8   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 8:
0   libSystem.B.dylib   	0x900075c8 mach_msg_trap + 0x8
1   libSystem.B.dylib   	0x90007118 mach_msg + 0x38
2   libjvm.dylib        	0x9249a808 JVM_NewInstance + 0x1f38
3   libjvm.dylib        	0x924b9f70 JVM_FillInStackTrace + 0x310
4   libjvm.dylib        	0x924e22b0 JVM_StartThread + 0x580
5   libjvm.dylib        	0x924d0e04 JVM_FindLoadedClass + 0xa44
6   libjvm.dylib        	0x92577054 JVM_UnloadLibrary + 0x85c4
7   libjvm.dylib        	0x924fdc9c JVM_GetClassMethodsCount + 0x21c
8   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 9:
0   libSystem.B.dylib   	0x90018ce8 semaphore_timedwait_signal_trap + 0x8
1   libSystem.B.dylib   	0x9000e888 _pthread_cond_wait + 0x268
2   libnspr4.dylib      	0x00dae368 PR_Unlock + 0x12c
3   libnspr4.dylib      	0x00dae5cc PR_WaitCondVar + 0x88
4   libxpcom.dylib      	0x050475dc _ZN11TimerThread3RunEv + 0x1ac
5   libxpcom.dylib      	0x05044ae8 _ZN8nsThread4MainEPv + 0x38
6   libnspr4.dylib      	0x00db3450 PR_Select + 0x33c
7   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 10:
0   libSystem.B.dylib   	0x90018ce8 semaphore_timedwait_signal_trap + 0x8
1   libSystem.B.dylib   	0x9000e888 _pthread_cond_wait + 0x268
2   libnspr4.dylib      	0x00dae368 PR_Unlock + 0x12c
3   libnspr4.dylib      	0x00dae5cc PR_WaitCondVar + 0x88
4   org.mozilla.mozilla 	0x0006d274 _ZN14nsIOThreadPool10ThreadFuncEPv + 0x74
5   libnspr4.dylib      	0x00db3450 PR_Select + 0x33c
6   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

Thread 11:
0   libSystem.B.dylib   	0x90018ce8 semaphore_timedwait_signal_trap + 0x8
1   libSystem.B.dylib   	0x9000e888 _pthread_cond_wait + 0x268
2   libnspr4.dylib      	0x00dae368 PR_Unlock + 0x12c
3   libnspr4.dylib      	0x00dae5cc PR_WaitCondVar + 0x88
4   org.mozilla.mozilla 	0x0006d274 _ZN14nsIOThreadPool10ThreadFuncEPv + 0x74
5   libnspr4.dylib      	0x00db3450 PR_Select + 0x33c
6   libSystem.B.dylib   	0x900247e8 _pthread_body + 0x28

PPC Thread State:
  srr0: 0x0505c0ac srr1: 0x0200f030                vrsave: 0x00000000
    cr: 0x24024248  xer: 0x00000004   lr: 0x0505c070  ctr: 0x0505c244
    r0: 0x050899c0   r1: 0xbfffdbd0   r2: 0x00000000   r3: 0x00a12c30
    r4: 0xbfffdc70   r5: 0xbfffde28   r6: 0xbfffde28   r7: 0x050899c0
    r8: 0x00010011   r9: 0x00000007  r10: 0x0505b3a8  r11: 0x05085894
   r12: 0x0505c244  r13: 0xbfffe530  r14: 0xbfffe5a0  r15: 0xbfffe540
   r16: 0x00990000  r17: 0xbfffe5d0  r18: 0x03e80b20  r19: 0x0194ac70
   r20: 0x00990000  r21: 0xbfffde80  r22: 0x0190b930  r23: 0xbfffde10
   r24: 0xbfffe298  r25: 0x05081ff8  r26: 0xbfffde28  r27: 0xbfffde28
   r28: 0xbfffdcd0  r29: 0xbfffdcd0  r30: 0xbfffdc70  r31: 0x0505c070

Binary Images Description:
    0x1000 -   0x975fff org.mozilla.mozilla @0.8.0+@
/Volumes/Firefox/Firefox.app/Contents/MacOS/firefox-bin
  0xd96000 -   0xdc8fff libnspr4.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libnspr4.dylib
  0xdfd000 -   0xdfd3c2 Java Applet Plugin Enabler 	PEF binary: Java Applet
Plugin Enabler
 0x193fd10 -  0x193fdc2 CFMPriv_CoreFoundation 	PEF binary: CFMPriv_CoreFoundation
 0x1940370 -  0x19403e7 CFMPriv_System 	PEF binary: CFMPriv_System
 0x1940660 -  0x1940730 CFMPriv_CarbonSound 	PEF binary: CFMPriv_CarbonSound
 0x19407a0 -  0x1940873 CFMPriv_CommonPanels 	PEF binary: CFMPriv_CommonPanels
 0x1940940 -  0x19409fb CFMPriv_Help 	PEF binary: CFMPriv_Help
 0x1940a00 -  0x1940aca CFMPriv_HIToolbox 	PEF binary: CFMPriv_HIToolbox
 0x1940b40 -  0x1940c16 CFMPriv_HTMLRenderingî&#63743;î@ 	PEF binary:
CFMPriv_HTMLRenderingî&#63743;î@
 0x1940c80 -  0x1940d53 CFMPriv_ImageCapture 	PEF binary: CFMPriv_ImageCapture
 0x1940dd0 -  0x1940eb5 CFMPriv_NavigationServices 	PEF binary:
CFMPriv_NavigationServices
 0x1940f20 -  0x1940ff6 CFMPriv_OpenScripting&#63743;MacBLib 	PEF binary:
CFMPriv_OpenScripting&#63743;MacBLib
 0x19410c0 -  0x194117e CFMPriv_Print 	PEF binary: CFMPriv_Print
 0x1941190 -  0x194125d CFMPriv_SecurityHI 	PEF binary: CFMPriv_SecurityHI
 0x19412d0 -  0x19413b2 CFMPriv_SpeechRecognition 	PEF binary:
CFMPriv_SpeechRecognition
 0x1941420 -  0x19414f3 CFMPriv_CarbonCore 	PEF binary: CFMPriv_CarbonCore
 0x1941560 -  0x1941633 CFMPriv_OSServices 	PEF binary: CFMPriv_OSServices
 0x1941700 -  0x19417c2 CFMPriv_AE 	PEF binary: CFMPriv_AE
 0x19417d0 -  0x1941895 CFMPriv_ATS 	PEF binary: CFMPriv_ATS
 0x1941900 -  0x19419d7 CFMPriv_ColorSync 	PEF binary: CFMPriv_ColorSync
 0x1941a50 -  0x1941b33 CFMPriv_FindByContentî
–î 	PEF binary: CFMPriv_FindByContentî
–î
 0x1941ba0 -  0x1941c7a CFMPriv_HIServices 	PEF binary: CFMPriv_HIServices
 0x1941ce0 -  0x1941dc0 CFMPriv_LangAnalysis 	PEF binary: CFMPriv_LangAnalysis
 0x1941e40 -  0x1941f26 CFMPriv_LaunchServices 	PEF binary: CFMPriv_LaunchServices
 0x1941ff0 -  0x19420c7 CFMPriv_PrintCore 	PEF binary: CFMPriv_PrintCore
 0x19420d0 -  0x1942192 CFMPriv_QD 	PEF binary: CFMPriv_QD
 0x1942280 -  0x1942369 CFMPriv_SpeechSynthesis 	PEF binary: CFMPriv_SpeechSynthesis
 0x1fcf000 -  0x1fdbfff com.apple.JavaAppletPlugin 1.2.0	/Library/Internet
Plug-Ins/Java Applet.plugin/Contents/MacOS/Java Applet
 0x2000000 -  0x200dfff libplds4.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libplds4.dylib
 0x2892000 -  0x28dd9b1 CarbonLibpwpc 	PEF binary: CarbonLibpwpc
 0x3000000 -  0x300efff libplc4.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libplc4.dylib
 0x3dd9000 -  0x3ddbfff com.apple.textencoding.unicode 1.6.4
/System/Library/TextEncodings/Unicode Encodings.bundle/Contents/MacOS/Unicode
Encodings
 0x4000000 -  0x4066fff libmozjs.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libmozjs.dylib
 0x5000000 -  0x5083fff libxpcom.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libxpcom.dylib
 0x6000000 -  0x601afff libssl3.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libssl3.dylib
 0x7000000 -  0x705cfff libnss3.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libnss3.dylib
 0x8000000 -  0x801dfff libsmime3.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libsmime3.dylib
 0x9000000 -  0x9079fff libsoftokn3.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libsoftokn3.dylib
 0xa000000 -  0xa019fff libxpcom_compat.dylib 
/Volumes/Firefox/Firefox.app/Contents/MacOS/libxpcom_compat.dylib
0x8e250000 - 0x8e25efff com.apple.JavaEmbedding 1.0.4
/System/Library/Frameworks/JavaEmbedding.framework/Versions/A/JavaEmbedding
0x8fe00000 - 0x8fe4ffff dyld 	/usr/lib/dyld
0x90000000 - 0x90122fff libSystem.B.dylib 	/usr/lib/libSystem.B.dylib
0x90190000 - 0x9023dfff com.apple.CoreFoundation 6.3 (299)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x90280000 - 0x904f9fff com.apple.CoreServices.CarbonCore 10.3.2
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x90570000 - 0x905ddfff com.apple.framework.IOKit 1.3 (???)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x90610000 - 0x90699fff com.apple.CoreServices.OSServices 3.0 (3.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x90700000 - 0x90700fff com.apple.CoreServices 10.3 (???)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x90720000 - 0x90787fff com.apple.audio.CoreAudio 2.1.2
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x907f0000 - 0x907f9fff com.apple.DiskArbitration 2.0
/System/Library/PrivateFrameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x90810000 - 0x90810fff com.apple.ApplicationServices 1.0 (???)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x90830000 - 0x9089ffff libobjc.A.dylib 	/usr/lib/libobjc.A.dylib
0x90910000 - 0x90983fff com.apple.DesktopServices 1.2
/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x909f0000 - 0x90b4afff com.apple.Foundation 6.3.3 (500.53)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x90d00000 - 0x90d19fff com.apple.SystemConfiguration 1.4.1 (???)
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x90d40000 - 0x90d40fff com.apple.Carbon 10.3 (???)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x90df0000 - 0x90df4fff com.apple.JavaVM 1.4.2 (1.4.2 Release 1)
/System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
0x910b0000 - 0x910fffff com.apple.bom 1.2.3 (62.1)
/System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom
0x912a0000 - 0x912bdfff com.apple.audio.SoundManager 3.8
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
0x912e0000 - 0x912f7fff com.apple.LangAnalysis 1.5.4
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x91320000 - 0x913defff ColorSync 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x91460000 - 0x91473fff com.apple.speech.synthesis.framework 3.2
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x914a0000 - 0x91509fff com.apple.htmlrendering 1.1.2
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering
0x91560000 - 0x91619fff com.apple.QD 3.4.62 (???)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x91670000 - 0x916a8fff com.apple.AE 1.3.2
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x916e0000 - 0x91773fff com.apple.print.framework.PrintCore 3.1
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x917e0000 - 0x917f0fff com.apple.speech.recognition.framework 3.3
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x91810000 - 0x9182afff com.apple.openscripting 1.2.1 (???)
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x91850000 - 0x91860fff com.apple.ImageCapture 2.1.0
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x91890000 - 0x9189cfff com.apple.help 1.0.1
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x918c0000 - 0x918cdfff com.apple.CommonPanels 1.2.1 (1.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x918d6000 - 0x91924fff com.apple.print.framework.Print 3.0 (3.2)
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x91965000 - 0x91981fff libjava.jnilib 
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjava.jnilib
0x91990000 - 0x9199bfff com.apple.securityhi 1.2 (90)
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x919c0000 - 0x91a32fff com.apple.NavigationServices 3.3
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices
0x91ab0000 - 0x91ac4fff libCGATS.A.dylib 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x91ae0000 - 0x91aebfff libCSync.A.dylib 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x91b10000 - 0x91b2afff libPDFRIP.A.dylib 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libPDFRIP.A.dylib
0x91b50000 - 0x91b5ffff libPSRIP.A.dylib 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libPSRIP.A.dylib
0x91b80000 - 0x91b93fff libRIP.A.dylib 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x91bb0000 - 0x91d44fff com.apple.QuickTime 6.5.0
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
0x92070000 - 0x92096fff com.apple.FindByContent 1.4 (1.2)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent
0x920c0000 - 0x922a6fff com.apple.security 2.1 (163.1)
/System/Library/Frameworks/Security.framework/Versions/A/Security
0x92430000 - 0x92468fff com.apple.LaunchServices 10.3 (84)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x92490000 - 0x92616fff libjvm.dylib 
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libjvm.dylib
0x92740000 - 0x92777fff com.apple.CFNetwork 1.2.1 (7)
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x92d30000 - 0x92d80fff com.apple.HIServices 1.4.0 (0.0.1d1)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x935d0000 - 0x938a6fff com.apple.CoreGraphics 1.203.12 (???)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x939a0000 - 0x939b4fff libcups.2.dylib 	/usr/lib/libcups.2.dylib
0x939d0000 - 0x939d4fff libmathCommon.A.dylib 	/usr/lib/system/libmathCommon.A.dylib
0x93cc0000 - 0x93ccbfff libverify.dylib 
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libverify.dylib
0x93dd2000 - 0x93ddefff libzip.jnilib 
/System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Libraries/libzip.jnilib
0x94060000 - 0x9407ffff com.apple.WebServices 1.1.0
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
0x940e0000 - 0x940e1fff com.apple.JavaCarbonSupport 1.1
/System/Library/PrivateFrameworks/JavaCarbonSupport.framework/Versions/A/JavaCarbonSupport
0x945b0000 - 0x945b9fff libz.1.dylib 	/usr/lib/libz.1.dylib
0x94610000 - 0x9462afff libresolv.9.dylib 	/usr/lib/libresolv.9.dylib
0x94650000 - 0x946affff com.apple.SearchKit 1.0.2
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x94a30000 - 0x94af2fff libxml2.2.dylib 	/usr/lib/libxml2.2.dylib
0x94b20000 - 0x94babfff com.apple.ink.framework 1.1 (54.4)
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x94c57000 - 0x94fdafff com.apple.HIToolbox 1.3.1 (???)
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x968d0000 - 0x969b2fff libicucore.A.dylib 	/usr/lib/libicucore.A.dylib
0x96a20000 - 0x96ae2fff libcrypto.0.9.7.dylib 	/usr/lib/libcrypto.0.9.7.dylib
0x96b40000 - 0x96b6efff libssl.0.9.7.dylib 	/usr/lib/libssl.0.9.7.dylib
0x96bf0000 - 0x96c7ffff ATS 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x96cb0000 - 0x96d9efff libiconv.2.dylib 	/usr/lib/libiconv.2.dylib
(In reply to comment #9)
> thx.. i'm guessing this either has something to do with the static build and/or
> the prebinding option.

It did not crash in Camino which built by the dynamic link.
And prebinding option has attached.
Probably, I think that the problem of this crash is happened only when it build
by the static link.

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JP; rv:1.7a) Gecko/20040221
Camino/0.7+
i've confirmed that this is caused by the static build.  i generated a simple
testcase to make sure.  i discussed this with dbaron and bryner, and we came to
the conclusion that the static NS_NAMED_LITERAL_STRINGs need to go.  there's no
reliable way to depend on static initialization order, so we are just asking for
pain if we try to keep those in the code.  there aren't that many to fix up, so
that's what i'm going to do.  i should have a patch over the weekend.
Summary: Firefox crashes on startup → Firefox crashes on startup on Mac OS X
Good News!  The Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b)
Gecko/20040222 Firefox/0.8.0+  version of FX is now working properly.  Thanks
for fixing it.
(In reply to comment #21)
> Good News!  The Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b)
> Gecko/20040222 Firefox/0.8.0+  version of FX is now working properly.  Thanks
> for fixing it.

That's a fluke.  I forgot to switch my mozconfig back to static builds after
running some tests.  Tomorrow's build nightly will be broken again, unless a fix
is checked in.
(In reply to comment #22)
> (In reply to comment #21)
> > Good News!  The Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b)
> > Gecko/20040222 Firefox/0.8.0+  version of FX is now working properly.  Thanks
> > for fixing it.
> 
> That's a fluke.  I forgot to switch my mozconfig back to static builds after
> running some tests.  Tomorrow's build nightly will be broken again, unless a fix
> is checked in.

Jerry, does this mean that the nightly build posted on 2/22 does not contain the
bug fix?  I have posted a note in the Mozillazine Forums sharing information
about the 2/22 download.  Should I alert folks this is not a permanent fix? thanx

(In reply to comment #23)
> Jerry, does this mean that the nightly build posted on 2/22 does not contain the
> bug fix?  I have posted a note in the Mozillazine Forums sharing information
> about the 2/22 download.  Should I alert folks this is not a permanent fix? 

Yes.  There is no fix yet, it just happens to work due to a build error.  Builds
starting tonight won't work again, until a fix is checked in.
fwiw, this blocks camino as well.
Flags: blocking1.7a?
Keywords: regression
*** Bug 235224 has been marked as a duplicate of this bug. ***
oops, only affects 1.7b
Flags: blocking1.7a? → blocking1.7b?
Summary: Firefox crashes on startup on Mac OS X → Remove global/static NS_NAMED_LITERAL_C?STRING usage [was: Firefox crashes on startup on Mac OS X]
Attached patch v1 patch (obsolete) — Splinter Review
This patch attempts to remove all global/static instances of
NS_NAMED_LITERAL_C?STRING.  I used the following LXR searches to locate
offenders:

  ^NS_NAMED_LITERAL
  ^static.*NS_NAMED_LITERAL
  ^const.*NS_NAMED_LITERAL

The last one didn't hit anything.  Hopefully, I didn't miss anything with these
searches.  If anyone can find other hits in the tree, please let me know.

This patch introduces a typedef named nsLiteralC?String that maps to the
correct string class.  I've also introduced the macro
NS_LITERAL_STRING_INIT(n,s) that can be used to initialize a nsLiteralC?String
in a class's member initializer list.  See example usage in the SOAP and
nsChromeTreeOwner code.

I also haven't fully tested this patch.  I am building now to test specifically
test out the SOAP changes since that is where most of the code changes were
made.

Jerry, if you can please try making a OSX static build with this patch in place
that would be great.  Thanks!
Attachment #141783 - Attachment is obsolete: true
(In reply to comment #28)
> 
> Jerry, if you can please try making a OSX static build with this patch in place
> that would be great.  Thanks!

Hmm, the build completes, but there is a failure when running "firefox-bin
-register":

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x150d72c8 in nsACString::~nsACString() (this=0x10df470, __in_chrg=0) at
nsTAString.cpp:59
59            AsObsoleteString()->~nsTObsoleteAString_CharT();
(gdb) bt
#0  0x150d72c8 in nsACString::~nsACString() (this=0x10df470, __in_chrg=0) at
nsTAString.cpp:59
#1  0x150d7214 in nsACString::~nsACString() (this=0x10df470) at nsTAString.cpp:55
#2  0x00d11b14 in nsCSubstring::~nsCSubstring() (this=0x10df470, __in_chrg=0) at
../../dist/include/string/nsTDependentSubstring.h:64
#3  0x00d11a5c in nsCSubstring::~nsCSubstring() (this=0x10df470) at
../../dist/include/string/nsTDependentSubstring.h:64
#4  0x00d119a4 in nsCString::~nsCString() (this=0x10df470, __in_chrg=0) at
../../dist/include/string/nsTString.h:485
#5  0x00d118d0 in nsCString::~nsCString() (this=0x10df470) at
../../dist/include/string/nsTString.h:485
#6  0x00d1177c in nsDependentCString::~nsDependentCString() (this=0x10df470,
__in_chrg=2) at nsBrowserApp.cpp:48
#7  0x00d115f8 in nsDependentCString::~nsDependentCString() (this=0x10df470) at
nsBrowserApp.cpp:48
#8  0x00ff799c in __static_initialization_and_destruction_0(int, int)
(__initialize_p=0, __priority=65535) at nsScriptSecurityManager.cpp:2577
#9  0x00ff7a0c in _GLOBAL__D__ZN23nsScriptSecurityManager10sIOServiceE () at
nsScriptSecurityManager.cpp:396
#10 0x8fe16a38 in __dyld__dyld_mod_term_funcs ()
#11 0x90005718 in exit ()
#12 0x0000453c in _start (argc=2, argv=0xbffff384, envp=0xbffff390) at
/SourceCache/Csu/Csu-45/crt.c:267
#13 0x000043b8 in start ()
(gdb) f 8
#8  0x00ff799c in __static_initialization_and_destruction_0(int, int)
(__initialize_p=0, __priority=65535) at nsScriptSecurityManager.cpp:2577
2577    static NS_NAMED_LITERAL_CSTRING(sPolicyPrefix, "capability.policy.");

Running it normally:

Program received signal EXC_BAD_ACCESS, Could not access memory.
0x150d8928 in nsACString::GetReadableBuffer(char const**) const (this=0x10df470,
data=0xbfffcf80) at nsTAString.cpp:368
368         AsObsoleteString()->GetReadableFragment(frag,
obsolete_string_type::kFirstFragment, 0);
(gdb) bt
#0  0x150d8928 in nsACString::GetReadableBuffer(char const**) const
(this=0x10df470, data=0xbfffcf80) at nsTAString.cpp:368
#1  0x150d8b3c in nsACString::ToSubstring() const (this=0x10df470) at
nsTAString.cpp:403
#2  0x150dea28 in nsCSubstringTuple::IsDependentOn(char const*, char const*)
const (this=0xbfffd250, start=0xbfffd1f8 "", end=0xbfffd1f8 "") at
nsTSubstringTuple.cpp:126
#3  0x150de9cc in nsCSubstringTuple::IsDependentOn(char const*, char const*)
const (this=0xbfffd240, start=0xbfffd1f8 "", end=0xbfffd1f8 "") at
nsTSubstringTuple.cpp:124
#4  0x150dd6b8 in nsCSubstring::Assign(nsCSubstringTuple const&)
(this=0xbfffd1e0, tuple=@0xbfffd240) at nsTSubstring.cpp:335
#5  0x00d30294 in nsCAutoString::nsCAutoString(nsCSubstringTuple const&)
(this=0xbfffd1e0, tuple=@0xbfffd240) at ../../../dist/include/string/nsTString.h:564
#6  0x00d30070 in nsCAutoString::nsCAutoString(nsCSubstringTuple const&)
(this=0xbfffd1e0, tuple=@0xbfffd240) at ../../../dist/include/string/nsTString.h:565
#7  0x001a4bf8 in nsScriptSecurityManager::InitDomainPolicy(JSContext*, char
const*, DomainPolicy*) (this=0x14391ff0, cx=0x14ec5700, aPolicyName=0xce5c80
"default", aDomainPolicy=0x1aad6960) at nsScriptSecurityManager.cpp:2913
#8  0x001a4338 in nsScriptSecurityManager::InitPolicies() (this=0x14391ff0) at
nsScriptSecurityManager.cpp:2784
#9  0x0019c8e8 in nsScriptSecurityManager::LookupPolicy(nsIPrincipal*, char
const*, long, unsigned, ClassPolicy**, SecurityLevel*) (this=0x14391ff0,
aPrincipal=0x1afe8270, aClassName=0xcdd3a4 "javascript", aProperty=339363284,
aAction=1, aCachedClassPolicy=0x0, result=0xbfffd6a8) at
nsScriptSecurityManager.cpp:911
#10 0x0019f1b4 in nsScriptSecurityManager::CanExecuteScripts(JSContext*,
nsIPrincipal*, int*) (this=0x14391ff0, cx=0x1aff3ed0, aPrincipal=0x1afe8270,
result=0xbfffd74c) at nsScriptSecurityManager.cpp:1539
#11 0x0045f52c in IsScriptEnabled(nsIDocument*, nsIDocShell*) (aDoc=0x1aaae930,
aContainer=0x1aff3630) at nsHTMLContentSink.cpp:2104
#12 0x0045f774 in HTMLContentSink::Init(nsIDocument*, nsIURI*, nsISupports*,
nsIChannel*) (this=0x1afe0a90, aDoc=0x1aaae930, aURI=0x1aff5ec0,
aContainer=0x1aff3630, aChannel=0x1aff6070) at nsHTMLContentSink.cpp:2155
#13 0x0045e7ec in NS_NewHTMLContentSink(nsIHTMLContentSink**, nsIDocument*,
nsIURI*, nsISupports*, nsIChannel*) (aResult=0xbfffda80, aDoc=0x1aaae930,
aURI=0x1aff5ec0, aContainer=0x1aff3630, aChannel=0x1aff6070) at
nsHTMLContentSink.cpp:1994
#14 0x003b7dd8 in nsHTMLDocument::StartDocumentLoad(char const*, nsIChannel*,
nsILoadGroup*, nsISupports*, nsIStreamListener**, int, nsIContentSink*)
(this=0x1aaae930, aCommand=0xceede8 "view", aChannel=0x1aff6070,
aLoadGroup=0x1aff5d80, aContainer=0x1aff3654, aDocListener=0x1aff611c, aReset=1,
aSink=0x0) at nsHTMLDocument.cpp:934
#15 0x0049705c in nsContentDLF::CreateDocument(char const*, nsIChannel*,
nsILoadGroup*, nsISupports*, nsID const&, nsIStreamListener**,
nsIContentViewer**) (this=0x1a9b7fc0, aCommand=0xceede8 "view",
aChannel=0x1aff6070, aLoadGroup=0x1aff5d80, aContainer=0x1aff3654,
aDocumentCID=@0xfd5fa0, aDocListener=0x1aff611c, aDocViewer=0xbfffdfd0) at
nsContentDLF.cpp:430
#16 0x004963b4 in nsContentDLF::CreateInstance(char const*, nsIChannel*,
nsILoadGroup*, char const*, nsISupports*, nsISupports*, nsIStreamListener**,
nsIContentViewer**) (this=0x1a9b7fc0, aCommand=0xceede8 "view",
aChannel=0x1aff6070, aLoadGroup=0x1aff5d80, aContentType=0x1aff60e8 "text/html",
aContainer=0x1aff3654, aExtraInfo=0x0, aDocListener=0x1aff611c,
aDocViewer=0xbfffdfd0) at nsContentDLF.cpp:222
#17 0x0084843c in nsDocShell::NewContentViewerObj(char const*, nsIRequest*,
nsILoadGroup*, nsIStreamListener**, nsIContentViewer**) (this=0x1aff3630,
aContentType=0x1aff60e8 "text/html", request=0x1aff6070, aLoadGroup=0x1aff5d80,
aContentHandler=0x1aff611c, aViewer=0xbfffdfd0) at nsDocShell.cpp:4619
#18 0x00847ad8 in nsDocShell::CreateContentViewer(char const*, nsIRequest*,
nsIStreamListener**) (this=0x1aff3630, aContentType=0x1aff60e8 "text/html",
request=0x1aff6070, aContentHandler=0x1aff611c) at nsDocShell.cpp:4484
#19 0x00857ad4 in nsDSURIContentListener::DoContent(char const*, int,
nsIRequest*, nsIStreamListener**, int*) (this=0x1ac21570,
aContentType=0x1aff60e8 "text/html", aIsContentPreferred=0, request=0x1aff6070,
aContentHandler=0x1aff611c, aAbortProcess=0xbfffe180) at
nsDSURIContentListener.cpp:109
#20 0x0081973c in nsDocumentOpenInfo::TryContentListener(nsIURIContentListener*,
nsIChannel*) (this=0x1aff6110, aListener=0x1ac21570, aChannel=0x1aff6070) at
nsURILoader.cpp:697
#21 0x008188d0 in nsDocumentOpenInfo::DispatchContent(nsIRequest*, nsISupports*)
(this=0x1aff6110, request=0x1aff6070, aCtxt=0x0) at nsURILoader.cpp:443
#22 0x00818240 in nsDocumentOpenInfo::OnStartRequest(nsIRequest*, nsISupports*)
(this=0x1aff6110, request=0x1aff6070, aCtxt=0x0) at nsURILoader.cpp:314
#23 0x00106c64 in nsInputStreamChannel::OnStartRequest(nsIRequest*,
nsISupports*) (this=0x1aff6070, req=0x1aff6140, ctx=0x0) at
nsInputStreamChannel.cpp:355
#24 0x00101098 in nsInputStreamPump::OnStateStart() (this=0x1aff6140) at
nsInputStreamPump.cpp:377
#25 0x00100ef8 in nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*)
(this=0x1aff6140, stream=0x1aff61c8) at nsInputStreamPump.cpp:333
#26 0x1512ac54 in nsInputStreamReadyEvent::EventHandler(PLEvent*)
(plevent=0x1aff6474) at nsStreamUtils.cpp:118
#27 0x150ad8a4 in PL_HandleEvent (self=0x1aff6474) at plevent.c:671
#28 0x150ad714 in PL_ProcessPendingEvents (self=0x1438cae0) at plevent.c:606
#29 0x150adeb0 in _md_EventReceiverProc (nextHandler=0xbfffe8e0,
inEvent=0x6cb97363, userData=0x1438cae0) at plevent.c:1565
#30 0x969a2c54 in DispatchEventToHandlers ()
#31 0x969a2fbc in SendEventToEventTargetInternal ()
#32 0x969a63d0 in SendEventToEventTargetWithOptions ()
#33 0x969b2940 in ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) ()
#34 0x969a2d0c in DispatchEventToHandlers ()
#35 0x969a2fbc in SendEventToEventTargetInternal ()
#36 0x969b5494 in SendEventToEventTarget ()
#37 0x969b7258 in ToolboxEventDispatcher(OpaqueEventRef*) ()
#38 0x969c8740 in CallEventDispatchHook ()
#39 0x969b3c90 in TryEventDispatcher ()
#40 0x969a4570 in GetOrPeekEvent ()
#41 0x969a421c in GetNextEventMatchingMask ()
#42 0x969a8054 in WNEInternal ()
#43 0x969adf0c in WaitNextEvent ()
#44 0x0031f494 in nsMacMessagePump::GetEvent(EventRecord&) (this=0x148644c0,
theEvent=@0xbfffeec0) at nsMacMessagePump.cpp:407
#45 0x0031f2f8 in nsMacMessagePump::DoMessagePump() (this=0x148644c0) at
nsMacMessagePump.cpp:304
#46 0x002f7574 in nsAppShell::Run() (this=0x14864200) at nsAppShell.cpp:112
#47 0x009da638 in nsAppShellService::Run() (this=0x14864160) at
nsAppShellService.cpp:483
#48 0x00c9448c in main1(int, char**, nsISupports*, nsXREAppData const&) (argc=3,
argv=0xbffff380, nativeApp=0x143869c0, aAppData=@0xbffff280) at nsAppRunner.cpp:1282
#49 0x00c94f5c in xre_main(int, char**, nsXREAppData const&) (argc=3,
argv=0xbffff380, aAppData=@0xbffff280) at nsAppRunner.cpp:1725
#50 0x00004888 in main (argc=3, argv=0xbffff380) at nsBrowserApp.cpp:51
> 2577    static NS_NAMED_LITERAL_CSTRING(sPolicyPrefix, "capability.policy.");

doh!  i think i forgot to include the caps change in my last patch.  i'll upload
a new patch.
Attached patch v1.1 patch (obsolete) — Splinter Review
ok, this one should be better! :-)
Attachment #142004 - Attachment is obsolete: true
It doesn't compile:

nsProfile.cpp: In member function `nsresult 
   nsProfile::AddLevelOfIndirection(nsIFile*)':
nsProfile.cpp:1443: error: call of overloaded `strncmp(const char*, const 
   char[5], long unsigned int)' is ambiguous
../../dist/include/xpcom/nsCRT.h:145: error: candidates are: static PRInt32 
   nsCRT::strncmp(const char*, const char*, unsigned int)
../../dist/include/xpcom/nsCRT.h:164: error:                 static PRInt32 
   nsCRT::strncmp(const char*, const char*, int)
make[3]: *** [nsProfile.o] Error 1
make[2]: *** [libs] Error 2
make[1]: *** [tier_9] Error 2
make: *** [default] Error 2
Attached patch v1.2 patchSplinter Review
why oh why do we have two nearly identical nsCRT::strncmp functions?!?	oh
well... hopefully this patch does the trick.
Attachment #142052 - Attachment is obsolete: true
Attachment #142056 - Flags: superreview?(dbaron)
Attachment #142056 - Flags: superreview?(dbaron) → superreview+
Jerry: can you confirm this latest patch when you get a chance?  Thanks!
(In reply to comment #34)
> Jerry: can you confirm this latest patch when you get a chance?  Thanks!

Doh'  I thought that I already did.  I've been using it all yesterday and today
with no problems, it seems to be fine.
*** Bug 235494 has been marked as a duplicate of this bug. ***
Attachment #142056 - Flags: review?(jst)
it would be awesome to get this landed before the next nightly spins. 6 days
w/out a nightly makes regression tracking pretty difficult.

+    // XXX avoid length calculation?
+    size_type length = char_traits::length(data);
+    return mLength == length && char_traits::compare(mData, data, mLength) == 0;

did you mean this to put this in as well?
(In reply to comment #37)
> it would be awesome to get this landed before the next nightly spins. 6 days
> w/out a nightly makes regression tracking pretty difficult.

agreed!!  my appologies for the delays here...


> +    // XXX avoid length calculation?
> +    size_type length = char_traits::length(data);
> +    return mLength == length && char_traits::compare(mData, data, mLength) == 0;
> 
> did you mean this to put this in as well?

yes.  when i used these functions in this patch, i thought about how it was
implemented and decided to simplify the implementation a little bit.
Comment on attachment 142056 [details] [diff] [review]
v1.2 patch

- In nsSOAPException.cpp:

-static NS_NAMED_LITERAL_STRING(kFailure, "SOAP_FAILURE");
-static NS_NAMED_LITERAL_STRING(kNoDescription, "No description");
+//static NS_NAMED_LITERAL_STRING(kFailure, "SOAP_FAILURE");
+//static NS_NAMED_LITERAL_STRING(kNoDescription, "No description");

Wanna just take this out completely, or un-codify it so that noone goes ahead
and just uncomments it and starts to use these strings?

r=jst
Attachment #142056 - Flags: review?(jst) → review+
patch checked in.  marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
It's interesting to note that this patch actually reduced codesize.

Win32 seamonkey codesize was reduced by nearly 10k, while Linux platforms were
reduced by 6-8k, and OSX (firefox) was reduced by over 14k.

...the hidden cost of static data?
*** Bug 235514 has been marked as a duplicate of this bug. ***
Flags: blocking1.7b?
Blocks: 148888
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: