New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 713759 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

FRE crashes on Chrome Public when ChromeHome is enabled

Project Member Reported by dgn@chromium.org, Apr 20 2017

Issue description

1. Install ChromePublic built from master
2. Start it
3. ???
4. Crash!

Device: Nexus 5 on KK

Trace with ChromeHome enabled via command line flags:

E/AndroidRuntime: FATAL EXCEPTION: main
E/AndroidRuntime: Process: org.chromium.chrome, PID: 16617
E/AndroidRuntime: java.lang.NullPointerException
E/AndroidRuntime: 	at android.widget.TextView.checkForRelayout(TextView.java:6556)
E/AndroidRuntime: 	at android.widget.TextView.onRtlPropertiesChanged(TextView.java:8672)
E/AndroidRuntime: 	at android.view.View.resolveRtlPropertiesIfNeeded(View.java:12160)
E/AndroidRuntime: 	at android.view.View.measure(View.java:16491)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.textbubble.TextBubble.updateBubbleLayout(TextBubble.java:262)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.textbubble.TextBubble.show(TextBubble.java:145)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.textbubble.ViewAnchoredTextBubble.show(ViewAnchoredTextBubble.java:68)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.showHelpBubbleIfNecessary(BottomSheet.java:1121)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.access$1600(BottomSheet.java:61)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.bottomsheet.BottomSheet$1.onTabStateInitialized(BottomSheet.java:444)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabModelSelectorBase.markTabStateInitialized(TabModelSelectorBase.java:213)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl.markTabStateInitialized(TabModelSelectorImpl.java:87)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl$1.onStateLoaded(TabModelSelectorImpl.java:75)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabPersistentStore.onStateLoaded(TabPersistentStore.java:1164)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabPersistentStore.loadNextTab(TabPersistentStore.java:1202)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabPersistentStore.restoreTabs(TabPersistentStore.java:476)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl.restoreTabs(TabModelSelectorImpl.java:284)
E/AndroidRuntime: 	at org.chromium.chrome.browser.ChromeTabbedActivity.initializeState(ChromeTabbedActivity.java:842)
E/AndroidRuntime: 	at org.chromium.chrome.browser.init.ChromeBrowserInitializer$7.initFunction(ChromeBrowserInitializer.java:312)
E/AndroidRuntime: 	at org.chromium.chrome.browser.init.ChromeBrowserInitializer$1NativeInitTask.run(ChromeBrowserInitializer.java:257)
E/AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime: 	at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime: 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime: 	at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime: 	at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager:   Force finishing activity org.chromium.chrome/.browser.firstrun.FirstRunActivity



Trace without ChromeHome

E/AndroidRuntime: FATAL EXCEPTION: main
E/AndroidRuntime: Process: org.chromium.chrome, PID: 17223
E/AndroidRuntime: java.lang.NullPointerException
E/AndroidRuntime: 	at android.widget.TextView.checkForRelayout(TextView.java:6556)
E/AndroidRuntime: 	at android.widget.TextView.onRtlPropertiesChanged(TextView.java:8672)
E/AndroidRuntime: 	at android.view.View.resolveRtlPropertiesIfNeeded(View.java:12160)
E/AndroidRuntime: 	at android.view.View.measure(View.java:16491)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.textbubble.TextBubble.updateBubbleLayout(TextBubble.java:262)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.textbubble.TextBubble.show(TextBubble.java:145)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.textbubble.ViewAnchoredTextBubble.show(ViewAnchoredTextBubble.java:68)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.showHelpBubbleIfNecessary(BottomSheet.java:1121)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.access$1600(BottomSheet.java:61)
E/AndroidRuntime: 	at org.chromium.chrome.browser.widget.bottomsheet.BottomSheet$1.onTabStateInitialized(BottomSheet.java:444)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabModelSelectorBase.markTabStateInitialized(TabModelSelectorBase.java:213)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl.markTabStateInitialized(TabModelSelectorImpl.java:87)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl$1.onStateLoaded(TabModelSelectorImpl.java:75)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabPersistentStore.onStateLoaded(TabPersistentStore.java:1164)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabPersistentStore.loadNextTab(TabPersistentStore.java:1202)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabPersistentStore.restoreTabs(TabPersistentStore.java:476)
E/AndroidRuntime: 	at org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl.restoreTabs(TabModelSelectorImpl.java:284)
E/AndroidRuntime: 	at org.chromium.chrome.browser.ChromeTabbedActivity.initializeState(ChromeTabbedActivity.java:842)
E/AndroidRuntime: 	at org.chromium.chrome.browser.init.ChromeBrowserInitializer$7.initFunction(ChromeBrowserInitializer.java:312)
E/AndroidRuntime: 	at org.chromium.chrome.browser.init.ChromeBrowserInitializer$1NativeInitTask.run(ChromeBrowserInitializer.java:257)
E/AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime: 	at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime: 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime: 	at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime: 	at dalvik.system.NativeStart.main(Native Method)

 
Cc: mdjones@chromium.org
Owner: twelling...@chromium.org
Status: Assigned (was: Untriaged)
Haven't even landed anything here yet.  Theresa?  Matt?

Comment 2 by dgn@chromium.org, Apr 20 2017

Cc: nyquist@chromium.org
Components: -UI>Browser>Mobile>NavPanel
Maybe in-product Help changes. Can you please have a look?
It's definitely the in-product help change. I'll take a look later this morning.
As an aside, we haven't spent any time on FRE + Chrome Home so it's not expected to work yet.
dgn@ - regarding the trace without ChromeHome enabled -- BottomSheet shouldn't exist if Chrome Home isn't enabled so I suspect that the flag didn't cleared properly since we cache whether Chrome Home is enabled or not in SharedPreferences. Did you completely uninstall Chrome/clear data or just clear command line flags and try to restart?

Comment 6 by dgn@chromium.org, Apr 20 2017

Components: UI>Browser>Mobile>NavPanel
You're right, I just cleared the flag but not the app data. It was still in the preferences and crashed before the point where the ChromeHome pref gets cleared.

ChromePublic works fine after clearing the app data.

Thanks!
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/376c95014c7b2af28f228cdcc3a1a4c18435fca5

commit 376c95014c7b2af28f228cdcc3a1a4c18435fca5
Author: twellington <twellington@chromium.org>
Date: Thu Apr 20 20:11:14 2017

[Home] Don't show help bubble if FRE is not complete

BUG= 713759 

Review-Url: https://codereview.chromium.org/2828323002
Cr-Commit-Position: refs/heads/master@{#466101}

[modify] https://crrev.com/376c95014c7b2af28f228cdcc3a1a4c18435fca5/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java

Status: Fixed (was: Assigned)
This should be fixed on ToT. Please let me know if you run into any issues.
Status: Assigned (was: Fixed)
I'm seeing this on an L device as well, not after first run.

It's crashing on this method in TextView.java on mLayoutParams.width:

    private void checkForRelayout() {
        // If we have a fixed width, we can just swap in a new text layout
        // if the text height stays the same or if the view height is fixed.

        if ((mLayoutParams.width != LayoutParams.WRAP_CONTENT ||

    .....

    }
Labels: ReleaseBlock-Stable M-60
Status: Started (was: Assigned)
Cc: dtrainor@chromium.org
I'm seeing crashes when trying to show a ViewAnchoredTextBubble on the toolbar even when Chrome Home isn't enabled, for example:

E/AndroidRuntime(17331): java.lang.NullPointerException: Attempt to read from field 'int android.view.ViewGroup$LayoutParams.width' on a null object reference
E/AndroidRuntime(17331): 	at android.widget.TextView.checkForRelayout(TextView.java:6827)
E/AndroidRuntime(17331): 	at android.widget.TextView.onRtlPropertiesChanged(TextView.java:8945)
E/AndroidRuntime(17331): 	at android.view.View.resolveRtlPropertiesIfNeeded(View.java:13109)
E/AndroidRuntime(17331): 	at android.view.View.measure(View.java:17542)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.widget.textbubble.TextBubble.updateBubbleLayout(TextBubble.java:262)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.widget.textbubble.TextBubble.show(TextBubble.java:145)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.widget.textbubble.ViewAnchoredTextBubble.show(ViewAnchoredTextBubble.java:68)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.toolbar.TabSwitcherCallout.showIfNecessary(TabSwitcherCallout.java:46)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.toolbar.ToolbarPhone.showTabSwitcherCalloutIfNecessary(ToolbarPhone.java:2272)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.toolbar.ToolbarPhone.onTabOrModelChanged(ToolbarPhone.java:1905)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.toolbar.ToolbarManager.refreshSelectedTab(ToolbarManager.java:1145)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.toolbar.ToolbarManager.onNativeLibraryReady(ToolbarManager.java:804)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.toolbar.ToolbarManager.initializeWithNative(ToolbarManager.java:675)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.ChromeTabbedActivity.initializeUI(ChromeTabbedActivity.java:690)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.ChromeTabbedActivity.finishNativeInitialization(ChromeTabbedActivity.java:420)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.init.ChromeBrowserInitializer$9.initFunction(ChromeBrowserInitializer.java:327)
E/AndroidRuntime(17331): 	at org.chromium.chrome.browser.init.ChromeBrowserInitializer$1NativeInitTask.run(ChromeBrowserInitializer.java:257)
E/AndroidRuntime(17331): 	at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(17331): 	at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(17331): 	at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(17331): 	at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime(17331): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(17331): 	at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(17331): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime(17331): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
W/ActivityManager(  759):   Force finishing activity 1 com.google.android.apps.chrome/org.chromium.chrome.browser.ChromeTabbedActivity
W/linker  (17479): libaccessibility.cr.so: unused DT entry: type 0x6ffffffe arg 0x5108

The TextBubble's content view doesn't have layout params the first time TextBubble#updateBubbleLayout() is called.  If I modify TextBubble#createContentView() to explicitly set LayoutParams for the inflated content view, the bubble shows up as expected.

David, does that sounds like a reasonable solution?

Updated method:
    private void createContentView() {
        if (mPopupWindow.getContentView() != null) return;
        View view = LayoutInflater.from(mContext).inflate(R.layout.textbubble_text, null);
        ((TextView) view).setText(mStringId);
        mPopupWindow.setContentView(view);
        view.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    }
Project Member

Comment 13 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef2a188ba732dd2a75b26909182cea063846c50e

commit ef2a188ba732dd2a75b26909182cea063846c50e
Author: twellington <twellington@chromium.org>
Date: Wed Apr 26 16:12:50 2017

Set LayoutParams on TextBubble content view

On some versions of Android, the LayoutParams aren't set until after
the popup window is shown. Explicitly set the LayoutParams to avoid
crashing.

BUG= 713759 

Review-Url: https://codereview.chromium.org/2845653002
Cr-Commit-Position: refs/heads/master@{#467337}

[modify] https://crrev.com/ef2a188ba732dd2a75b26909182cea063846c50e/chrome/android/java/src/org/chromium/chrome/browser/widget/textbubble/TextBubble.java

Status: Fixed (was: Started)

Comment 15 by aluo@chromium.org, Jun 7 2017

Labels: M-59 Merge-Request-59
Requesting merge to M-59, see https://bugs.chromium.org/p/chromium/issues/detail?id=713874#c3
Project Member

Comment 16 by sheriffbot@chromium.org, Jun 7 2017

Labels: -Merge-Request-59 Merge-Review-59 Hotlist-Merge-Review
This bug requires manual review: Request affecting a post-stable build
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 17 by aluo@chromium.org, Jun 7 2017

Labels: -Pri-2 Pri-1
Adding to c#15, https://codereview.chromium.org/2845653002 should be merged to M-59, seeing crashes on L devices.
The bottomsheet bubble isn't in 59, so we must have turned on some other text bubble in 59 -- seeing this crash stack in some reports:

java.lang.NullPointerException: Attempt to read from field 'int android.view.ViewGroup$LayoutParams.width' on a null object reference
at android.widget.TextView.checkForRelayout	(TextView.java:8145 )
at android.widget.TextView.onRtlPropertiesChanged	(TextView.java:11217 )
at android.view.View.resolveRtlPropertiesIfNeeded	(View.java:14383 )
at android.view.View.measure	(View.java:18921 )
at org.chromium.chrome.browser.widget.textbubble.TextBubble.updateBubbleLayout	(TextBubble.java:62 )
at org.chromium.chrome.browser.widget.textbubble.TextBubble.show	(TextBubble.java:36 )
at org.chromium.chrome.browser.widget.textbubble.ViewAnchoredTextBubble.show	(ViewAnchoredTextBubble.java:19 )
at org.chromium.chrome.browser.toolbar.ToolbarPhone.onTabOrModelChanged	(ToolbarPhone.java:872 )
at org.chromium.chrome.browser.toolbar.ToolbarManager.refreshSelectedTab	(ToolbarManager.java:247 )
at org.chromium.chrome.browser.toolbar.ToolbarManager.initializeWithNative	(ToolbarManager.java:100 )
at org.chromium.chrome.browser.ChromeTabbedActivity.finishNativeInitialization	(ChromeTabbedActivity.java:89 )
at org.chromium.chrome.browser.init.ChromeBrowserInitializer$9.initFunction	(ChromeBrowserInitializer.java:3 )
at org.chromium.chrome.browser.init.ChromeBrowserInitializer$1NativeInitTask.run	(ChromeBrowserInitializer.java:2 )
at android.os.Handler.handleCallback	(Handler.java:739 )
at android.os.Handler.dispatchMessage	(Handler.java:95 )
at android.os.Looper.loop	(Looper.java:145 )
at android.app.ActivityThread.main	(ActivityThread.java:6934 )
at java.lang.reflect.Method.invoke	(Native Method )
at java.lang.reflect.Method.invoke	(Method.java:372 )
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run	(ZygoteInit.java:1404 )
at com.android.internal.os.ZygoteInit.main	(ZygoteInit.java:1199 )
Cc: amineer@chromium.org
Alex, while the 59 crash is on a different bubble, the very tiny patch here will fix it https://codereview.chromium.org/2845653002

Dave and I are at the inclusion summit, so we won't be able to cherry-pick until later tonight.
Project Member

Comment 20 by bugdroid1@chromium.org, Jun 7 2017

Labels: merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8c82213e4693e84857ba6255760cbc7f3014820e

commit 8c82213e4693e84857ba6255760cbc7f3014820e
Author: Alex Mineer <amineer@chromium.org>
Date: Wed Jun 07 21:50:05 2017

Set LayoutParams on TextBubble content view

On some versions of Android, the LayoutParams aren't set until after
the popup window is shown. Explicitly set the LayoutParams to avoid
crashing.

BUG= 713759 

(cherry picked from commit ef2a188ba732dd2a75b26909182cea063846c50e)

Review-Url: https://codereview.chromium.org/2845653002
Cr-Original-Commit-Position: refs/heads/master@{#467337}
Cr-Commit-Position: refs/branch-heads/3071@{#755}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/8c82213e4693e84857ba6255760cbc7f3014820e/chrome/android/java/src/org/chromium/chrome/browser/widget/textbubble/TextBubble.java

Labels: -Merge-Review-59

Sign in to add a comment