olive-editor / olive

Free open-source non-linear video editor
https://olivevideoeditor.org/
GNU General Public License v3.0
8.13k stars 548 forks source link

Arch Linux - VST Segfault #432

Closed capezotte closed 5 years ago

capezotte commented 5 years ago

I don't know if this is related to Arch Linux's extremely recent library versions, but any time I load a VST one of two things happen.

itsmattkc commented 5 years ago

Is there any debug output when you run from terminal?

capezotte commented 5 years ago

Looking at the terminal output, I found out Protoverb was crashing because some settings files were missing. After removing and reinstalling it, it worked. It still crashes when loading from a recovery file, though (from a properly saved project it works fine):

/home/carlos/Área de trabalho/Protoverb.log no deskTopFile found preset=initialize Trying setUniqueID(1969770582)... setUniqueID (1969770582) Saving registration code to /home/carlos/.u-he/Protoverb/Support/com.u-he.Protoverb.user.txt failed to open /home/carlos/.u-he/Protoverb/Support/com.u-he.Protoverb.user.txt to read registration key [INFO] Plugin requested unhandled opcode 33 ((null):0, (null)) API 'VST2' Starting REVISION 4105 DelayNetWorks random 854.37 after 4664 rounds Using vector extension SSE3 new instance of AM_PreferencesAudio created for Protoverb # 1 Structure 0 - 5 HW8 Wide loadPreferences() - Protoverb void AM_AudioMan::createMidiPrograms()

Before, From State Meta:

return stateInfo State Meta:

Preset from 'Protoverb' Params: press button AM_DelayNetWorks::setParameterComplex Structure 0 - 0 HHD Wide Seed 0 OMG... need to reseed DoublettesInRange 0.00 collisionLaw ran 15 tests No Bridges stateInfoLevel level back to 0 AM_AudioMan::reset() getMidiAssignPath(): /support/com.u-he.Protoverb.midiassign.txt READING midiAssignFile

// Global MidiCC Map numFounds = 3 Error: was not able to parse line: Global MidiCC Map

numFounds = 0 Error: was not able to parse line:

numFounds = 0 Error: was not able to parse line: DEFAULT FILE 1 7E30204 Warning! AudioPreferenceExtractor::setPreference didn't find matching preference for "NKS Colour Fit" Warning! AudioPreferenceExtractor::setPreference didn't find matching preference for "NKS Auto Map" AM_AudioMan::changePlugInLatency( 0 ) -> 16

Before, From State Meta:

return stateInfo State Meta:

Preset from 'Protoverb' Params: press button AM_DelayNetWorks::setParameterComplex Structure 0 - 0 HHD Wide Seed 0 OMG... need to reseed DoublettesInRange 0.00 collisionLaw ran 19257 tests No Bridges stateInfoLevel level back to 0 AM_AudioMan::reset() LATENCY Protoverb:16 AM_VST_base::suspend () done AM_VST_base::suspend () ALERT: can't find param VCC KeyP AM_VST_base::getSizedWidth GUIScale 1.00 -> 1200 KCrash: crashing... crashRecursionCounter = 2

ZynEcho and DragonFly Reverb crash on load: Both output the same not apparently helpful terminal output when applied to a test WAV file:

[WARNING] libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null)) [WARNING] Icon theme "deepin" not found. ((null):0, (null)) [INFO] Initializing effects... ((null):0, (null)) [INFO] Finished initializing effects ((null):0, (null)) [WARNING] libpng warning: iCCP: known incorrect sRGB profile ((null):0, (null)) [WARNING] We got some errors while running testparm "Load smb config files from /etc/samba/smb.conf\nError loading services.\n" ((null):0, (null)) [WARNING] We got some errors while running 'net usershare info' ((null):0, (null)) [WARNING] "Can't load /etc/samba/smb.conf - run testparm to debug it\n" ((null):0, (null)) Input #0, wav, from '/home/carlos/Music/SFX/Microsoft Windows 3.1 Startup Sound.wav': Duration: 00:00:01.99, bitrate: 1415 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s [WARNING] Tried to display clip 0 but it's closed ((null):0, (null)) Input #0, wav, from '/home/carlos/Music/SFX/Microsoft Windows 3.1 Startup Sound.wav': Duration: 00:00:01.99, bitrate: 1415 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s [INFO] Clip opened on track 0 ((null):0, (null)) [WARNING] QWidgetWindow(0x5565b45ad2b0, name="fx_controlsWindow") must be a top level window. ((null):0, (null)) [WARNING] QSocketNotifier: Invalid socket 8 and type 'Read', disabling... ((null):0, (null)) [WARNING] QSocketNotifier: Invalid socket 29 and type 'Read', disabling... ((null):0, (null)) [WARNING] QSocketNotifier: Invalid socket 12 and type 'Read', disabling... ((null):0, (null)) Unable to start Dr. Konqi

itsmattkc commented 5 years ago

I see output mentioning MIDI, Olive doesn't implement any of VST's MIDI opcodes since there (presumably) isn't much point of utilizing MIDI in an NLE, but perhaps a few of the opcodes need to be implemented for some effects to work. I'll have to test these specific VST plugins myself and see if that's the answer.

itsmattkc commented 5 years ago

DragonFly Reverb (and presumably ZynAddSubFX) work as of 57e038afc4af4f6b8573cc0ada26a1ef7e75ee7b. They used a main() function for their entry point rather than the documented VSTPluginMain() - not uncommon it seems, but something I hadn't accounted for (Olive is also now crash-resistant if it can't find either). For some reason I can't set any parameters in DragonFly Reverb, but I'm not able to in other hosts either so I assume this isn't specific to Olive.

Let me know if this fixes the VST issues for you.

capezotte commented 5 years ago

DragonFly Reverb now loads, but its UI is irresponsive, as you noted.

However, ZynAddSubFX and its subsets still crash with no log but Segmentation fault (core dumped)

I tried an alternative to ZynAddSub's family of VSTs, the ZAM. While they load and you can hear their effect, their UI is completely black and I can't seem to edit anything.

Only log is

Plugin UI running in 'OLIVETEAM' Plugin UI running in 'OLIVETEAM'

itsmattkc commented 5 years ago

I'd consider filing a bug report with the developers of DragonFly Reverb, the UI is similarly unresponsive in OBS and even Audacity.

I'm guessing ZynAddSubFX is a completely separate crash because Olive should protect against having no entry point. I guess I'll have to take a look

capezotte commented 5 years ago

I think I found the reason why ZynAddSub won't work: when loading a ZynAddSubFX into Audacity, it won't draw its own UI, but request the program to draw its controls, including sliders. Olive doesn't implement that and crashes.

image

ZAM also loads its UI properly, and DragonFly Reverb actually responds (bug fixed in a later release than Ubuntu's)?

DaniSeeh commented 5 years ago

I'm closing all pre-nodes merge Bugs. If Matt thinks they still apply, we should reopen. The entire infrastructure is changing so these bug reports likely aren't relevant anymore.