Giter Site home page Giter Site logo

Comments (3)

tianyif avatar tianyif commented on July 20, 2024

Hi @chop-suey,

Thanks for reporting! Could you please provide us the steps to reproduce on the demo app?

from media.

chop-suey avatar chop-suey commented on July 20, 2024

Hi @tianyif
Thanks for getting back.
Unfortunetaly i cannot reproduce this issue, since it only happens on some devices i do not have at hand. What i forgot to mention, but might be quite important: It only happens when the device language is set to chinese.

There seems to be a problem when the notification for the foreground service is shown in that language. #903 implicates there might be some problem with the duration of the media. But i am not quite sure if that correlates to a language dependent problem.

What we do:

  • We play voice messages using media3 as a forground service, where media controls are shown in the notification
  • As soon as the player is started (while the language is set to chinese), it crashes with the above stacktrace

from media.

icbaker avatar icbaker commented on July 20, 2024

In case it helps debug further, that exception seems to originate here in the framework: https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java;l=1396;drc=c11765ac782525cb803ac13886bd61dcdf71e33b

And the message "long overflow" probably comes from an invocation of one of the Math.xxxExact methods: https://cs.android.com/android/platform/superproject/main/+/main:libcore/ojluni/src/main/java/java/lang/Math.java

Unfortunately we're obviously missing the stack trace to indicate where the ArithmeticException is being thrown from.

I wonder if we need to look at the other place we call setWhen?

.setWhen(System.currentTimeMillis() - player.getContentPosition())

It doesn't look obviously problematic though...

Aside: I'm not sure how this code interacts with live playback, when getContentPosition returns a negative value (https://developer.android.com/media/media3/exoplayer/live-streaming). I think that results in a 'future' timestamp on the notification, which looks like it's permitted: https://developer.android.com/reference/android/app/Notification#when

from media.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.