Closed Bug 945829 Opened 11 years ago Closed 11 years ago

Metrofox hangs on startup when trying to show the profile chooser dialog

Categories

(Firefox for Metro Graveyard :: General, defect, P2)

x86
Windows 8.1
defect

Tracking

(firefox28 verified, firefox29 verified)

VERIFIED FIXED
Firefox 29
Tracking Status
firefox28 --- verified
firefox29 --- verified

People

(Reporter: kats, Assigned: bbondy)

References

Details

(Keywords: regression, Whiteboard: [beta28] p=1)

Crash Data

Attachments

(1 file, 2 obsolete files)

Previously when working on Metro I had set the option to always show the profilemanager profile chooser dialog on startup. On Metrofox that usually did nothing and would just start Metrofox directly, while starting in desktop mode it would show the dialog.

Recently (sometime in the last ~10 days) Metrofox has started to hang under these conditions. Attaching Visual studio shows that it is trying to show the modal dialog for the profile manager.
There are a few cases here that can launch this dialog - parameters on shortcuts and we also store a flag in hte profile ini file - 

http://mxr.mozilla.org/mozilla-central/ident?i=ShowProfileManager

http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#2297
http://mxr.mozilla.org/mozilla-central/source/toolkit/profile/nsToolkitProfileService.cpp#906
Blocks: metroprofilesharing
No longer blocks: metrov1backlog
Whiteboard: [triage] → [release28]
I think we should just ignore the profile manager flag on Metro for v1
p=1
In case anybody else runs into this, I worked around it by commenting out the line at http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp?rev=bd024cf6af34#2297
Whiteboard: [release28] → [beta28] p=0
p=1
Assignee: nobody → netzen
Status: NEW → ASSIGNED
Blocks: metrov1it21
No longer blocks: metrov1backlog
Priority: -- → P2
QA Contact: jbecerra
Whiteboard: [beta28] p=0 → [beta28] p=1
Blocks: 948478
Attached patch rev1 (obsolete) — Splinter Review
Attachment #8345354 - Flags: review?(jmathies)
Comment on attachment 8345354 [details] [diff] [review]
rev1

XRE_GetWindowsEnvironment() is ifdef'd into XP_WIN builds only which is going to make this messy. Maybe add a helper function in nsAppRunner with the ifdef's GetWindowsEnvironment call to simplify?
Attachment #8345354 - Flags: review?(jmathies) → review-
Talked about making the environment type call cross platform but bsmedberg x'ed the idea.
I think having a helper on a helper is a bit ugly, so just going to add in the ifdefs to each call.
I think w can propose and find a better way in a diff bug that won't hold this up if we want to.
This will just uses our previous convention for this kind of thing.
Actually we can go with your idea and get past my gripe about helper on helper just by making it called ShouldShowProfileManager() and not something like IsMetro. Maybe you meant that originally :)
In any case I'll do that so we only have one ifdef
Attached patch rev2 (obsolete) — Splinter Review
Attachment #8345354 - Attachment is obsolete: true
Attachment #8346066 - Flags: review?(jmathies)
Crash Signature: [@ @0x0 | _MD_MemMap | PR_MemMap | nsZipHandle::Init(nsIFile*, nsZipHandle**, PRFileDesc**)]
Comment on attachment 8346066 [details] [diff] [review]
rev2

Review of attachment 8346066 [details] [diff] [review]:
-----------------------------------------------------------------

What happen when we drop out of this, do we still get a default profile loaded?

::: toolkit/xre/nsAppRunner.cpp
@@ +584,5 @@
> +{
> +#if defined(XP_WIN)
> +  return XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop;
> +#else
> +  return false;

return true?
Attachment #8346066 - Flags: review?(jmathies) → review+
Crash Signature: [@ @0x0 | _MD_MemMap | PR_MemMap | nsZipHandle::Init(nsIFile*, nsZipHandle**, PRFileDesc**)] → [@ @0x0 | _MD_MemMap | PR_MemMap | nsZipHandle::Init(nsIFile*, nsZipHandle**, PRFileDesc**)] [@ RtlpWaitOnCriticalSection | arena_malloc | je_malloc | nsStringBuffer::Alloc(unsigned __int64)]
(In reply to Jim Mathies [:jimm] from comment #12)
> Comment on attachment 8346066 [details] [diff] [review]
> rev2
> 
> Review of attachment 8346066 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> What happen when we drop out of this, do we still get a default profile
> loaded?
> 
> ::: toolkit/xre/nsAppRunner.cpp
> @@ +584,5 @@
> > +{
> > +#if defined(XP_WIN)
> > +  return XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop;
> > +#else
> > +  return false;
> 
> return true?

Yep oops, fixed.  Try would have caught it but thanks for catching it early :D


> What happen when we drop out of this, do we still get a default profile
> loaded?

From my testing we get the default profile
Attached patch rev3Splinter Review
Carrying forward r+
Attachment #8346066 - Attachment is obsolete: true
Attachment #8346100 - Flags: review+
Blocks: 949587
I'll be out a lot today (on PTO) and inbound is closed now, this passes try tests, marking checkin-needed in case someone gets to it before me.
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/00a28ea962f2

Please make sure your patch includes a commit message next time. Thanks :)
Keywords: checkin-needed
Whiteboard: [beta28] p=1 → [beta28] p=1[fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/00a28ea962f2
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [beta28] p=1[fixed-in-fx-team] → [beta28] p=1
Target Milestone: --- → Firefox 29
Comment on attachment 8346100 [details] [diff] [review]
rev3

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 924860
User impact if declined: Always show profile manager would hang Metro Firefox on startup.
Testing completed (on m-c, etc.): It's been on m-c for a couple days.
Risk to taking this patch (and alternatives if risky): very low
String or IDL/UUID changes made by this patch: none
Attachment #8346100 - Flags: approval-mozilla-aurora?
Attachment #8346100 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Target Milestone: Firefox 29 → Firefox 28
Target milestone reflects what was on m-c when the bug landed. Status-firefoxXX flags track uplifts to other branches/trains.
Target Milestone: Firefox 28 → Firefox 29
Kartikaya, can you please confirm this is working for you now with Firefox 28 and 29?
Flags: needinfo?(bugmail.mozilla)
I tried a few days ago after this bug landed on 29, and it would show me the profile chooser dialog and then start the non-metro interface of Firefox. I could switch to the metro interface from the menu. So I would consider this bug fixed, yes.
Flags: needinfo?(bugmail.mozilla)
Thanks for your help Kartikaya.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: