pingdynasty / OwlSim

Simulator for Open Ware Laboratory, a programmable audio effects pedal: http://hoxtonowl.com/
GNU General Public License v3.0
46 stars 21 forks source link

SIGSEGV as you try to open the GUI #19

Open giuliomoro opened 8 years ago

giuliomoro commented 8 years ago

It crashes when using Juce PluginHost on Linux 14.04 64-bit. When trying to load it into Audacity 2.11 on the same system, it is marked as "invalid"

When run inside gdb, here's what happens:

(gdb) symbol-file OwlSim.so 
Load new symbol table from "OwlSim.so"? (y or n) y
Reading symbols from OwlSim.so...done.
(gdb) ls
Undefined command: "ls".  Try "help".
(gdb) r owlsimtest.filtergraph 
Starting program: /usr/local/bin/PluginHost owlsimtest.filtergraph
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
JUCE v3.2.0
[New Thread 0x7fffed25a700 (LWP 31749)]
[Thread 0x7fffed25a700 (LWP 31749) exited]
[New Thread 0x7fffed25a700 (LWP 31750)]
[Thread 0x7fffed25a700 (LWP 31750) exited]
[New Thread 0x7fffed25a700 (LWP 31751)]
[New Thread 0x7fffeca59700 (LWP 31752)]
[New Thread 0x7fffe3ffe700 (LWP 31753)]
Attempting to load VST: /home/giulio/vst/OwlSim.so
JUCE v3.0.8
Creating VST instance: OwlSim
[New Thread 0x7fffe28fc700 (LWP 31754)]
Patch: ToneFilter
Patch: Waveshaper
JUCE Assertion failure in juce_VST_Wrapper.cpp:287

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff5e95fb7 in kill () at ../sysdeps/unix/syscall-template.S:81
81  ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) c
Continuing.
Initialising VST: OwlSim (V1.0.1)
[New Thread 0x7fffe20fb700 (LWP 31755)]
Opening VST UI: OwlSim
[New Thread 0x7fffe0bf7700 (LWP 31756)]

Here I double click on the plugin to open the GUI:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe3ffe700 (LWP 31753)]
0x00007fffe2d930be in PluginPatchProcessor::processAudio (this=0x7fffc800c8c0, buffer=...) at ../../Source/PluginPatchProcessor.cpp:45
45    patch->processAudio(buffer);
(gdb) backtrace
#0  0x00007fffe2d930be in PluginPatchProcessor::processAudio (this=0x7fffc800c8c0, buffer=...)
    at ../../Source/PluginPatchProcessor.cpp:45
#1  0x00007fffe2d9c7b5 in StompBoxAudioProcessor::processBlock (this=0xb8bce0, buffer=..., midiMessages=...)
    at ../../Source/PluginProcessor.cpp:194
#2  0x00007fffe2da3529 in JuceVSTWrapper::processReplacing (this=0xb8c7b0, inputs=0x7fffe3ffd990, outputs=0x7fffe3ffd990, 
    numSamples=160) at ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:596
#3  0x00007fffe2d9fa8e in AudioEffect::processClassReplacing (e=0xb8c7e0, inputs=0x7fffe3ffd990, outputs=0x7fffe3ffd990, 
    sampleFrames=160) at /home/giulio/SDKs/vstsdk2.4/public.sdk/source/vst2.x/audioeffect.cpp:60
#4  0x0000000000495804 in int juce::CharPointer_UTF8::compareIgnoreCase<juce::CharPointer_UTF32>(juce::CharPointer_UTF32) const@plt ()
#5  0x0000000000bbee00 in ?? ()
#6  0x0000000000b4c640 in ?? ()
#7  0x00007fffe3ffd970 in ?? ()
#8  0x0000000000b8b5a0 in ?? ()
#9  0x00007fffe3ffd8e0 in ?? ()
#10 0x000000000041d766 in ?? ()
#11 0x0000000000bbee00 in ?? ()
#12 0x000000a0e3ffd990 in ?? ()
#13 0x00007fffe3ffd900 in ?? ()
#14 0x0000000000000000 in ?? ()
pingdynasty commented 8 years ago

It looks like PatchProcessor pointer is not set or is dangling.

For some reason in void StompBoxAudioProcessor::setPatch(std::string name) the initialisation happens twice, this looks wrong to me. Try removing PluginProcessor.cpp line 61 to 74

giuliomoro commented 8 years ago

That did not solve the issue. Actually those lines that I commented out were wrapped by an if{}, so

Starting program: /usr/local/bin/PluginHost 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
JUCE v3.2.0
[New Thread 0x7fffed25a700 (LWP 8787)]
[Thread 0x7fffed25a700 (LWP 8787) exited]
[New Thread 0x7fffed25a700 (LWP 8788)]
[Thread 0x7fffed25a700 (LWP 8788) exited]
[New Thread 0x7fffed25a700 (LWP 8789)]
[New Thread 0x7fffeca59700 (LWP 8790)]
[New Thread 0x7fffe3ffe700 (LWP 8791)]
[New Thread 0x7fffe37fd700 (LWP 8792)]
Attempting to load VST: /home/giulio/vst/OwlSim.so
JUCE v3.0.8
Creating VST instance: OwlSim
[New Thread 0x7fffe20fb700 (LWP 8793)]
Patch: ToneFilter
Patch: Waveshaper
JUCE Assertion failure in juce_VST_Wrapper.cpp:287

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff5e95fb7 in kill () at ../sysdeps/unix/syscall-template.S:81
81  ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) c
Continuing.
Initialising VST: OwlSim (V1.0.1)

----here I open the gui-------

Opening VST UI: OwlSim
[New Thread 0x7fffe0dfa700 (LWP 8796)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe3ffe700 (LWP 8791)]
0x00007fffe25920be in PluginPatchProcessor::processAudio (this=0x7fffd800c8c0, buffer=...) at ../../Source/PluginPatchProcessor.cpp:45
45    patch->processAudio(buffer);
(gdb) bt
#0  0x00007fffe25920be in PluginPatchProcessor::processAudio (this=0x7fffd800c8c0, buffer=...)
    at ../../Source/PluginPatchProcessor.cpp:45
#1  0x00007fffe259b205 in StompBoxAudioProcessor::processBlock (this=0xbd85b0, buffer=..., midiMessages=...)
    at ../../Source/PluginProcessor.cpp:195
#2  0x00007fffe25a1f79 in JuceVSTWrapper::processReplacing (this=0xbd8b10, inputs=0x7fffe3ffd990, outputs=0x7fffe3ffd990, 
    numSamples=160) at ../../JuceLibraryCode/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp:596
#3  0x00007fffe259e4de in AudioEffect::processClassReplacing (e=0xbd8b40, inputs=0x7fffe3ffd990, outputs=0x7fffe3ffd990, 
    sampleFrames=160) at /home/giulio/SDKs/vstsdk2.4/public.sdk/source/vst2.x/audioeffect.cpp:60
#4  0x0000000000495804 in int juce::CharPointer_UTF8::compareIgnoreCase<juce::CharPointer_UTF32>(juce::CharPointer_UTF32) const@plt ()
#5  0x0000000000bb2eb0 in ?? ()
#6  0x0000000000b50c60 in ?? ()
#7  0x00007fffe3ffd970 in ?? ()
#8  0x0000000000bd7f90 in ?? ()
#9  0x00007fffe3ffd8e0 in ?? ()
#10 0x000000000041d766 in ?? ()
#11 0x0000000000bb2eb0 in ?? ()
#12 0x000000a0e3ffd990 in ?? ()
#13 0x00007fffe3ffd900 in ?? ()
#14 0x0000000000000000 in ?? ()