Crash in GSAServiceClient.connect |
|||
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?
,
Oct 27 2016
Issue 659900 has been merged into this issue.
,
Oct 27 2016
,
Oct 27 2016
Issue 660140 has been merged into this issue.
,
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
,
Oct 28 2016
,
Nov 2 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by lizeb@chromium.org
, Oct 27 2016