question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EvaluateMediaItemTransition throwing unhandled exception during player initialization

See original GitHub issue

We are receiving crash reports in around .5% of users, but the behaviour seems to be unpredictable and we have only been able to reproduce the issue once during player initialization.

Here is the crash report:

Fatal Exception: java.lang.IllegalStateException
       at com.google.android.exoplayer2.ExoPlayerImpl.evaluateMediaItemTransitionReason(ExoPlayerImpl.java:1004)
       at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:940)
       at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:918)
       at com.google.android.exoplayer2.ExoPlayerImpl.lambda$new$0(ExoPlayerImpl.java:162)
       at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$c3953g1V6xPbTIQ95lEUPxO10qU.run(-.java:4)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7156)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)`

It seems like the playbackInfoUpdateListener is initialized without any input from the client app, and the postionDiscontinuityReason does not seem like the client app has any control over. In which scenario is this possible?

Exoplayer version: 2.12.2 Android version: 4-11 Android device: So far Samsung 66%, Lenovo 17% and Huawei 17%, but we suspect it relates to any device, app with new version of exoplayer has only been live a few days.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mik0gitcommented, Apr 8, 2021

Thanks to @anthonylawson and @marcbaechinger recommandations we managed to arrange a cleaner Thread management in our code, we also downgraded our version of Bitmovin library. So everything looks good from 7-days KPI post roll-out.

1reaction
mik0gitcommented, Mar 21, 2021

We were seeing this very crash in our apps and we did find a few locations where the ExoPlayer was being accessed on the wrong thread. Fixing those issues resolved this crash from occurring.

Thanks for your feedback @anthonylawson , very helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EvaluateMediaItemTransition throwing unhandled exception ...
EvaluateMediaItemTransition throwing unhandled exception during player initialization.
Read more >
Realize: Fatal error has occurred during player initialization
When a teacher or student attempts to load a Realize assignment, a message is displayed that says, "A fatal error has occurred during...
Read more >
How to Fix the 'Unhandled Exception Has Occurred' Error In ...
How to Fix the ' Unhandled Exception Has Occurred in Your Application' Error In Windows 10/8/7 [Tutorial] Unhandled exception has occurred in ......
Read more >
"TypeInitializationException was unhandled" exception c# ...
TypeInitializationException means that TagNameHandler threw an exception while initializing the type. By that, it means while assigning ...
Read more >
Unhandled exception when ArcGIS Server or ArcIMS service ...
If an ArcGIS Server or ArcIMS service associated with a GIS resource is unavailable during initialization (e.g. initial page load), an error occurs....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found