Assigned
Status Update
Comments
uc...@google.com <uc...@google.com>
al...@gmail.com <al...@gmail.com> #2
This is really critical. Every time I disconnect via "cast" my app crashes (or if I start casting with another app) my app crashes in the background because this is used by the cast API.
java.lang.NullPointerException: Attempt to write to field 'java.lang.ref.WeakReference android.support.v4.media.session.MediaSessionCompat$Callback.mSessionImpl' on a null object reference
at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.setCallback(MediaSessionCompat.java:2305)
at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:267)
at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:255)
at com.google.android.gms.internal.zzxe.zzcb(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.zzbV(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.zza(Unknown Source)
at com.google.android.gms.cast.framework.CastSession$zzb.zzbV(Unknown Source)
java.lang.NullPointerException: Attempt to write to field 'java.lang.ref.WeakReference android.support.v4.media.session.MediaSessionCompat$Callback.mSessionImpl' on a null object reference
at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.setCallback(MediaSessionCompat.java:2305)
at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:267)
at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:255)
at com.google.android.gms.internal.zzxe.zzcb(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.zzbV(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.zza(Unknown Source)
at com.google.android.gms.cast.framework.CastSession$zzb.zzbV(Unknown Source)
ti...@google.com <ti...@google.com> #3
Hi,
Request you to provide below information
Please attach your sample android project which reproduces the issue, zip it and share(just to avoid the confusion between your sample code and the one we create to replicate the issue,sample code is requested here).
Explain expected and observed behavior? Attach screen shots for more clarity.
Explain the steps to reproduce the issue with your apk. Provide all necessary information to reproduce the issue.
Note: Please upload the attachments to google drive and share the folder to android-bugreport@google.com, then share the link here.
Request you to provide below information
Please attach your sample android project which reproduces the issue, zip it and share(just to avoid the confusion between your sample code and the one we create to replicate the issue,sample code is requested here).
Explain expected and observed behavior? Attach screen shots for more clarity.
Explain the steps to reproduce the issue with your apk. Provide all necessary information to reproduce the issue.
Note: Please upload the attachments to google drive and share the folder to android-bugreport@google.com, then share the link here.
sp...@google.com <sp...@google.com> #4
here you go
https://drive.google.com/drive/folders/0B4FfLhYv65yoVmJKd2c1QkdxMGs?usp=sharing
Expected behavior: don't crash.
Observed: NullPointerException
To reproduce, just run the application on Android API 23+
Expected behavior: don't crash.
Observed: NullPointerException
To reproduce, just run the application on Android API 23+
al...@gmail.com <al...@gmail.com> #5
You can also reproduce the "Cast" issue using the UAMP sample which is found here:
https://github.com/googlesamples/android-UniversalMusicPlayer
Just update mobile/build.gradle to use 25.1.0 and the compile/target to 25. You just then need to start casting and then disconnect from cast. You don't even have to play content.
Just update mobile/build.gradle to use 25.1.0 and the compile/target to 25. You just then need to start casting and then disconnect from cast. You don't even have to play content.
tn...@google.com <tn...@google.com> #6
I am seeing the same on disconnect on Lollipop. This issue was introduced in v25.1.0--it is not an issue in v25.0.1.
12-14 11:39:27.742: E/UncaughtExceptionHandler(2212): Uncaught exception: java.lang.NullPointerException: Attempt to write to field 'java.lang.ref.WeakReference android.support.v4.media.session.MediaSessionCompat$Callback.mSessionImpl' on a null object reference
12-14 11:39:27.774: E/AndroidRuntime(2212): FATAL EXCEPTION: main
12-14 11:39:27.774: E/AndroidRuntime(2212): java.lang.NullPointerException: Attempt to write to field 'java.lang.ref.WeakReference android.support.v4.media.session.MediaSessionCompat$Callback.mSessionImpl' on a null object reference
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.setCallback(MediaSessionCompat.java:2305)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:267)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:255)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.internal.zzxe.zzcb(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.CastSession.zzbV(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.CastSession.zza(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.CastSession$zzb.zzbV(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.zzf$zza.onTransact(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Binder.transact(Binder.java:499)
12-14 11:39:27.774: E/AndroidRuntime(2212): at zt.a(:com.google.android.gms.DynamiteModulesC:199)
12-14 11:39:27.774: E/AndroidRuntime(2212): at zj.a(:com.google.android.gms.DynamiteModulesC:128)
12-14 11:39:27.774: E/AndroidRuntime(2212): at zy.onTransact(:com.google.android.gms.DynamiteModulesC:122)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Binder.transact(Binder.java:499)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.zzh$zza$zza.zzb(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.CastSession.end(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.Session$zza.end(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.zzq$zza.onTransact(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Binder.transact(Binder.java:499)
12-14 11:39:27.774: E/AndroidRuntime(2212): at aba.a(:com.google.android.gms.DynamiteModulesC:216)
12-14 11:39:27.774: E/AndroidRuntime(2212): at abi.a(:com.google.android.gms.DynamiteModulesC:305)
12-14 11:39:27.774: E/AndroidRuntime(2212): at ace.a(:com.google.android.gms.DynamiteModulesC:61)
12-14 11:39:27.774: E/AndroidRuntime(2212): at acb.onTransact(:com.google.android.gms.DynamiteModulesC:144)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Binder.transact(Binder.java:499)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.internal.zzwv$zza$zza.zza(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.internal.zzwy.onRouteUnselected(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.invokeCallback(MediaRouter.java:2999)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.handleMessage(MediaRouter.java:2946)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Handler.dispatchMessage(Handler.java:102)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Looper.loop(Looper.java:154)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.app.ActivityThread.main(ActivityThread.java:6119)
12-14 11:39:27.774: E/AndroidRuntime(2212): at java.lang.reflect.Method.invoke(Native Method)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
12-14 11:39:27.742: E/UncaughtExceptionHandler(2212): Uncaught exception: java.lang.NullPointerException: Attempt to write to field 'java.lang.ref.WeakReference android.support.v4.media.session.MediaSessionCompat$Callback.mSessionImpl' on a null object reference
12-14 11:39:27.774: E/AndroidRuntime(2212): FATAL EXCEPTION: main
12-14 11:39:27.774: E/AndroidRuntime(2212): java.lang.NullPointerException: Attempt to write to field 'java.lang.ref.WeakReference android.support.v4.media.session.MediaSessionCompat$Callback.mSessionImpl' on a null object reference
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.setCallback(MediaSessionCompat.java:2305)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:267)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:255)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.internal.zzxe.zzcb(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.CastSession.zzbV(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.CastSession.zza(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.CastSession$zzb.zzbV(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.zzf$zza.onTransact(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Binder.transact(Binder.java:499)
12-14 11:39:27.774: E/AndroidRuntime(2212): at zt.a(:com.google.android.gms.DynamiteModulesC:199)
12-14 11:39:27.774: E/AndroidRuntime(2212): at zj.a(:com.google.android.gms.DynamiteModulesC:128)
12-14 11:39:27.774: E/AndroidRuntime(2212): at zy.onTransact(:com.google.android.gms.DynamiteModulesC:122)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Binder.transact(Binder.java:499)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.zzh$zza$zza.zzb(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.CastSession.end(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.Session$zza.end(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.cast.framework.zzq$zza.onTransact(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Binder.transact(Binder.java:499)
12-14 11:39:27.774: E/AndroidRuntime(2212): at aba.a(:com.google.android.gms.DynamiteModulesC:216)
12-14 11:39:27.774: E/AndroidRuntime(2212): at abi.a(:com.google.android.gms.DynamiteModulesC:305)
12-14 11:39:27.774: E/AndroidRuntime(2212): at ace.a(:com.google.android.gms.DynamiteModulesC:61)
12-14 11:39:27.774: E/AndroidRuntime(2212): at acb.onTransact(:com.google.android.gms.DynamiteModulesC:144)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Binder.transact(Binder.java:499)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.internal.zzwv$zza$zza.zza(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.google.android.gms.internal.zzwy.onRouteUnselected(Unknown Source)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.invokeCallback(MediaRouter.java:2999)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.handleMessage(MediaRouter.java:2946)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Handler.dispatchMessage(Handler.java:102)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.os.Looper.loop(Looper.java:154)
12-14 11:39:27.774: E/AndroidRuntime(2212): at android.app.ActivityThread.main(ActivityThread.java:6119)
12-14 11:39:27.774: E/AndroidRuntime(2212): at java.lang.reflect.Method.invoke(Native Method)
12-14 11:39:27.774: E/AndroidRuntime(2212): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
al...@gmail.com <al...@gmail.com> #7
The defect can be found at `android.support.v4.media.session.MediaSessionCompat.MediaSessionImplApi21#setCallback(Callback, Handler)` in the v25.1.0 of the support libraries.
The `android.support.v4.media.session.MediaSessionCompat#setCallback(Callback, Handler)` method indicates that a null value for the Callback parameter is valid, yet the `MediaSessionImplApi21` implementation attempts to write to a member variable to it.
The `android.support.v4.media.session.MediaSessionCompat#setCallback(Callback, Handler)` method indicates that a null value for the Callback parameter is valid, yet the `MediaSessionImplApi21` implementation attempts to write to a member variable to it.
Description
Build #AI-181.4668.68.32.4763614, built on May 4, 2018
JRE: 1.8.0_152-release-1136-b02 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.4
When I create a path interpolator inside of the `res/interpolator` directory, Android Studio incorrectly shows an error (see the attached screenshot below).
Android Studio should *not* show this error, as it is valid to declare interpolators here (as can be seen in the sample project attached to this report).
You can also tell that this error is incorrect by looking at the framework source code, which declares all of its interpolators inside of the res/interpolator directory: