Closed sc3sc3 closed 1 year ago
This definitely looks like a Faust issue to me. Have you tried compiling your Faust code outside Amati? Would you consider sharing the dsp code? Anyway, thank you for reporting. We should certainly make it so that Amati doesn't crash even when the Faust compiler has an issue with the code.
Amati Standalone application crashes at startup. The VST3 plugin crashes even with the simplest of Faust code:
import("stdfaust.lib");
process = os.osc(440) *0.2;
I can process dsp code directly through Faust compiler without an issue.
You think I should file a bug for Faust ?
Oh ok, I didn't read your bug report right. I'll have to look into the issue.
@jdsierral It seems that the issue comes from the smart pointer to llvm_dsp_factory
. From what I understand, for there to be a smart pointer to that class, methods of the class faust_smartable
in this file, from which llvm_dsp_factory is derived, are called. The assertion refCount == 0
in faust_smartable
's destructor then fails.
Do you think you could understand and fix that? If not, I will replace the smart pointer with a raw one for the time being.
@sc3sc3 If you prefer not to wait, you should be fine using commit b93767b5545a7ffed768c15bd0c0808797000a94 instead.
Yes I just checked it :)... what I think is happening is that the createDSPFactorFromString function creates an factory with a custom deleter, so the smart pointer tries to delete it it doesn't handle the refCount properly... This seems to be to be able to handle efficiently the creation of a factory that was previously created, so we probably don't actually want the smartPointer in any case...
@sc3sc3 I have reverted back to an an older commit that should work for you. If you tell me if it does, it will be greatly appreciated.
Yes, that works. I just recompiled and used the vst3 plugin in a DAW. Thanks.
Fantastic, thank you for the feedback.
Thank you for your work :-)
Hi, I'm on linux. I compiled and installed latest Faust version from git/master ( not a release version ) Amati builds ok but the standalone version crashes: _rill:~/git/Amati/build/Amati_artefacts/Standalone$ ./Amati Loading preset Starting compilation... Compilation complete! Using new program. terminate called after throwing an instance of 'faustexception' what(): ASSERT : please report this message, the stack trace, and the failing DSP file to Faust developers (file: dsp_aux.hh, line: 70, version: 2.32.10) ====== stack trace start ====== /usr/local/lib/libfaust.so.2(_Z14faustassertauxbRKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi+0x3ca) [0x7f557109014a] /usr/local/lib/libfaust.so.2(_ZN16llvm_dsp_factoryD0Ev+0x119) [0x7f55713cb009] ./Amati(+0x570e0a) [0x56156d0e5e0a] ./Amati(+0x56e9ea) [0x56156d0e39ea] ./Amati(+0x567daf) [0x56156d0dcdaf] ./Amati(+0x9c4b5) [0x56156cc114b5] ./Amati(+0x9c213) [0x56156cc11213] ./Amati(+0x927a9) [0x56156cc077a9] ./Amati(+0x90f6a) [0x56156cc05f6a] ./Amati(+0x90da1) [0x56156cc05da1] ./Amati(+0x934a0) [0x56156cc084a0] ./Amati(+0x95233) [0x56156cc0a233] ./Amati(+0x95312) [0x56156cc0a312] ./Amati(+0x3a01e2) [0x56156cf151e2] ./Amati(+0x1b5e96) [0x56156cd2ae96] ./Amati(+0x3a00a2) [0x56156cf150a2] ./Amati(+0x3a0042) [0x56156cf15042] ./Amati(+0x8f494) [0x56156cc04494] /lib/x86_64-linux-gnu/libc.so.6(libc_start_main+0xf3) [0x7f55708660b3] ./Amati(+0x8f35e) [0x56156cc0435e] ====== stack trace stop ====== Aborted_
Also the VST3 crashes in DAW when compiling dsp code.
Note: the installed Faust version seems to work ok.
I wonder if this might be a Faust issue actually ?