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)

x86
BeOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: doug, Unassigned)

References

Details

(Keywords: crash, fixed1.8.1)

Crash Data

Attachments

(3 files, 2 obsolete files)

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.
Blocks: 311032
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
did you try to build it with disabled profilesharing, single profile enabled and profile migrator disabled? (if such option exists)
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
(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.
Attached file stack crawl and console output (obsolete) —
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.
Attached file stack crawl and console output (obsolete) —
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.
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.
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.
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
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
Question for Doug. Do you have folder home/config/settings/Phoenix at your machine? If so, do you have file "appreg" inside it?
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.
fyysik, I do not have home/config/settings/Phoenix. Only home/config/settings/Mozilla.
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?
You mean nsLocalFileUnix.cpp (which btw we should create our own version of)?
(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.
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.
printf does not appear in console output, fyysik. sorry so slow today. day job. leaving for meeting now; back in 2 hours.
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
(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.
you did all right - just add back slash to end of line you inserted. Like it is at ends of other lines inside macro
Attachment #203866 - Flags: review+
Nielx, maybe it needs also 1.8* approval at some moment, what do you think?
Patch landed in trunk by mconnor. Closing for 1.9*
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
(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.
Blocks: 316882
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 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+
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
Crash Signature: [@ nsNetscapeProfileMigratorBase::GetProfileDataFromRegistry]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: