Skip to content
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

Unexpected exception loading stream. MP3 track #2309

Closed
Merseyside opened this issue Jan 9, 2017 · 8 comments
Closed

Unexpected exception loading stream. MP3 track #2309

Merseyside opened this issue Jan 9, 2017 · 8 comments
Labels

Comments

@Merseyside
Copy link

Merseyside commented Jan 9, 2017

ExoPlayer 2.1.1 version.
Exception happens when mp3 track is going to play. Always with the same tracks.
99% of tracks play correct.
Why it happens and how i can fix this issue?

exoplayer E/LoadTask: Unexpected exception loading stream
                                                                          java.lang.StringIndexOutOfBoundsException: length=22; regionStart=23; regionLength=-1
                                                                              at java.lang.StringFactory.newStringFromBytes(StringFactory.java:69)
                                                                              at java.lang.StringFactory.newStringFromBytes(StringFactory.java:59)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeCommentFrame(Id3Decoder.java:413)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeFrame(Id3Decoder.java:284)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decode(Id3Decoder.java:87)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.peekId3Data(Mp3Extractor.java:287)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.synchronize(Mp3Extractor.java:209)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.sniff(Mp3Extractor.java:115)
                                                                              at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:688)
                                                                              at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:623)
                                                                              at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
                                                                              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                                              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                              at java.lang.Thread.run(Thread.java:818)
01-09 20:39:11.140 20655-27784/com.merseyside.admin.exoplayer E/LoadTask: Unexpected exception loading stream
                                                                          java.lang.StringIndexOutOfBoundsException: length=22; regionStart=23; regionLength=-1
                                                                              at java.lang.StringFactory.newStringFromBytes(StringFactory.java:69)
                                                                              at java.lang.StringFactory.newStringFromBytes(StringFactory.java:59)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeCommentFrame(Id3Decoder.java:413)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeFrame(Id3Decoder.java:284)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decode(Id3Decoder.java:87)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.peekId3Data(Mp3Extractor.java:287)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.synchronize(Mp3Extractor.java:209)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.sniff(Mp3Extractor.java:115)
                                                                              at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:688)
                                                                              at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:623)
                                                                              at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
                                                                              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                                              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                              at java.lang.Thread.run(Thread.java:818)
01-09 20:39:11.386 20655-20655/com.merseyside.admin.exoplayer D/Player: onPlayerStateChanged
01-09 20:39:11.387 20655-20655/com.merseyside.admin.exoplayer I/Service: Received Start Foreground Intent 
01-09 20:39:12.161 20655-27784/com.merseyside.admin.exoplayer E/LoadTask: Unexpected exception loading stream
                                                                          java.lang.StringIndexOutOfBoundsException: length=22; regionStart=23; regionLength=-1
                                                                              at java.lang.StringFactory.newStringFromBytes(StringFactory.java:69)
                                                                              at java.lang.StringFactory.newStringFromBytes(StringFactory.java:59)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeCommentFrame(Id3Decoder.java:413)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeFrame(Id3Decoder.java:284)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decode(Id3Decoder.java:87)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.peekId3Data(Mp3Extractor.java:287)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.synchronize(Mp3Extractor.java:209)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.sniff(Mp3Extractor.java:115)
                                                                              at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:688)
                                                                              at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:623)
                                                                              at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
                                                                              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                                              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                              at java.lang.Thread.run(Thread.java:818)
01-09 20:39:14.180 20655-27784/com.merseyside.admin.exoplayer E/LoadTask: Unexpected exception loading stream
                                                                          java.lang.StringIndexOutOfBoundsException: length=22; regionStart=23; regionLength=-1
                                                                              at java.lang.StringFactory.newStringFromBytes(StringFactory.java:69)
                                                                              at java.lang.StringFactory.newStringFromBytes(StringFactory.java:59)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeCommentFrame(Id3Decoder.java:413)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeFrame(Id3Decoder.java:284)
                                                                              at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decode(Id3Decoder.java:87)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.peekId3Data(Mp3Extractor.java:287)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.synchronize(Mp3Extractor.java:209)
                                                                              at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.sniff(Mp3Extractor.java:115)
                                                                              at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:688)
                                                                              at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:623)
                                                                              at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
                                                                              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                                              at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                              at java.lang.Thread.run(Thread.java:818)
01-09 20:39:14.182 20655-27783/com.merseyside.admin.exoplayer E/ExoPlayerImplInternal: Source error.
                                                                                       com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected StringIndexOutOfBoundsException: length=22; regionStart=23; regionLength=-1
                                                                                           at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:317)
                                                                                           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
                                                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                           at java.lang.Thread.run(Thread.java:818)
                                                                                        Caused by: java.lang.StringIndexOutOfBoundsException: length=22; regionStart=23; regionLength=-1
                                                                                           at java.lang.StringFactory.newStringFromBytes(StringFactory.java:69)
                                                                                           at java.lang.StringFactory.newStringFromBytes(StringFactory.java:59)
                                                                                           at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeCommentFrame(Id3Decoder.java:413)
                                                                                           at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decodeFrame(Id3Decoder.java:284)
                                                                                           at com.google.android.exoplayer2.metadata.id3.Id3Decoder.decode(Id3Decoder.java:87)
                                                                                           at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.peekId3Data(Mp3Extractor.java:287)
                                                                                           at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.synchronize(Mp3Extractor.java:209)
                                                                                           at com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.sniff(Mp3Extractor.java:115)
                                                                                           at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:688)
                                                                                           at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:623)
                                                                                           at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
@ojw28
Copy link
Contributor

ojw28 commented Jan 9, 2017

We most likely don't handle ID3 comment frames that contain no text properly. If you could send us the problematic file we'll take a look and push a fix. You can email the file to dev.exoplayer@gmail.com.

@Merseyside
Copy link
Author

send files to you

@ojw28
Copy link
Contributor

ojw28 commented Jan 9, 2017

  • The SCNDL sample fails because we don't handle ID3 comment frames that contain no text properly.
  • The other file appears to have a reasonably large chunk of data that doesn't look like MP3 start about 1MB into the file. Any idea what that is or where it came from? Have you tried running this file through an MP3 validator tool?

@Merseyside
Copy link
Author

Merseyside commented Jan 9, 2017

What i must do to set text in this file?
No, i didn't, I'm going to try now

Icheck another file and found problems with data. Fixed it, now its ok. Thanks for your advice

@ojw28
Copy link
Contributor

ojw28 commented Jan 9, 2017

We'll push a fix to correctly handle the SCNDL file to the dev-v2 branch shortly. You could probably adjust the media to play without the fix by removing or editing the ID3 metadata.

@Merseyside
Copy link
Author

i checked this with id3 editor,
I think it has metadata. I see this:
Version: ID3v1
Name: The Munsta
Artist: SCNDL
So metadata is correct, why it doesn't work?

@ojw28 ojw28 added bug and removed need more info labels Jan 9, 2017
@ojw28
Copy link
Contributor

ojw28 commented Jan 10, 2017

As per my comments above, there's an empty comment frame in the ID3 metadata. An ID3 editor isn't necessarily the best way to see exactly what data has been written into the file.

I tried using tagmp3.net to make the "Comment" field non-empty and was then able to play successfully. We'll push a fix to correctly handle empty comment frames in a sec, in any case.

ojw28 added a commit that referenced this issue Jan 10, 2017
Issue: #2309

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144061654
@ojw28 ojw28 closed this as completed Jan 10, 2017
@Merseyside
Copy link
Author

tnanks)

@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants