New issue
Advanced search Search tips

Issue 659989 link

Starred by 7 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android
Pri: 1
Type: Bug



Sign in to add a comment

Crash in GSAServiceClient.connect

Project Member Reported by bauerb@chromium.org, Oct 27 2016

Issue description

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Context.bindService(android.content.Intent, android.content.ServiceConnection, int)' on a null object reference
       at org.chromium.chrome.browser.gsa.GSAServiceClient.connect(GSAServiceClient.java:102)
       at org.chromium.chrome.browser.gsa.GSAAccountChangeListener.connect(GSAAccountChangeListener.java:122)
       at org.chromium.chrome.browser.ChromeActivity.onStartWithNative(ChromeActivity.java:657)
       at org.chromium.chrome.browser.ChromeTabbedActivity.onStartWithNative(ChromeTabbedActivity.java:465)
       at org.chromium.chrome.browser.init.NativeInitializationController.startNowAndProcessPendingItems(NativeInitializationController.java:252)
       at org.chromium.chrome.browser.init.NativeInitializationController.onStart(NativeInitializationController.java:179)
       at org.chromium.chrome.browser.init.AsyncInitializationActivity.onStart(AsyncInitializationActivity.java:278)
       at org.chromium.chrome.browser.ChromeActivity.onStart(ChromeActivity.java:857)
       at org.chromium.chrome.browser.ChromeTabbedActivity.onStart(ChromeTabbedActivity.java:459)
       at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
       at android.app.Activity.performStart(Activity.java:6253)
       at android.app.Activity.performRestart(Activity.java:6299)
       at android.app.ActivityThread.handleSleeping(ActivityThread.java:3645)
       at android.app.ActivityThread.-wrap19(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1519)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5417)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Looks like GSAServiceClient resets its context on disconnection, so it doesn't support reconnecting after that. Not sure whether the fix would be to reset the client in GSAAccountChangeListener, or keep the context around in GSAServiceClient?
 

Comment 1 by lizeb@chromium.org, Oct 27 2016

Issue 659896 has been merged into this issue.

Comment 2 by lizeb@chromium.org, Oct 27 2016

Issue 659900 has been merged into this issue.

Comment 3 by lizeb@chromium.org, Oct 27 2016

Status: Started (was: Assigned)

Comment 4 by lizeb@chromium.org, Oct 27 2016

Issue 660140 has been merged into this issue.
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 27 2016

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

commit 1254a5289eba87f35daa4f2e69af7eaa6c198490
Author: lizeb <lizeb@chromium.org>
Date: Thu Oct 27 21:06:04 2016

android: Keep the context on disconnect in GSAServiceClient.

This fixes a crash, since now the same GSAServiceClient can be used
several times in a row.

BUG= 659989 

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

[modify] https://crrev.com/1254a5289eba87f35daa4f2e69af7eaa6c198490/chrome/android/java/src/org/chromium/chrome/browser/gsa/GSAServiceClient.java

Comment 6 by lizeb@chromium.org, Oct 28 2016

Cc: lizeb@chromium.org
 Issue 660152  has been merged into this issue.

Comment 7 by lizeb@chromium.org, Nov 2 2016

Status: Fixed (was: Started)

Sign in to add a comment