-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayIndexOutOfBoundsException #5240
Comments
Can't see any issue with the code and it looks almost impossible that this should happen. That's what I concluded from the stack trace:
There must obviously be some flaw in my reasoning here, otherwise you wouldn't see the crash. :) As you already mentioned, it could be that something writes information in parallel. Are you using the main thread for all player access or a background thread? And on which thread do you create the player? Also, do you have any other information about the context of the crash? Which player interactions came before the crash for example? |
@tonihei, i also have this problem :( Stack trace:
ExoPlayer: 2.9.0 All methods of |
@tonihei - We also started noticing this on upgrade form 2.7.3 -> 2.9.0
|
@sneltyn This is unrelated and it looks like a known bug we had in 2.8. This should already be fixed. @juechemparathy This may also be unrelated. It seems that you are using your own |
@tonihei, thank! Perhaps you are right and the problem that is fixed above. If it appears then I will inform you. |
@tonihei, I caught the same problem as in this ticket. Stack trace:
ExoPlayer: 2.9.2 I can make a demo in which this problem manifests itself. |
That would be great! If you have a demo to reproduce the problem, we can probably find out what's wrong. |
Just found a potential problem: It looks like we are accessing the player from the wrong thread internally when creating the message to notify the listeners about updates in the playlist. Even though we should fix this, I'm not sure whether this can cause the stack traces posted above. |
@tonihei, ok, I'll post a demo soon. |
Marking as a bug for tracking the issue Toni mentions above. |
ExoPlayer methods must not be called from any thread besides the specified app thread. Therefore we shouldn't use them here. Using a regular Handler instead is fully equivalent. Issue:#5240 PiperOrigin-RevId: 227650489
ExoPlayer methods must not be called from any thread besides the specified app thread. Therefore we shouldn't use them here. Using a regular Handler instead is fully equivalent. Issue:#5240 PiperOrigin-RevId: 227650489
Closing as no further evidence of a problem was reported and we have no actionable info to do something. Please re-open if you can provide further information that would help us to identify if and where the problem actually is. |
Issue description
I see some crash reports:
(index always = -1)
Do you have any idea why it happen?
It maybe something wrong with my implementation, but I'm pretty sure that I access
ExoPlayer
instance and updateConcatenatingMediaSource
in single thread. The stack trace is quite complicated to me to investigate, so please take a look.Reproduction steps
Can't.
Link to test content
Not available.
Version of ExoPlayer being used
2.9.2
Device(s) and version(s) of Android being used
Variety devices.
Variety os versions.
The text was updated successfully, but these errors were encountered: