New issue
Advanced search Search tips

Issue 882072 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 13
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocking:
issue 882069



Sign in to add a comment

[Remoting Android] App crashes at launch

Project Member Reported by yuweih@chromium.org, Sep 8

Issue description

Android logs:

09-07 18:08:28.567: W/cr_Chromoting(1136): Couldn't load remoting_client_jni, trying remoting_client_jni.cr
09-07 18:08:28.983: W/System.err(1136): java.lang.NullPointerException: Attempt to read from field 'android.os.MessageQueue android.os.Looper.mQueue' on a null object reference
09-07 18:08:28.983: W/System.err(1136): 	at android.os.Handler.<init>(Handler.java:233)
09-07 18:08:28.983: W/System.err(1136): 	at android.os.Handler.<init>(Handler.java:141)
09-07 18:08:28.983: W/System.err(1136): 	at org.chromium.net.ProxyChangeListener.<init>(ProxyChangeListener.java:72)
09-07 18:08:28.984: W/System.err(1136): 	at org.chromium.net.ProxyChangeListener.create(ProxyChangeListener.java:85)


Seems to be related to the recent mojo URL loader change.
 
It looks like ProxyChangeListener tries to get the looper of the network thread but it doesn't have a looper because it's an AutoThread that we created, which just spins its Chromium message loop...

Fix might potentially be nontrivial. Let's see how it goes..
Blocking: 882069
Looks like we just need to create URLRequestContextGetter on the UI thread. It can be used on the network thread afterwards.
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 10

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

commit a1f0a5bbe3467622fa75162c6e389b201a58cbd3
Author: Yuwei Huang <yuweih@chromium.org>
Date: Mon Sep 10 20:58:34 2018

[Remoting Android] Create URLRequestContextGetter on UI thread

This CL fixes a bug that crashes the latest M70 Android client when it
lauches.

URLRequestContextGetter's constructor creates a ProxyChangeListener,
which requires an Android looper on the current thread. The C++ network
thread doesn't create any looper, so it must be created on the UI thread
which has alooper. Note that this class is used (and required to be used)
on the network thread afterwards.

Bug:  882072 
Change-Id: I0cf610d3dccf087f040b49995d3022a1ba4de0e9
Reviewed-on: https://chromium-review.googlesource.com/1217363
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590057}
[modify] https://crrev.com/a1f0a5bbe3467622fa75162c6e389b201a58cbd3/remoting/client/chromoting_client_runtime.cc

Labels: Merge-Request-70
Request to merge comment#4 to M70 to fix a crash happens when launching the Chrome Remote Desktop for Android app. This has been tested with the ToT build of Chrome Remote Desktop for Android.

Note that this doesn't affect the Chrome browser or anything else.
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 12

Labels: -Merge-Request-70 Hotlist-Merge-Approved Merge-Approved-70
Your change meets the bar and is auto-approved for M70. Please go ahead and merge the CL to branch 3538 manually. Please contact milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

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

Comment 7 by bugdroid1@chromium.org, Sep 12

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6fa32c72707f84f0012280267c54eb45a27d9521

commit 6fa32c72707f84f0012280267c54eb45a27d9521
Author: Yuwei Huang <yuweih@chromium.org>
Date: Wed Sep 12 08:07:33 2018

[Remoting Android] Create URLRequestContextGetter on UI thread

This CL fixes a bug that crashes the latest M70 Android client when it
lauches.

URLRequestContextGetter's constructor creates a ProxyChangeListener,
which requires an Android looper on the current thread. The C++ network
thread doesn't create any looper, so it must be created on the UI thread
which has alooper. Note that this class is used (and required to be used)
on the network thread afterwards.

Bug:  882072 
Change-Id: I0cf610d3dccf087f040b49995d3022a1ba4de0e9
Reviewed-on: https://chromium-review.googlesource.com/1217363
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#590057}(cherry picked from commit a1f0a5bbe3467622fa75162c6e389b201a58cbd3)
Reviewed-on: https://chromium-review.googlesource.com/1220724
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#314}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/6fa32c72707f84f0012280267c54eb45a27d9521/remoting/client/chromoting_client_runtime.cc

Status: Fixed (was: Assigned)

Sign in to add a comment