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

uncaught range error leads to crash with some mp3s #4

Closed
conceptualspace opened this issue Jul 3, 2016 · 4 comments
Closed

uncaught range error leads to crash with some mp3s #4

conceptualspace opened this issue Jul 3, 2016 · 4 comments
Assignees
Labels

Comments

@conceptualspace
Copy link

mp3-parser\lib\lib.js:223 Uncaught RangeError: Invalid typed array length

return String.fromCharCode.apply(null, new Uint16Array(buffer, offset, length / 2));
^
RangeError: Invalid typed array length
at new Uint16Array (native)
at Object.lib.readStr.ucs (node_modules\mp3-parser\lib\lib.js:223:52)
at readFrameContentIpls (node_modules\mp3-parser\lib\id3v2.js:331:53)
at Object.mp3Id3v2Parser.readId3v2TagFrame (node_modules\mp3-parser\lib\id3v2.js:559:28)
at Object.mp3Id3v2Parser.readId3v2Tag (node_modules\mp3-parser\lib\id3v2.js:638:36)
at Object.mp3Parser.readId3v2Tag (node_modules\mp3-parser\main.js:113:28)

@conceptualspace
Copy link
Author

also seeing

"Uncaught RangeError: Offset is outside the bounds of the DataView",
node_modules\mp3-parser\lib\lib.js:135
if (seq[i] !== view.getUint8(offset + i)) { return false; }
^

RangeError: Offset is outside the bounds of the DataView
at DataView.getUint8 (native)
at FileReader.reader.onload

@conceptualspace
Copy link
Author

it's occurring infrequently in a large batch job, where i'm just skipping the track if it throws the error. but if its helpful i can attach the problematic file

@biril
Copy link
Owner

biril commented Jul 3, 2016

Yes please do and I'll take a look. Thank you 👍

@biril
Copy link
Owner

biril commented Nov 20, 2016

@conceptualspace Version 0.3.0 of the library fixes a defect in IPLS frame parsing, which is quite possible the source of the errors you were seeing. You can give it a go if this is still useful to you 😄 .

I'm going to go ahead and close this as I believe it's resolved. Thanks for the original report.

@biril biril closed this as completed Nov 20, 2016
@biril biril added the bug label Nov 20, 2016
@biril biril self-assigned this Nov 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants