davy7125/polyphone

[BUG] Sound engine crash with invalid generators (Segmentation Fault)

spessasus opened this issue · 1 comments

The issue:

Polyphone crashes when out of limits generators are attempted to be played. (Pan generator here.)
The Pan generators are set to -100 and 100 respectively.

Expected behavior

It should not crash, even if it's invalid. One of the four solutions:

  1. Discard the generators like fluidsynth code
  2. Clamp the generator values at note on time like SpessaSynth code
  3. Automatically clamp the generators (at load time)
  4. Remove the generators (set to the default value)

Steps to reproduce:

  1. Download the attached soundfont
  2. Open it in Polyphone
  3. Try to play a key
  4. Polyphone Crashes

OS

Happens both on Windows (10) and Linux (Arch) with the latest version installed.

Soundfont

PolyphoneCrash.zip

Logs (Linux):

spessasus@spessasus-gaming ~> polyphone
fish: Job 1, 'polyphone' terminated by signal SIGSEGV (Address boundary error)
spessasus@spessasus-gaming ~ [SIGSEGV]> 

This might have already been solved since I cannot reproduce the bug with the latest sources.
I'm closing the ticket