Skip to content

Crash when sending a video to background #513

Description

@cemrich

There are quite a few crash reports with following stack trace:

java.lang.RuntimeException: Unable to start service de.christinecoenen.code.zapp.app.player.BackgroundPlayerService@684175a with Intent { act=de.christinecoenen.code.zapp.app.mediathek.controller.action.START_IN_BACKGROUND cmp=de.christinecoenen.code.zapp/.app.player.BackgroundPlayerService }: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.resolveTypeIfNeeded(android.content.ContentResolver)' on a null object reference
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4880)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2330)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:207)
at android.os.Looper.loop(Looper.java:296)
at android.app.ActivityThread.main(ActivityThread.java:8227)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Intent.resolveTypeIfNeeded(android.content.ContentResolver)' on a null object reference
at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:543)
at android.app.PendingIntent.getActivity(PendingIntent.java:530)
at android.app.PendingIntent.getActivity(PendingIntent.java:494)
at de.christinecoenen.code.zapp.app.player.BackgroundPlayerService.getNotificationCLickedPendingIntent(Unknown Source:35)
                                                                   handleStartInBackground
                                                                   handleIntent
                                                                   onStartCommand
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4862)
... 9 more

BackgroundPlayerService::handleStartInBackground gets only called when a user is sending video playback to the background. The trace above indicates that foregroundActivityIntent is null when getNotificationCLickedPendingIntent. However, I cannot reproduce this issue on my devices.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions