crash in nsProfile::MigrateAllProfiles (Can't migrate profile)

RESOLVED INCOMPLETE

Status

Core Graveyard
Profile: Migration
--
critical
RESOLVED INCOMPLETE
18 years ago
2 years ago

People

(Reporter: John Morrison, Unassigned)

Tracking

({crash})

Trunk
Future
x86
Windows 2000
crash

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
For another (trivial) bug, I nuked all the contents of (win2k)
 C:\Documents and Settings\Administrator\Application Data\Mozilla
so that I could force the dialog "Convert Profiles/Manage Profiles..." to come
up. (The other bug was that it had the wrong labels). 

However, now when I accept the offer to convert my 4x profile, I immediately
crash here in either a release build, or my own opt tree (pulled 11pm Monday).

// Migrates all unmigrated profiles
NS_IMETHODIMP nsProfile::MigrateAllProfiles()
{
    nsresult rv = NS_OK;
    for (PRInt32 i=0; i < gProfileDataAccess->mNumOldProfiles; i++)
    {
        ProfileStruct* profileItem = (ProfileStruct *)                          
                               (gProfileDataAccess->m4xProfiles->ElementAt(i));
        rv = MigrateProfile(profileItem->profileName.GetUnicode(), 
                           PR_FALSE /* don't show progress as modal window */);
        if (NS_FAILED(rv)) return rv;
    }

    return rv;
}

|profileItem| is null in the above loop on the first iteration (i==0)
(Reporter)

Comment 1

18 years ago
Let me know if you want to look at this on my system. I hope I didn't break 
any "rules" in deleting that folder (but I've done it safely in the past). 
Keywords: crash, mozilla0.9, nsbeta1

Comment 2

18 years ago
John,

You should be able to safely remove that folder - I do most every day.  
I have heard of other cases of corrupted 4.x profiles causing crashes so you may 
try to choose [manage profiles], create a new one and see if you crash. 
I tried on both moz and commercial for today but cannot reproduce...
(Reporter)

Comment 3

18 years ago
Grace. Thanks. (Yeah, I thought this was OK to do, but thought I'd mention it).
I can create a new profile and run fine. 

The thing with the code above is that while mozilla thinks I have profiles
to migrate, it doesn't find any on its list (hand-waving, not knowing this
code). That's puzzling.

(On a side note, if I select my unmigrated profile from the profile manager,
when it attempts to migrate it, I wind up crashing in another way, but that 
other way is completely a Style System crash. I'm sorting out that bug report
now). 
(Reporter)

Comment 4

18 years ago
This is nuts. After reproducing this 5 times in two different builds, now, 
without me making any change that I know of, it works correctly everytime.

(The other thing still crashes, but that's a Style System thing.). 

I guess this is WFM, but I'll let bhuvan do that, and perhaps puzzle 
through how |profileItem| could have been null.

Comment 5

18 years ago
I was puzzled by that code, 'migrate all profiles'....afaik that is not a 
feature!  Glad you are ok now

Comment 6

18 years ago
Automigrate (where is there is only one 4x profile) uses MigrateAllProfiles 
routine. Infact we should change the title to something like 
MigrateSingleProfile and just migrate that one.

Adding Conrad (profilemanager boss) to the list.

I couldn't reproduce this either. Marking this WFM.
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 7

18 years ago
Reopening. Possibly a race condition. Sometimes you it, sometimes not.
I just now deleted my profiles folder, started and crashed on the migration. 
Then I immediately repeated the above, but this time, migration was fine.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Comment 8

17 years ago
Marking nsbeta1- because this won't affect users who use the UI to remove
profiles and create new ones and because it sounds like this doesn't happen all
of the time.
Keywords: nsbeta1 → nsbeta1-
Target Milestone: --- → Future
This is realted to (if not the same thing as) bug 68827. There is something
wrong with MigrateAllProfiles. The problem it has only arises in odd
circumstances. But see 68827 for why and even a patch.
(Reporter)

Comment 10

17 years ago
Oh, good to hear that. I was just about to comment that this is the state 
that new users will be in (e.g., Nav4.x users upgrading to Netscape 6x). 
[In other words, it's not a contrived scenario to have a 4.x profile and
no 'Mozilla' folder with a 6.x profile in place].
Yeah - you have to have one and only one 4.x profile (not uncommon), and no
mozilla profiles (always to a new user). The thing that makes it an edge case
IMO, is you have to click "Exit" on the first and only the first time you run
mozilla under these circumstances.
(Reporter)

Comment 12

17 years ago
Except that I was crashing without ever having hit exit. I would crash as soon 
as I hit the button to do the conversion. (Mind you, this was in a mozilla 
build where you are given the option; Netscape never presents the option 
(unless you twiddle with the default\pref\all-ns.js).

However, I tried this 7 or 8 times just now (both with the pref set to 
confirm, and to not confirm (ns default)), and I couldn't hit this crash
again. So, still and edge case, I guess ... :-]

Comment 13

17 years ago
I am able to consistantly get this bug on NT 4.0 with the latest nightly builds 
(just tried 5/22/2001).

I've filed a Talkback report on it -> TB30767879X

I also have a Dependency Walker save of this crash if you would like that.

Comment 14

17 years ago
Created attachment 35615 [details]
depends.exe save of crash

Updated

17 years ago
Keywords: nsenterprise

Comment 15

17 years ago
Removing nsenterprise nomination.
Keywords: nsenterprise
mass re-assign.
Assignee: racham → sspitzer
Status: REOPENED → NEW
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
QA Contact: agracebush → profile-migration
nsProfile::MigrateAllProfiles and mNumOldProfiles no longer exist in the codebase.  Since this bug never had steps to reproduce, I can only guess that this bug is long-gone.
Status: NEW → RESOLVED
Last Resolved: 18 years ago9 years ago
Resolution: --- → INCOMPLETE
(Assignee)

Updated

2 years ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.