You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While developing an audio-centered application, I came across an issue with the minimp3/minimp3_fixed crate when using it to decode mp3 files. The error/output looks like this:
Decoding MP3 File.
Iterating through PCM data.
thread 'main' panicked at library/core/src/panicking.rs:220:5:
unsafe precondition(s) violated: slice::get_unchecked_mut requires that the index is within the slice
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting
The error occurs when trying to call the decoder.next_frame() method.
I previously used the crate creak, but that broke after updating cargo, so I decided that was a sign to revamp the mp3 loading to something more dedicated. This is important as it's evidence that there is nothing wrong with the file_path parameter, but rather with minimp3 directly.
I also tried switching to minimp3_fixed, which I am continuing to use, but had the exact same error.
What's truly strange is that I have looked over my code SO many times, and not once found any difference from the example code in the minimp3 and minimp3_fixed examples and docs on docs.rs, crates.io, and github.
What's also strange is that this is not a return from the error check? I thought an error with next_frame() would run the Err function I put there with "Error decoding MP3 frame".
I attached the MP3 file, but removed the extension as GitHub doesn't allow that.
The text was updated successfully, but these errors were encountered:
On my Linux machine I get this failure with ALL input mp3 files I have tested. I only get it in debug mode. In release mode I get no error. I am using rust 1.79.0.
While developing an audio-centered application, I came across an issue with the minimp3/minimp3_fixed crate when using it to decode mp3 files. The error/output looks like this:
Uploading space_walk.txt…
Here's my code:
I previously used the crate creak, but that broke after updating cargo, so I decided that was a sign to revamp the mp3 loading to something more dedicated. This is important as it's evidence that there is nothing wrong with the file_path parameter, but rather with minimp3 directly.
I also tried switching to minimp3_fixed, which I am continuing to use, but had the exact same error.
What's truly strange is that I have looked over my code SO many times, and not once found any difference from the example code in the minimp3 and minimp3_fixed examples and docs on docs.rs, crates.io, and github.
What's also strange is that this is not a return from the error check? I thought an error with next_frame() would run the Err function I put there with "Error decoding MP3 frame".
I attached the MP3 file, but removed the extension as GitHub doesn't allow that.
The text was updated successfully, but these errors were encountered: