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

FormatException (FormatException: WAV is corrupted, or not a WAV file.) #16

Open
Effeo opened this issue Jun 25, 2024 · 4 comments
Open

Comments

@Effeo
Copy link

Effeo commented Jun 25, 2024

I have a file audio that is loaded on all the devices except for some (eg. samsung s23) the error is FormatException (FormatException: WAV is corrupted, or not a WAV file.). I added the wav file as attachment
IT_DECL_02S01.zip

@liamappelbe
Copy link
Owner

liamappelbe commented Jun 26, 2024

Can you tell me which devices it works on and which it doesn't? List as many devices as possible. It could be something to do with CPU architecture (samsung s23 appears to be arm64), but I can't tell without more information.

Also, is it just this wav file that has the bug? Have you tried other wavs?

@liamappelbe
Copy link
Owner

liamappelbe commented Jun 26, 2024

That wav loads fine on my x64 linux laptop, so it's not a word size issue. It's probably not a byte order issue either, because my laptop is little-endian, and so is the samsung s23.

@Effeo
Copy link
Author

Effeo commented Jun 26, 2024

Can you tell me which devices it works on and which it doesn't? List as many devices as possible. It could be something to do with CPU architecture (samsung s23 appears to be arm64), but I can't tell without more information.

It works on the vast majority of devices, I tested on some onePlus, some Oppos and some Xiaomi, and on them it works. Only S23 is having those troubles.

Also, is it just this wav file that has the bug? Have you tried other wavs?

Yes other files are loading correctly on the S23, this is the only file that's not loading on Samsung S23.

@liamappelbe
Copy link
Owner

That is super weird. Since it's so device specific there's not much I can do about it on my end as I don't have an S23. This package is pretty simple though, so if you want to try debugging it yourself you can probably figure out the issue. The parsing code is all contained in this function, and is only about 30 lines.

Can you post the stack trace? That will at least tell us which line of the parsing function is failing. Then we can try and figure out exactly what bytes of the wav file are failing to parse, and maybe figure out why it's device specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants