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

Issue 606525 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocking:
issue 606418



Sign in to add a comment

NPE on attempting to resume the ChromeActivity

Project Member Reported by dfalcant...@chromium.org, Apr 25 2016

Issue description

Caused by https://codereview.chromium.org/1909043002.

1) Start Chrome, close all tabs.
2) Open a new tab and navigate to facebook.com
3) Add it to the home screen
4) Close and kill Chrome by swiping it away.
5) Select the Facebok home screen shortcut.  New tab with facebook.com should appear.
6) Close the facebook tab but don't swipe chrome away from Android's Overview to keep it alive.
7) Go to the launcher, reselect facebook.com.  Insta-crash on startup.


  04-25 17:34:26.974 17885 17885 E AndroidRuntime: FATAL EXCEPTION: main
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: Process: org.chromium.chrome, PID: 17885
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {org.chromium.chrome/org.chromium.chrome.browser.ChromeTabbedActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.chromium.chrome.browser.tab.Tab.isLoading()' on a null object reference
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3400)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3440)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1490)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6010)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:667)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.chromium.chrome.browser.tab.Tab.isLoading()' on a null object reference
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at org.chromium.chrome.browser.ChromeActivity.onStartWithNative(ChromeActivity.java:586)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at org.chromium.chrome.browser.ChromeTabbedActivity.onStartWithNative(ChromeTabbedActivity.java:385)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at org.chromium.chrome.browser.init.NativeInitializationController.startNowAndProcessPendingItems(NativeInitializationController.java:253)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at org.chromium.chrome.browser.init.NativeInitializationController.onStart(NativeInitializationController.java:180)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at org.chromium.chrome.browser.init.AsyncInitializationActivity.onStart(AsyncInitializationActivity.java:258)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at org.chromium.chrome.browser.ChromeActivity.onStart(ChromeActivity.java:751)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at org.chromium.chrome.browser.ChromeTabbedActivity.onStart(ChromeTabbedActivity.java:379)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1248)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.Activity.performStart(Activity.java:6616)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.Activity.performRestart(Activity.java:6690)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.Activity.performResume(Activity.java:6695)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3377)
  04-25 17:34:26.974 17885 17885 E AndroidRuntime: 	... 8 more
  04-25 17:34:26.977   916 16431 W ActivityManager:   Force finishing activity org.chromium.chrome/.browser.ChromeTabbedActivity

 
Labels: -M-52 ReleaseBlock-Stable M-51
I will fix this this afternoon.
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 26 2016

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

commit 738ae75b8582befaf0f0cebaa45d695163f37d9f
Author: twellington <twellington@chromium.org>
Date: Tue Apr 26 00:27:41 2016

Add a null check to ChromeActivity#onStartWithNative()

Check for getActivityTab() != null before calling getActivityTab().isLoading()

BUG= 606525 

Review URL: https://codereview.chromium.org/1921613004

Cr-Commit-Position: refs/heads/master@{#389634}

[modify] https://crrev.com/738ae75b8582befaf0f0cebaa45d695163f37d9f/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Labels: Merge-Request-51

Comment 4 by tin...@google.com, Apr 26 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 26 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b41fc7b814761bd1e9ccd0bdf047ed9f84ae9efd

commit b41fc7b814761bd1e9ccd0bdf047ed9f84ae9efd
Author: Theresa Wellington <twellington@google.com>
Date: Tue Apr 26 00:38:42 2016

Add a null check to ChromeActivity#onStartWithNative()

Check for getActivityTab() != null before calling getActivityTab().isLoading()

BUG= 606525 
TBR=tedchoc@chromium.org

Review URL: https://codereview.chromium.org/1921613004

Cr-Commit-Position: refs/heads/master@{#389634}

Review URL: https://codereview.chromium.org/1921873004 .

Cr-Commit-Position: refs/branch-heads/2704@{#237}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/b41fc7b814761bd1e9ccd0bdf047ed9f84ae9efd/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Status: Fixed (was: Assigned)

Comment 7 by ram...@chromium.org, Apr 26 2016

Status: Verified (was: Fixed)
Verified with latest chrome release.

Sign in to add a comment