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

Issue 645426 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Away
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: ----
Type: ----



Sign in to add a comment

Chrome crashes when lauching Custom Tabs with RemoteView and

Project Member Reported by andreban@google.com, Sep 9 2016

Issue description

Application Version (from "Chrome Settings > About Chrome"): 52.0.2743.98 / 54.0.2840.16
Android Build Number (from "Android Settings > About Phone/Tablet"): Android Nougat
Device: Nexus 6P

Steps to reproduce: 
1 - When building the Custom Tab, add a remoteView and the clickableIds to null (customTabsBuilder.setSecondaryToolbarViews(remoteViews, null, null);)
2 - Open the Custom Tab.


Observed behavior: 
When the Custom Tab is launched, Chrome crashes.

Expected behavior: 
Chrome should launch the Custom Tab.

Frequency: 
5/5

Additional comments: 
The javadoc for the setSecondaryToolbarViews mentions that the 2nd and 3rd parameters are nullable.

Stacktrace:
3.174 27402-27402/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                   Process: com.android.chrome, PID: 27402
                                                   java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.chrome/org.chromium.chrome.browser.customtabs.CustomTabActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.Object.clone()' on a null object reference
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
                                                       at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:154)
                                                       at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
                                                    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.Object.clone()' on a null object reference
                                                       at org.chromium.chrome.browser.customtabs.CustomTabIntentDataProvider.getClickableViewIDs(CustomTabIntentDataProvider.java:303)
                                                       at org.chromium.chrome.browser.customtabs.CustomTabBottomBarDelegate.showBottomBarIfNecessary(CustomTabBottomBarDelegate.java:74)
                                                       at org.chromium.chrome.browser.customtabs.CustomTabActivity.postInflationStartup(CustomTabActivity.java:244)
                                                       at org.chromium.chrome.browser.init.ChromeBrowserInitializer.handlePreNativeStartup(ChromeBrowserInitializer.java:146)
                                                       at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreate(AsyncInitializationActivity.java:217)
                                                       at android.app.Activity.performCreate(Activity.java:6664)
                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) 
                                                       at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                       at android.os.Looper.loop(Looper.java:154) 
                                                       at android.app.ActivityThread.main(ActivityThread.java:6077) 
                                                       at java.lang.reflect.Method.invoke(Native Method) 
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) 
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 

 
Project Member

Comment 1 by sheriffbot@chromium.org, Sep 9 2016

Labels: Hotlist-Google
Cc: yus...@chromium.org
Owner: ian...@chromium.org
Status: Assigned (was: Unconfirmed)
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 26 2017

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

commit a90bb521817edb51ac6c5643d15dc175a6ef5adc
Author: ianwen <ianwen@chromium.org>
Date: Thu Jan 26 21:08:32 2017

[Android] Fix a crash when clickable view ids is sent as null in CCT

We were calling clone() on a potentially null object, which caused
crashes.

BUG= 645426 

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

[modify] https://crrev.com/a90bb521817edb51ac6c5643d15dc175a6ef5adc/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java

Comment 4 by ian...@chromium.org, Jan 26 2017

Status: Fixed (was: Assigned)

Sign in to add a comment