-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Memory leak by parsing special mp3 file #34
Comments
Will give an update on this annoying problem. This typically happens on corrupted MP3 files without any ID3v2 header / Xing header. It will then scan the MPEG frame., and jump from one frame to the next frame. Re-syncing is done by searching byte by byte. The asynchronous nature of JavaScript, in combination with promise wrapped recursion loop, will result on a zero-wised (corrupt MP3 file ;-) file of 3 MB, in a recursion depth of ~3 million. I don't see a a nice solution, I am pretty sure it not caused by some kind of mistake. Two solutions I can think of are:
Related/cause: strtok3 issue #5 |
i analysed this issues in the last few days and found an handfull mp3 in my collection with this error. But there are files they are not corrupt for other programms like vlc. windows explorer can read the id-tags also. if you want i can send you some oof this files too. Now it is for me not important which solution you pick, important for me is that one of the solution stop this memory overrun. thanks for your support! |
o.k it seems that is not so easy to fix. my workaround is to make an optional parameter like execution time. if in mp3 is in this time read everythink is o.k if an mp3 need more time, it will be skippt or genrate an error like, excution time exceeded. so we have no problem to read many mp3 files in a loop |
Good to hear you found a workaround. You could also use There is indeed not an easy fix. I don't want to go in that direction for a permanent solution. I solved the issue, solution only has some side effects, once that is fixed I will make it available. |
search to reduce the recursion depth. Issue #34
For me the first try is very great ! Fast and sure! If i found some errors i will reopen this issues or make a new one! Thanks, great work! |
On parsing special single file, the node enviremont used more then 1,4 gb of ram and exit with:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
@Borewit I sended you one file by mail for test, if u or another want more example please contact me.
The text was updated successfully, but these errors were encountered: