Skip to content

Fix crash when opening settings after a custom sound file goes missing - #26

Open
GustavoFringo140 wants to merge 3 commits into
ScattrdBlade:mainfrom
GustavoFringo140:fix-crash-on-missing-audio
Open

Fix crash when opening settings after a custom sound file goes missing#26
GustavoFringo140 wants to merge 3 commits into
ScattrdBlade:mainfrom
GustavoFringo140:fix-crash-on-missing-audio

Conversation

@GustavoFringo140

@GustavoFringo140 GustavoFringo140 commented Aug 8, 2026

Copy link
Copy Markdown

Fixes #25

Crashing Equicord when trying to access plugin's settings. It was normal until I wanted to add a new sound, I've put a custom .wav sound on Call Ringing and accidentally deleted the source file from my Downloads folder. After that, opening CustomSounds settings crashed my Equicord every time.

I fixed it myself for now by exporting my DataStore backup (Equicord Settings - Backup & Restore), cleaning the ScattrdCustomSounds entry manually, and importing it back. That got me unblocked, but the actual bug is still in the code nothing in audio.ts or index.tsx handles a broken/missing audio entry, so any override left pointing at a file that no longer exists in the store takes the whole settings panel down instead of just falling back to default.

This PR adds that missing error handling

  • getAllAudio() in audio.ts now wraps the DataStore.get() call in try/catch so a failed read doesn't throw uncaught.
  • SettingsUI in index.tsx now checks, on every load, whether each override's selectedFileId actually exists in the audio store. If it doesn't, it resets that override back to default instead of leaving a dangling reference around.

With this in, the same situation (upload didn't fully save, file got deleted, storage got corrupted, whatever) just silently resets to default instead of crashing the client.

Will be sent to Equicord's plugin implementation too

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

Successfully merging this pull request may close these issues.

Crashing Equicord when trying to access plugin's settings.

1 participant