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

Crash when reading mp3 file #828

Closed
dzek69 opened this issue May 30, 2021 · 2 comments · Fixed by #832
Closed

Crash when reading mp3 file #828

dzek69 opened this issue May 30, 2021 · 2 comments · Fixed by #832
Labels
bug Bug, will addressed with high priority caused by corrupt audio track

Comments

@dzek69
Copy link

dzek69 commented May 30, 2021

Bug description
JS Error is thrown while reading file that seems valid to me and all apps I'm using it with (including Windows Explorer)

/Projects/ytmsync/node_modules/music-metadata/lib/mpeg/XingTag.js:58
        const majorMinorVersion = xingInfoTag.lame.version.match(/\d+.\d+/g)[0]; // e.g. 3.97
                                                                            ^
TypeError: Cannot read property '0' of null
    at Object.readXingHeader (/Projects/ytmsync/node_modules/music-metadata/lib/mpeg/XingTag.js:58:77)
    at MpegParser.readXingInfoHeader (/Projects/ytmsync/node_modules/music-metadata/lib/mpeg/MpegParser.js:489:25)
    at MpegParser.readXtraInfoHeader (/Projects/ytmsync/node_modules/music-metadata/lib/mpeg/MpegParser.js:452:33)
    at MpegParser.skipSideInformation (/Projects/ytmsync/node_modules/music-metadata/lib/mpeg/MpegParser.js:441:9)
    at MpegParser.parseAudioFrameHeader (/Projects/ytmsync/node_modules/music-metadata/lib/mpeg/MpegParser.js:368:13)
    at MpegParser._parse (/Projects/ytmsync/node_modules/music-metadata/lib/mpeg/MpegParser.js:233:24)
    at MpegParser.parseID3v2 (/Projects/ytmsync/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js:41:9)
    at MpegParser.parse (/Projects/ytmsync/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js:24:13)
    at Function._parse (/Projects/ytmsync/node_modules/music-metadata/lib/ParserFactory.js:161:9)
    at parseFile (/Projects/ytmsync/node_modules/music-metadata/lib/index.js:46:16)

Expected behavior
No crash

Audio file demonstrating the problem
Dinosaurs Will Die (live).zip

@Borewit Borewit pinned this issue Jun 5, 2021
@Borewit Borewit added bug Bug, will addressed with high priority caused by corrupt audio track labels Jun 5, 2021
@Borewit
Copy link
Owner

Borewit commented Jun 5, 2021

Exception thrown due to invalid Xing version tag. Xing version set to ZyK! .
I also marked it as bug, because I think music-metadata should be able to handle that.

@Borewit
Copy link
Owner

Borewit commented Jun 5, 2021

Should be fixed in v7.8.6.

Thanks for reporting the issue @dzek69!

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 caused by corrupt audio track
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants