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 "out of range" error in APEv2Parser.parseTags() #2100

Open
2 tasks done
msikma opened this issue Jun 25, 2024 · 0 comments
Open
2 tasks done

Unexpected "out of range" error in APEv2Parser.parseTags() #2100

msikma opened this issue Jun 25, 2024 · 0 comments
Labels
bug Bug, will addressed with high priority

Comments

@msikma
Copy link

msikma commented Jun 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

music-metadata version

8.3.0

JavaScript module eco system

ECMAScript modules (ESM), music-medata ≥ version 8

Current Behavior

When parsing the given file "13-newip-Crimsonland-Across The Crimson Lands-DoD.mp3" from the DoD project (April 2016, track 13) (direct file link), the following error occurs:

ERR_OUT_OF_RANGE RangeError [ERR_OUT_OF_RANGE]: The value of "length" is out of range. It must be >= 0. Received -1431655663
    at Object.read (node:fs:673:3)
    at file:///Users/msikma/Files/Work/Code/musidx/node_modules/strtok3/lib/FsPromise.js:39:12
    at new Promise (<anonymous>)
    at Module.read (file:///Users/msikma/Files/Work/Code/musidx/node_modules/strtok3/lib/FsPromise.js:38:12)
    at FileTokenizer.peekBuffer (file:///Users/msikma/Files/Work/Code/musidx/node_modules/strtok3/lib/FileTokenizer.js:33:30)
    at APEv2Parser.parseTags (file:///Users/msikma/Files/Work/Code/musidx/node_modules/music-metadata/lib/apev2/APEv2Parser.js:101:34)
    at async ID3v1Parser.parse (file:///Users/msikma/Files/Work/Code/musidx/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js:96:13)
    at async MpegParser.parseID3v2 (file:///Users/msikma/Files/Work/Code/musidx/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js:44:13)
    at async MpegParser.parse (file:///Users/msikma/Files/Work/Code/musidx/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js:21:13)
    at async parse (file:///Users/msikma/Files/Work/Code/musidx/node_modules/music-metadata/lib/ParserFactory.js:35:5)

Expected Behavior

The file is parsed, and metadata such as the title and artist are returned.

As far as I can tell the file should work, and it opens fine in mp3tag.

This file is a free release from a community music project, so it can be freely downloaded for testing.

Attached audio sample?

  • I have provided sufficient information to reproduce the issue
@msikma msikma added the bug Bug, will addressed with high priority label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, will addressed with high priority
Projects
None yet
Development

No branches or pull requests

1 participant