-
Notifications
You must be signed in to change notification settings - Fork 6
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
Crashing on Samsung Devices #46
Comments
Hi! Would you have an error report? Something from your logs? There is a project called musicpod that uses the package without any bug on an Android device. |
The app just gets frozen. There is nothing printed on the console. I repeat that it works on my pixel emulator but does not work with my real physical Samsung S23 Ultra. Version 0.0.5 works though. I tried other packages they seem to work fine as well the only issue is most of them are really slow and that's why I want to migrate to this package. |
Can you show your code? Maybe even a print that show the filenames. How many files are you reading? |
This is the snippet:- late final AudioMetadata audioMetadata;
String? thumbnailFilePath =
_localAlbumArtCacheRepository.getCachedAlbumArtPath(filePath: path);
//Cache album art if it doesn't exist
if (thumbnailFilePath == null) {
audioMetadata = readMetadata(File(path), getImage: true);
if (audioMetadata.pictures.isNotEmpty) {
thumbnailFilePath =
await _localAlbumArtCacheRepository.cacheAlbumArt(
filePath: path,
bytes: audioMetadata.pictures[0].bytes,
);
}
}
//No need to fetch album art as it already exists
else {
audioMetadata = readMetadata(File(path));
} I am reading exactly 312 files. It does not print anything. The console freezes completely, it doesn't even print the usual logs which it otherwise does. |
Let's say that your business code is working correctly and the problem is from the package. Can you print the path of the path that make your app freeze? It might be a bug in the package. When you have detected the file, please upload it here |
I think this attached file is causing the problem. After removing it seems to run but this did not happen with other packages |
Hi, I am also getting a hang when reading metadata from some mp3 files. It seems to happen when it encounters a zero length mp3 file or otherwise bad file. It seems to work on thousands of the other files I have.
I can upload the file if that would help. Update: Stepping thru the readMetadata code, it looks like it is an uncaught exception while opening the file. (track.openSync) AudioMetadata readMetadata(File track, {bool getImage = false}) { try { |
The package works completely fine on version 0.0.5, upgrading to the latest version crashes (1.1.0). Tried the other versions but only 0.0.5 works.
Weirdly, the latest version only crashes on my physical Samsung phone and works fine with my pixel android emulator.
The text was updated successfully, but these errors were encountered: