davy7125 / polyphone

A soundfont editor for quickly designing musical instruments.
https://www.polyphone.io
GNU General Public License v3.0
344 stars 45 forks source link

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

Closed spessasus closed 1 month ago

spessasus commented 2 months ago

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:

  5. Download the attached soundfont
  6. Open it in Polyphone
  7. Try to play a key
  8. 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]> 
davy7125 commented 1 month ago

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