Closed Bug 783134 Opened 12 years ago Closed 12 years ago

Crash on startup [@ nsWebShellWindow::WindowResized]

Categories

(Core Graveyard :: Widget: Gonk, defect)

ARM
Gonk (Firefox OS)
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
mozilla17

People

(Reporter: cjones, Assigned: cjones)

References

Details

(Keywords: crash, Whiteboard: [startupcrash])

Crash Data

Attachments

(1 file)

nsCOMPtr<nsIBaseWindow> shellAsWin(do_QueryInterface(mDocShell));
  shellAsWin->SetPositionAndSize(0, 0, aWidth, aHeight, false);

|mDocShell| is null here.
I think what's unique about b2g here is that our xul:window starts up fullscreen, so we resize several times *very* early in startup.  This patch seems innocuous although it makes me sad.
Attachment #652286 - Flags: review?(roc)
Comment on attachment 652286 [details] [diff] [review]
Work around crashing on startup with fullscreen widgets

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

::: xpfe/appshell/src/nsWebShellWindow.cpp
@@ +252,5 @@
>    }
>  
>    nsCOMPtr<nsIBaseWindow> shellAsWin(do_QueryInterface(mDocShell));
> +  if (shellAsWin)
> +    shellAsWin->SetPositionAndSize(0, 0, aWidth, aHeight, false);

{}
Attachment #652286 - Flags: review?(roc) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/d60761f2ce89

Neil, had to push this as an emergency fix; let me know if this isn't correct.
Yes, that should be ok. The old code had a null check on the docshell instead. You might want to check that and bail out at the beginning of the WindowResized instead and avoid the no-op call to AdjustPopupsOnWindowChange though but no big deal.
After including both the patches of bug 783134 and bug 783139, we can now avoid the crash and enter the home screen. However, the home button still don't work when we attempt to go back to the home screen from an app.
(In reply to Gene Lian [:gene] from comment #6)
> After including both the patches of bug 783134 and bug 783139, we can now
> avoid the crash and enter the home screen. However, the home button still
> don't work when we attempt to go back to the home screen from an app.

That is probably not related because revert the patch doesn't fix the home button.
Yes, in my build from when this landed, the home button works fine.  Probably a gaia regression.
Crash Signature: [@ nsWebShellWindow::WindowResized]
Keywords: crash
Whiteboard: [startupcrash]
https://hg.mozilla.org/mozilla-central/rev/d60761f2ce89
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: