Last Comment Bug 783134 - Crash on startup [@ nsWebShellWindow::WindowResized]
: Crash on startup [@ nsWebShellWindow::WindowResized]
Status: RESOLVED FIXED
[startupcrash]
: crash
Product: Core
Classification: Components
Component: Widget: Gonk (show other bugs)
: Trunk
: ARM Gonk (Firefox OS)
: -- critical (vote)
: mozilla17
Assigned To: Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
:
Mentors:
: 783163 (view as bug list)
Depends on:
Blocks: 743975
  Show dependency treegraph
 
Reported: 2012-08-15 17:10 PDT by Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
Modified: 2012-08-16 06:18 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Work around crashing on startup with fullscreen widgets (1.14 KB, patch)
2012-08-15 17:30 PDT, Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
roc: review+
Details | Diff | Splinter Review

Description Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-15 17:10:38 PDT
nsCOMPtr<nsIBaseWindow> shellAsWin(do_QueryInterface(mDocShell));
  shellAsWin->SetPositionAndSize(0, 0, aWidth, aHeight, false);

|mDocShell| is null here.
Comment 1 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-15 17:30:35 PDT
Created attachment 652286 [details] [diff] [review]
Work around crashing on startup with fullscreen widgets

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.
Comment 2 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-08-15 17:39:30 PDT
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);

{}
Comment 3 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-15 17:55:13 PDT
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.
Comment 4 Neil Deakin 2012-08-15 18:05:18 PDT
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.
Comment 5 Kan-Ru Chen [:kanru] (UTC+8) 2012-08-15 21:13:03 PDT
*** Bug 783163 has been marked as a duplicate of this bug. ***
Comment 6 Gene Lian [:gene] (I already quit Mozilla) 2012-08-15 22:24:50 PDT
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.
Comment 7 Kan-Ru Chen [:kanru] (UTC+8) 2012-08-15 22:38:55 PDT
(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.
Comment 8 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-08-15 23:44:35 PDT
Yes, in my build from when this landed, the home button works fine.  Probably a gaia regression.
Comment 9 Ed Morley [:emorley] 2012-08-16 06:18:30 PDT
https://hg.mozilla.org/mozilla-central/rev/d60761f2ce89

Note You need to log in before you can comment on or make changes to this bug.