New issue
Advanced search Search tips

Issue 732600 link

Starred by 1 user

Issue metadata

Status: Duplicate
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Chrome Home crash from using bookmarks too early

Project Member Reported by mdjones@chromium.org, Jun 12 2017

Issue description

On old devices like the galaxy s4, it is possible to get the following crash from tapping on the bottom toolbar and immediately hitting the bookmarks tab:

java.lang.IllegalStateException: Browser hasn't finished initialization yet!
    at org.chromium.chrome.browser.profiles.Profile.getLastUsedProfile(Profile.java:7)
    at org.chromium.chrome.browser.bookmarks.BookmarkModel.<init>(BookmarkModel.java:1)
    at org.chromium.chrome.browser.bookmarks.BookmarkManager.<init>(BookmarkManager.java:9)
    at org.chromium.chrome.browser.bookmarks.BookmarkSheetContent.<init>(BookmarkSheetContent.java:2)
    at org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContentController.showBottomSheetContent(BottomSheetContentController.java:48)
    at org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContentController.onNavigationItemSelected(BottomSheetContentController.java:28)
    at android.support.design.widget.m.w(BottomNavigationView.java:6)
    at android.support.v7.view.menu.u.o(MenuBuilder.java:218)
    ...

 
Should we disallow opening the bottom sheet before the UI is initialized? Most of our surfaces, including the toolbar, need a Profile to work correctly.
* s/UI/browser
I think that's reasonable. We would just 'black hole' all touch events to the toolbar while the browser isn't initialized. We already have this functionality, we just need a signal to enable it.
Status: Available (was: Assigned)
We can hook into the same methods that Profile uses to throw the IllegalStateException:

BrowserStartupController#isStartupSuccessfullyCompleted and BrowserStartupController#addStartupCompletedObserver().
Labels: -Pri-3 Hotlist-Chrome-Home Pri-2
Mergedinto: 736017
Status: Duplicate (was: Available)
I'm going to roll this into issue 736017 since I have a patch in-flight linked to that bug number.

Sign in to add a comment