Closed
Bug 315863
Opened 19 years ago
Closed 19 years ago
[BEOS] Firefox crashes on 1st run with no existing profile [@ nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry]
Categories
(Firefox :: Migration, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: doug, Unassigned)
References
Details
(Keywords: crash, fixed1.8.1)
Crash Data
Attachments
(3 files, 2 obsolete files)
903 bytes,
text/plain
|
Details | |
996 bytes,
text/plain
|
Details | |
2.73 KB,
patch
|
mconnor
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.9a1) Gecko/20051105 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.9a1) Gecko/20051105 Firefox/1.6a1
On clean install with no existing /boot/home/config/settings/mozilla folder, Firefox crashes on 1st startup. Restart Firefox, everything proceeds as normal.
Reproducible: Always
Steps to Reproduce:
1.delete /boot/home/config/settings/mozilla
2.install Firefox
3.start Firefox
Actual Results:
Firefox crashes.
Expected Results:
Firefox runs.
Reporter | ||
Comment 1•19 years ago
|
||
Updated•19 years ago
|
Severity: normal → critical
Keywords: crash
Summary: [BEOS] Firefox crashes on 1st run with no existing profile → [BEOS] Firefox crashes on 1st run with no existing profile [@ nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry]
Version: unspecified → Trunk
Comment 2•19 years ago
|
||
did you try to build it with disabled profilesharing,
single profile enabled
and profile migrator disabled? (if such option exists)
Comment 3•19 years ago
|
||
Probably this method
http://lxr.mozilla.org/seamonkey/source/browser/components/migration/src/nsPhoenixProfileMigrator.cpp#274
needs addition of BeOS case
Comment 4•19 years ago
|
||
try to add
http://lxr.mozilla.org/seamonkey/source/browser/components/migration/src/nsPhoenixProfileMigrator.cpp#274
before
#elif defined(XP_OS2)
following lines
#elif defined(XP_BEOS)
fileLocator->Get(NS_BEOS_SETTINGS_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(phoenixRegistry));
phoenixRegistry->Append(NS_LITERAL_STRING("Phoenix"));
phoenixRegistry->Append(NS_LITERAL_STRING("appreg"));
if it works, submit patch
Doug, can you see if Sergei's suggested change works, and create a patch if it does?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 6•19 years ago
|
||
(In reply to comment #5)
> Doug, can you see if Sergei's suggested change works, and create a patch if it
> does?
>
I'll try.
Reporter | ||
Comment 7•19 years ago
|
||
I incorporated the code fyysik suggested. Firefox still crashes, but the stack crawl looks different. I also included terminal output so you can see how far it gets brfore dying.
Reporter | ||
Comment 8•19 years ago
|
||
I incorporated the code fyysik suggested. Firefox still crashes, but the stack crawl looks different. I also included terminal output so you can see how far it gets brfore dying.
Reporter | ||
Comment 9•19 years ago
|
||
Just to double-check, here is the section of code after I made the change:
#elif defined(XP_UNIX)
fileLocator->Get(NS_UNIX_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(phoenixRegistry));
phoenixRegistry->Append(NS_LITERAL_STRING(".phoenix"));
phoenixRegistry->Append(NS_LITERAL_STRING("appreg"));
#elif defined(XP_BEOS)
fileLocator->Get(NS_BEOS_SETTINGS_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(phoenixRegistry));
phoenixRegistry->Append(NS_LITERAL_STRING("Phoenix"));
phoenixRegistry->Append(NS_LITERAL_STRING("appreg"));
#elif defined(XP_OS2)
fileLocator->Get(NS_OS2_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(phoenixRegistry));
phoenixRegistry->Append(NS_LITERAL_STRING("Phoenix"));
phoenixRegistry->Append(NS_LITERAL_STRING("registry.dat"));
#endif
Hopefully I did this right, so the problem was not with my testing.
Comment 10•19 years ago
|
||
Tigerdog, if you start firefox from script (not firefox-bin),
please open this script using right-click->OpenWith->(some text editor here)
find line
"$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@"
(before exitcode)
and replace it with
exec "$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@"
then do your crash text again, and if it crashes, look if stack crawl is more informative now.
Reporter | ||
Comment 11•19 years ago
|
||
more informative stack crawl, per fyysik's suggestion. same code mod as before.
Attachment #202600 -
Attachment is obsolete: true
Attachment #202601 -
Attachment is obsolete: true
Comment 12•19 years ago
|
||
notice for tqh.
Not directly related to this bug.
Look pls here:
http://lxr.mozilla.org/seamonkey/source/xpcom/threads/nsEnvironment.cpp#95
and tell me what do you think about it. If we should add XP_BEOS there
Comment 13•19 years ago
|
||
Question for Doug.
Do you have folder home/config/settings/Phoenix at your machine?
If so, do you have file "appreg" inside it?
Comment 14•19 years ago
|
||
Tough question: I use the ultimate answer: Hmm, what do you think?
Not sure but I don't see how the current impl. would cause any problems.
Reporter | ||
Comment 15•19 years ago
|
||
fyysik, I do not have home/config/settings/Phoenix. Only home/config/settings/Mozilla.
Comment 16•19 years ago
|
||
if you don't have Phoenix and appreg, crahsing method should return immediately instead crash. Probably it means that MPath check macro or nsFile*::Exists() fails in this case.
Didn't we change something in 3 months in nsFile, moving it to common implementation?
Nielx?
Comment 17•19 years ago
|
||
You mean nsLocalFileUnix.cpp (which btw we should create our own version of)?
Comment 18•19 years ago
|
||
(In reply to comment #16)
> if you don't have Phoenix and appreg, crahsing method should return immediately
> instead crash. Probably it means that MPath check macro or nsFile*::Exists()
> fails in this case.
> Didn't we change something in 3 months in nsFile, moving it to common
> implementation?
I'm having a hard time remembering what we fixed, but it had something to do with launching files. What we replaced was the method in another file, nothing in nsLocalFileUnix.cpp.
Comment 19•19 years ago
|
||
tigerdog, put at this empty line
http://lxr.mozilla.org/seamonkey/source/browser/components/migration/src/nsNetscapeProfileMigratorBase.cpp#86
statement:
printf("Wow, ghost in the shell! Beware Phoenix rising from ashes!\n"); fflush(stdout);
and see if this line appears before crash.
Reporter | ||
Comment 20•19 years ago
|
||
printf does not appear in console output, fyysik. sorry so slow today. day job. leaving for meeting now; back in 2 hours.
Comment 21•19 years ago
|
||
Doug, next try:
before line
http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsLocalFileUnix.cpp#108
insert
if(!mPath) return NS_ERROR_FAILURE;
then run make in
mozilla/xpcom
and see if it still crashes
Reporter | ||
Comment 22•19 years ago
|
||
(In reply to comment #21)
If I understand your request, resulting code should be:
<small>#define CHECK_mPath() \
PR_BEGIN_MACRO \
if(!mPath) return NS_ERROR_FAILURE;
if (mPath.IsEmpty()) \
return NS_ERROR_NOT_INITIALIZED; \
PR_END_MACRO</small>
but this will not compile. Error is
<small>/boot/home/develop/mozilla/xpcom/io/nsLocalFileUnix.cpp: In method `nsresult nsLocalFile::CopyToNative(nsIFile *, const nsACString_internal &)':
/boot/home/develop/mozilla/xpcom/io/nsLocalFileUnix.cpp:749: no match for `!nsCString &'
/boot/home/develop/mozilla/xpcom/io/nsLocalFileUnix.cpp:749: candidates are: operator !(bool) <builtin>
/boot/home/develop/mozilla/xpcom/io/nsLocalFileUnix.cpp: In method `nsresult nsLocalFile::MoveToNative(nsIFile *, const nsACString_internal &)': </small>
I'm guessing I've done something wrong - let me know.
Comment 23•19 years ago
|
||
you did all right - just add back slash to end of line you inserted. Like it is at ends of other lines inside macro
Comment 24•19 years ago
|
||
This one
http://lxr.mozilla.org/seamonkey/source/mail/components/migration/src/nsSeamonkeyProfileMigrator.cpp#389
also needs fixing
Reporter | ||
Comment 25•19 years ago
|
||
Updated•19 years ago
|
Attachment #203866 -
Flags: review+
Comment 26•19 years ago
|
||
Nielx, maybe it needs also 1.8* approval at some moment, what do you think?
Comment 27•19 years ago
|
||
Patch landed in trunk by mconnor. Closing for 1.9*
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 28•19 years ago
|
||
(In reply to comment #26)
> Nielx, maybe it needs also 1.8* approval at some moment, what do you think?
>
I'll add this one to a list as well.
Comment 29•18 years ago
|
||
Comment on attachment 203866 [details] [diff] [review]
adds BeOS entries to Phoenix and SeaMonkey profile migrators
With our cycle of backporting all trunk improvents to 1.8 branch we forgot this quite critical patch.
Asking approval for 1.8.1 for adding BeOS #ifdef case to Phoenix and SeaMonkey profile) migrators.
Attachment #203866 -
Flags: approval1.8.1?
Comment 30•18 years ago
|
||
Comment on attachment 203866 [details] [diff] [review]
adds BeOS entries to Phoenix and SeaMonkey profile migrators
a=beltzner on behalf of 181drivers (NPOTB stuff is a-ok!)
Attachment #203866 -
Flags: approval1.8.1? → approval1.8.1+
Comment 31•18 years ago
|
||
Checking in mozilla/browser/components/migration/src/nsPhoenixProfileMigrator.cpp;
/cvsroot/mozilla/browser/components/migration/src/nsPhoenixProfileMigrator.cpp,v <-- nsPhoenixProfileMigrator.cpp
new revision: 1.12.24.2; previous revision: 1.12.24.1
done
Checking in mozilla/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp;
/cvsroot/mozilla/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp,v <-- nsSeamonkeyProfileMigrator.cpp
new revision: 1.19.8.4; previous revision: 1.19.8.3
done
Keywords: fixed1.8.1
Assignee | ||
Updated•13 years ago
|
Crash Signature: [@ nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry]
You need to log in
before you can comment on or make changes to this bug.
Description
•