Open Lyonlancer5 opened 7 years ago
I doubt that most of these reports had been caused by corrupted files. There have been a lot of actual bugs with audio decoding in the past (e.g. in different Linux setups), and that's also the reason I want to keep showing the crash report window.
If there's an easy way to tell if loading failed due to a corrupted file vs. unsupported formats, though, it'd be nice to only show an in-game alert for the former.
Although in the issues mentioned here, the systems have been running Windows. I still have to try the Linux side of things, having recently installed Ubuntu 16.04 LTS dual booting on my main PC.
If anyone running into this issue on Linux-based systems could post what their installed packages and sound configuration are, then this would've made discovering whether its an issue with audio decoding or simply a corrupted file.
Overview
If opsu! is loading hit sounds and sound effects in custom skins (or even the defaults if the downloaded JAR is corrupted) and it encounters something that it cannot read, it will throw an
UnsupportedAudioFileException
, but would still continue to load if the user presses the close button on the error message.The exception to what happens is when sound files are 0 bytes (intended for use with "silent" hitsounds), those load normally (with a null
AudioInputStream
passed)This may be the cause of issues #320, #311 and #259 when loading hitsounds/SFX from incompletely downloaded skins/custom skins with partially downloaded sounds.
This is supported by a test via modifying a WAV file's first four bytes (artificial "corruption") in the default skin's
applause.wav
found in theres/
folder with the use of a hex editor and a USB corruption during a copy between PCs.Test
Normal
applause.wav
- First four hex-values are52 49 46 46
, normal WAV header"Corrupted"
applause.wav
- First four hex-values are00 00 00 00
, null headerA possible solution to this would be:
AudioInputStream
to that specific hitsound/sound effect'sMultiClip
instance) and warn the user on the notification bar instead of the crash report message box.