Closed
Bug 107181
Opened 23 years ago
Closed 12 years ago
Mozilla won't start up when drive name is "/" or contains non-ASCII characters
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: cristiana, Unassigned)
References
Details
(Keywords: crash, intl, relnote, Whiteboard: [needs retesting with a fresh Mac computer])
Attachments
(5 files)
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:0.9.5+) Gecko/20011026 BuildID: 2001102605 I changed the name of my hard drive from an english name, to a japanese one, then when i started mozilla it instantly crashes. Reproducible: Always Steps to Reproduce: 1. change hard drive name from english to japanese (e.g from 'computer' to '?? ????') 2.start mozilla 3.watch it crash Actual Results: mozilla doesnt startup, instantly crashes Expected Results: start up without crashing
Comment 3•23 years ago
|
||
teruko: I am not very familiar with Mac, can you test on Windows as well? I think here is what you do: 1) install moz to a windows folder (say c:\moz\20011029) 2) run moz at least once 3) change the folder name to a Japanese folder name ( c:\moz\<japanese goes here> ) 4) run moz to see what happens. 5) if crash, then please change the platform to ALL However, my real question is Is above test case valid? Is this common on Mac OS? -> nhotta
Assignee: yokoyama → nhotta
Comment 4•23 years ago
|
||
ylong, could you try this and confirm if reproducible?
Updated•23 years ago
|
QA Contact: teruko → ylong
Comment 5•23 years ago
|
||
I couldn't reproduce it on Mac OS X(10.1) and Mac OS 9, also WinME-Ja neither. Reporter: what version of your Mac OS X?
Someone please take a look at the reporter's attached CrashReporter log.
Whiteboard: CrashReporter log attached
Comment 8•23 years ago
|
||
Confirm (the log is attached). Thread 0: #0 0x00606058 in nsComponentManagerImpl::FreeServices(void) #1 0xbffff71c in 0xbffff71c #2 0x0063ab34 in NS_ShutdownXPCOM #3 0x00545698 in main That is mozilla code. Others look like inside OS.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 9•23 years ago
|
||
I can reproduce this with 6.2. I have no idea about the crash in xpcom, cc to dougt, alecf.
Comment 10•23 years ago
|
||
OK, here is the result on my machine: If I set Mac OS X region to Japanese with Japanese hard drive name, I don't see the crash on N6.2 nor 10-29 trunk build. If I set OS region to English with Japanese hard drive name, I will see a crash on 10-29 trunk build but still not crash on N6.2 build.
Comment 11•23 years ago
|
||
that's a really strange crash.. was this on a debug build? no assertions or anything?
Comment 12•23 years ago
|
||
Can someone show which line is failing in FreeService()? Is this reproducible with todays build?
Comment 13•23 years ago
|
||
Conrad has similar bugs, I think.
Comment 14•23 years ago
|
||
I am using 6.2 release build. I found the similar crash happens without having Japanese disk name. After launching the app, immediately quit by applekey+'Q', then I see the crash one out of 5.
Comment 15•23 years ago
|
||
Comment 16•23 years ago
|
||
See bug 87831.
Comment 17•23 years ago
|
||
>If I set Mac OS X region to Japanese with Japanese hard drive name, I don't see
>the crash on N6.2 nor 10-29 trunk build.
IQA, please make sure above is true.
Status: NEW → ASSIGNED
Comment 18•23 years ago
|
||
Frank told me that similar problem has been fixed for non ASCII path name by Conrad. Conrad, have you checked in the fix to the trunk? Do you know the bug number?
Comment 19•23 years ago
|
||
Okay, I see you alredy mentioned it bug 87831. I cannot reproduce the crash using 11/1 commercial trunk, so that might had fixed the problem.
Comment 20•23 years ago
|
||
I checked it on another Mac OS X machine here with Japanese hard drive name: Set region to Japanese: No crash on N6.2(0.9.4) build. Hang on 11-01 trunk build. Set region to US: Crashes on both N6.2 and 11-01 trunk build.
Comment 21•23 years ago
|
||
Right, it still crashes unless I have Japanese UI as default.
Comment 22•23 years ago
|
||
Conrad, could you take a look at this, or point me which code to look at (e.g. where in the profile mgr hard disk name is manipulated)?
Comment 23•23 years ago
|
||
It doesn't have to do with profile mgr. It's anything which calls nsIFile::GetPath(). The component mgr is the 1st victim. Read the comments starting about 1/2 way down on bug 87831.
Comment 24•23 years ago
|
||
Because the crash does not happen when the primary language is set to Japanese, I thought it's something to do with charset conversion. So I put printf for nsPlatformCharset, also for nsLocalFile::GetPath. But didn't get to nsPlatformCharset. It looks like crashing very early in the start up. Below is part of the console log, after two assersions of "NS_InitXPCOM failed", followed by the thread assertion. nsLocalFile::GetPath nsLocalFile::GetPath ###!!! ASSERTION: NS_InitXPCOM failed: 'NS_SUCCEEDED(rv)', file nsAppRunner.cpp, line 1604 ###!!! ASSERTION: NS_InitXPCOM failed: 'NS_SUCCEEDED(rv)', file nsAppRunner.cpp, line 1604 ###!!! ASSERTION: Setting main thread twice?: 'Error', file nsThread.cpp, line 393 ###!!! ASSERTION: Setting main thread twice?: 'Error', file nsThread.cpp, line 393 ###!!! ASSERTION: Setting main thread twice?: 'Error', file nsThread.cpp, line 393 ###!!! ASSERTION: Setting main thread twice?: 'Error', file nsThread.cpp, line 393 ###!!! ASSERTION: Setting main thread twice?: 'Error', file nsThread.cpp, line 393 ###!!! ASSERTION: Setting main thread twice?: 'Error', file nsThread.cpp, line 393 ###!!! ASSERTION: Setting main thread twice?: 'Error', file nsThread.cpp, line 393 BTW, is there better way to debug on Mac OSX?
Comment 25•23 years ago
|
||
> Because the crash does not happen when the primary language is set to Japanese
Here's what I think it is: If the primary language is set to Japanese and
you have a Japanese file name, the whole path can be mapped to the dest
character set (Japanese). If the primary language is set to US, the name can't
be mapped into the dest charset (MacRoman). Not only that, different nodes of
the path can have different encoding, so trying to map a path as a whole isn't
always going to work. There's a Apple technote on this in the Files group of
technotes.
The reason this mapping has to take place is that the routine which we
normally use to get the full path (FSpGetFullPath) which returns a char* in the
OS charset, does not work with non-ASCII chars on OS X. Getting the path from
the OS as a Unicode path works (I tested it in these cases) but then we have to
convert back to a char* path and then run into this conversion problem.
You can debug (kind of) under OS X with CW7. You can email me about that.
Comment 26•23 years ago
|
||
I agree that the conversion cannot succeed when the string contains something not in the primary language. So GetPath() returns an error. We cannot really avoid this unless we always use GetUnicodePath() in Mozilla. But I think the crasher is more generic XPCOM error handling problem. I changed nsLocalFile::GetPath to return always 'NS_ERROR_FAILURE'. Then Mozilla always crashes, the same crash as the case with Japanese disk name. I also tried that on Windows, chagned nsLocalFile::GetPath to return error always, it crashes too.
Comment 27•23 years ago
|
||
On start up, Mozilla cannot access "component.reg" and "component" directory, XPCOM fails to initialize then leads to the crash. It can be simulated on Windows. In nsComponentManagerImpl::Init, change the return value from PlatformInit() to -1. http://lxr.mozilla.org/seamonkey/source/xpcom/components/nsComponentManager.cpp#617 After some assertions, it crashes in nsComponentManagerImpl::FreeServices. I think the same place as Mac OS X crash. nsComponentManagerImpl::FreeServices() line 1734 + 3 bytes NS_ShutdownXPCOM(nsIServiceManager * 0x00000000) line 479 main(int 1, char * * 0x00481cf0) line 1638 + 8 bytes mainCRTStartup() line 338 + 17 bytes KERNEL32! 77e992a6() I change component to XPCOM and reassign to dougt. Please take a look at this. We want at least to avoid the crash.
Assignee: nhotta → dougt
Status: ASSIGNED → NEW
Component: Internationalization → XPCOM
Comment 28•23 years ago
|
||
Read my comment from 2001-11-01 18:34. Specifically, the problem is here: http://lxr.mozilla.org/mozilla/source/xpcom/components/nsRegistry.cpp#542. dougt's comment is especially true in this case.
Comment 29•23 years ago
|
||
Of course, even if we avoid the crash caused by this, the application is never going to run anyway until GetPath(char**) is eradicated from nsIFile. That involves a pretty huge API changing - bug 94323
Comment 30•23 years ago
|
||
We want to avoid the crash first. Then we might need putting some kind of an alert if possible.
Keywords: intl
Comment 31•23 years ago
|
||
So short of re-writing libreg (and I know everyone would like to jump at that chance) an additional NR_RegOpenUsingDescriptor() API could be written, and then nsRegistry could use nsIFile::Open() and pass in the handle. NR_RegOpen currently uses the filename to return the same registry handle in case two different callers open the same registry. This can easily be skipped, but subsequent callers would then get a read-only handle so I suggest this functionality be moved into nsRegistry itself.
Comment 32•23 years ago
|
||
Bug 87831 is related to this: 1. On US language/locale, can repro crash with JA double-byte chars. 2. On JA language/locale, can repro crash with some JA double-byte chars and high ACSII chars.
Comment 33•23 years ago
|
||
Can not start up with the character "i ti" named hard drive. Notice the character is display as "?" in profile manager.
Updated•23 years ago
|
Target Milestone: --- → mozilla0.9.8
Comment 34•23 years ago
|
||
On today's(11-13) trunk build: If I change the hard drive name to the special character named above first, and clear up registry and install a trunk build (e.g. 11-13), then can not start up (crash) N6x.
Comment 35•23 years ago
|
||
dan, over to you. You have already addressed many of the same issues that I would run into such as file permissions, reg packing, reg standalone, ect.
Assignee: dougt → dveditz
Comment 36•23 years ago
|
||
mozilla won't start up with non-ascii (french, german etc) name neither. I am using US locale,renamiong my HD to Alt+0+201 and the profile manager crashes, changing the summary.
Summary: won't startup with japanese hard drive name → won't startup with non-ascii hard drive name
Comment 37•23 years ago
|
||
changing target milestone to a nomination. Not sure I can get to it by then (and this is an old, old problem).
Keywords: mozilla0.9.8
Target Milestone: mozilla0.9.8 → ---
Comment 39•23 years ago
|
||
Resetting milestone, only nsbeta1+ bugs can have a milestone on them, these are niminated, but not yet plussed.
Target Milestone: mozilla0.9.9 → ---
Comment 40•23 years ago
|
||
*** Bug 126384 has been marked as a duplicate of this bug. ***
Comment 41•22 years ago
|
||
Crashes at startup with hard-drive name "/", goes away when I change the hard-drive to a alphabetical string e.g. "rube". This error occured with Chimera 0.5.0. Finally, for the HD name change to have an effect I had to overwrite over the original installation in "/Application" directory.
Comment 42•22 years ago
|
||
Crashes at startup with hard-drive name "/", goes away when I change the hard-drive to a alphabetical string e.g. "rube". This error occured with Chimera 0.5.0. Finally, for the HD name change to have an effect I had to overwrite over the original installation in the "/Application" directory.
Comment 43•22 years ago
|
||
bounce. mls the crash is currently in your ballpark. i think this is the second copy of this stack that i saw today.
Assignee: dveditz → mstoltz
Status: ASSIGNED → NEW
Component: XPCOM → Security: CAPS
Keywords: relnote
QA Contact: ylong → bsharma
Summary: won't startup with non-ascii hard drive name → won't startup with / or non-ascii hard drive name
Comment 44•22 years ago
|
||
The crashes in comment 41 and comment 42 have the same stack as bug 173215. Why is this on Security: CAPS? See also bug 160898.
Summary: won't startup with / or non-ascii hard drive name → Mozilla won't start up when drive name is "/" or contains non-ASCII characters
Comment 45•22 years ago
|
||
Greg: that crash stack is typical of XPCOM init faililng (but the app continuing to run anyway). The JS context is nil. XPCOM init can fail for a number of reasons, so the stack doesn't say much.
Comment 46•22 years ago
|
||
> Finally, for the HD name change to have an effect I had to overwrite over the original installation in the "/Application" directory. That suggests that, only when we register components, we hit this bug. Even though one stack shows it crashed in nsScriptSecurityManager, that's not the problem, just the 1st thing to suffer the woe of XPCOM not initializing properly. BTW, running 10.2, I changed the name of my drive to "/", launched a fresh build of the app so that components and chrome would be re-registered, and there was no problem. This was with the Mach-0 build of mozilla, which has the same file system as Chimera but is unlike CFM Mozilla. Starting with comment 41, this should be a different bug because we're talking about different apps with different code (CFM Mozilla vs. Chimera)
Assignee: mstoltz → ccarlen
Component: Security: CAPS → XPCOM
Comment 47•21 years ago
|
||
i18n triage team: need info. Marina to test this.
Whiteboard: CrashReporter log attached → [need info] CrashReporter log attached
Updated•21 years ago
|
Keywords: mozilla0.9.8
Updated•18 years ago
|
Assignee: ccarlen → nobody
QA Contact: bsharma → xpcom
Updated•15 years ago
|
Whiteboard: [need info] CrashReporter log attached → [needs retesting with a fresh Mac computer]
Comment 49•12 years ago
|
||
I believe we've fixed startup in this case.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•