acids-ircam / rave_vst

Other
184 stars 28 forks source link

Standalone, VST and AU crash. (exception of type std::out_of_range) #3

Closed vigliensoni closed 2 years ago

vigliensoni commented 2 years ago

As soon as a model is imported, the standalone, VST3 and AU crash. The shell returns:

❯ /Applications/RAVE.app/Contents/MacOS/RAVE ; exit;
/Users/gabriel/Library/ACIDS/RAVE/
[-] Network - No API response: Failed to connect to 127.0.0.1 port 8080: Connection refused. (ERRCODE 7)
[ ] RAVE - Encode parameters     1
    1
   64
 2048
[ CPULongType{4} ]
[ ] RAVE - Decode parameters    64
 2048
    2
    1
[ CPULongType{4} ]
[ ] RAVE - Prior parameters     1
 2048
   64
 2048
[ CPULongType{4} ]
[ ] RAVE - Latent size 64
[ ] RAVE - Sampling rate: 48000
[+] RAVE - Model successfully loaded: /Users/gabriel/Library/ACIDS/RAVE/as-st.ts
 - sr : 48000
 - latent size : 64
 - full latent size : 64
 - ratio2048
- prior parameters    1
 2048
   64
 2048
[ CPULongType{4} ]
to low; setting rate to : 11
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: array::at
[1]    4565 abort      /Applications/RAVE.app/Contents/MacOS/RAVE

[Process completed]

Note I exported the model with the --stereo true flag.

ZodiacFRA commented 2 years ago

Hello @vigliensoni ! Would you mind sharing your model with us (only for debug purposes of course) ? It'll be easier and quicker this way. If that's ok send us a link to jbdupuy (at) ircam.fr

vigliensoni commented 2 years ago

Hi @ZodiacFRA, I just sent you an email with a link to the model as well as the training parameters for RAVE and the PRIOR.

Thank you!

vvolhejn commented 2 years ago

I am facing a similar issue. I tried using the VST plugin in Ableton Live 10 on the Darbouka model available here.

Crashed Thread: 24

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008 Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [39804]



I then tried opening the standalone app, but that crashes immediately. I don't know if it's because of the Darbouka model because I didn't try opening it before I loaded up the model via Ableton.

I am also wondering, do you have any pre-trained models available on which the plugin is expected to work and that I could try it out on? Thanks!
vigliensoni commented 2 years ago

@vvolhejn If running the Darbouka model (thank you for the link) in RAVE standalone I'm getting the following traceback:

❯ /Applications/RAVE.app/Contents/MacOS/RAVE ; exit;
/Users/gabriel/Library/ACIDS/RAVE/
[-] Network - No API response: Failed to connect to 127.0.0.1 port 8080: Connection refused. (ERRCODE 7)
[ ] RAVE - Encode parameters     1
    1
    4
 2048
[ CPULongType{4} ]
[ ] RAVE - Decode parameters     4
 2048
    1
    1
[ CPULongType{4} ]
[ ] RAVE - Prior parameters     1
 2048
    4
 2048
[ CPULongType{4} ]
[ ] RAVE - Latent size 128
[ ] RAVE - Sampling rate: 48000
[+] RAVE - Model successfully loaded: /Users/gabriel/Library/ACIDS/RAVE/darbouka_realtime.ts.ts
 - sr : 48000
 - latent size : 128
 - full latent size : 128
 - ratio2048
- prior parameters    1
 2048
    4
 2048
[ CPULongType{4} ]
to low; setting rate to : 11
libc++abi.dylib: terminating with uncaught exception of type c10::Error: Method 'encode_amortized' is not defined.
Exception raised from get_method at /Users/gabriel/Documents/3_GitHub/rave_vst/build/torch/libtorch/include/torch/csrc/jit/api/object.h:108 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 98 (0x10f8830c2 in libc10.dylib)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 106 (0x10f8817da in libc10.dylib)
frame #2: torch::jit::Object::get_method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const + 1151 (0x10f4436ff in RAVE)
frame #3: RaveAP::modelPerform() + 1836 (0x10f43cd4c in RAVE)
frame #4: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(RaveAP*), RaveAP*> >(void*) + 44 (0x10f44731c in RAVE)
frame #5: _pthread_start + 148 (0x7fff73a5b109 in libsystem_pthread.dylib)
frame #6: thread_start + 15 (0x7fff73a56b8b in libsystem_pthread.dylib)

[1]    12681 abort      /Applications/RAVE.app/Contents/MacOS/RAVE

[Process completed]
wwerkk commented 2 years ago

Hi, I encountered a similar problem, after importing the wheel model provided with the nn~ max object RAVE crashed immediately and keeps on crashing on launch, both plug-ins and the standalone version. Here's the error report: crash.txt

caillonantoine commented 2 years ago

Yep, the wheel model has not been exported with --stereo true, and therefore can't be used in the vst !

vigliensoni commented 2 years ago

@caillonantoine, please note the one I sent to @ZodiacFRA was exported with the --stereo true flag.

caillonantoine commented 2 years ago

Yes, I saw it in your original post! We are currently working on finding out what is going on :)

jreus commented 2 years ago

Hi all, I'm having a similar issue running the VST on Linux (Kubuntu 20.04 LTS).

The stand-alone crashes as soon as I load my model. I've just emailed @ZodiacFRA with the model I'm using... which was exported using python export_rave.py --run ../models/rave/choral2/e30455.ckpt --stereo true

Here's the terminal output:

[-] Network - No API response: Failed to connect to 127.0.0.1 port 8080: Connection refused. (ERRCODE 7)
[ ] RAVE - Encode parameters     1
    1
   16
 2048
[ CPULongType{4} ]
[ ] RAVE - Decode parameters    16
 2048
    2
    1
[ CPULongType{4} ]
[+] RAVE - Model successfully loaded: /home/myname/.config/ACIDS/RAVE/choral_e30455.ts.ts
 - sr : 0
 - latent size : 0
 - full latent size : 0
 - ratio2048
to low; setting rate to : 11
terminate called after throwing an instance of 'std::out_of_range'
  what():  array::at: __n (which is 8) >= _Nm (which is 8)
Aborted (core dumped)

If it's of any use, there were also a few warning during the build:

[100%] Linking CXX shared module rave-vst_artefacts/Release/VST3/RAVE.vst3/Contents/x86_64-linux/RAVE.so
In member function ‘write’,
    inlined from ‘charToString’ at /home/myname/Drive/KONTINUUM/rave_vst/juce/modules/juce_core/text/juce_String.cpp:370:13:
/home/myname/Drive/KONTINUUM/rave_vst/juce/modules/juce_core/text/juce_CharPointer_UTF8.h:344:25: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  344 |                 *data++ = (CharType) (0x80 | (0x3f & (c >> (numExtraBytes * 6))));
      |                         ^
/home/myname/Drive/KONTINUUM/rave_vst/juce/modules/juce_core/text/juce_CharPointer_UTF8.h:344:25: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
In member function ‘write’,
    inlined from ‘charToString’ at /home/myname/Drive/KONTINUUM/rave_vst/juce/modules/juce_core/text/juce_String.cpp:370:13:
/home/myname/Drive/KONTINUUM/rave_vst/juce/modules/juce_core/text/juce_CharPointer_UTF8.h:344:25: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  344 |                 *data++ = (CharType) (0x80 | (0x3f & (c >> (numExtraBytes * 6))));
      |                         ^
/home/myname/Drive/KONTINUUM/rave_vst/juce/modules/juce_core/text/juce_CharPointer_UTF8.h:344:25: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
[100%] Built target rave-vst_Standalone
[100%] Built target rave-vst_VST3
ZodiacFRA commented 2 years ago

@vvolhejn could you start the standalone from a terminal and paste your output here please?

vigliensoni commented 2 years ago

@ZodiacFRA I just tried the latest commit on macOS and the behaviour is the same I reported when I opened this issue. Here is the terminal output after launching the standalone application

[-] Network - No API response
[ ] RAVE - Encode parameters     1
    1
    4
 2048
[ CPULongType{4} ]
[ ] RAVE - Decode parameters     4
 2048
    1
    1
[ CPULongType{4} ]
[ ] RAVE - Prior parameters     1
 2048
    4
 2048
[ CPULongType{4} ]
[ ] RAVE - Latent size 128
[ ] RAVE - Sampling rate: 48000
[+] RAVE - Model successfully loaded: /Users/gabriel/Library/ACIDS/RAVE/darbouka_realtime.ts.ts
 - sr : 48000
 - latent size : 128
 - full latent size : 128
 - ratio2048
- prior parameters    1
 2048
    4
 2048
[ CPULongType{4} ]
to low; setting rate to : 11
libc++abi.dylib: terminating with uncaught exception of type c10::Error: Method 'encode_amortized' is not defined.
Exception raised from get_method at /Users/gabriel/Documents/3_GitHub/rave_vst/build/torch/libtorch/include/torch/csrc/jit/api/object.h:108 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 98 (0x10ed260c2 in libc10.dylib)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 106 (0x10ed247da in libc10.dylib)
frame #2: torch::jit::Object::get_method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const + 1151 (0x10e8e4acf in RAVE)
frame #3: RaveAP::modelPerform() + 1835 (0x10e8de17b in RAVE)
frame #4: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(RaveAP*), RaveAP*> >(void*) + 44 (0x10e8e86bc in RAVE)
frame #5: _pthread_start + 148 (0x7fff6c84f109 in libsystem_pthread.dylib)
frame #6: thread_start + 15 (0x7fff6c84ab8b in libsystem_pthread.dylib)

[1]    4908 abort      

[Process completed]
deccolquitt commented 2 years ago

I am also experiencing similar problems... crash.txt

ZodiacFRA commented 2 years ago

@deccolquitt which model are you using? Are you loading with the VST / AU / Standalone? Could you paste the output of the standalone when it crashes?

deccolquitt commented 2 years ago

I'm using a custom model and I'm loading in Standalone. How would I go about getting the output of it when it crashes?

ZodiacFRA commented 2 years ago

@vigliensoni @vvolhejn The problems you are seeing are caused by the way the model (darbouka_realtime.ts) has been exported, the .ts lacks the needed encode_amortized function

ZodiacFRA commented 2 years ago

@deccolquitt How did you export the model? To get the output launch the standalone binary from the command line and you'll get all the logs

deccolquitt commented 2 years ago

@ZodiacFRA apologies for my lack of basic knowledge but where can i find the standalone binary?

vigliensoni commented 2 years ago

@ZodiacFRA Gotcha, this is now working. I can load my models. The app tends to crash but I can deal with that.

Thank you.

domkirke commented 2 years ago

@vvolhejn If running the Darbouka model (thank you for the link) in RAVE standalone I'm getting the following traceback:

❯ /Applications/RAVE.app/Contents/MacOS/RAVE ; exit;
/Users/gabriel/Library/ACIDS/RAVE/
[-] Network - No API response: Failed to connect to 127.0.0.1 port 8080: Connection refused. (ERRCODE 7)
[ ] RAVE - Encode parameters     1
    1
    4
 2048
[ CPULongType{4} ]
[ ] RAVE - Decode parameters     4
 2048
    1
    1
[ CPULongType{4} ]
[ ] RAVE - Prior parameters     1
 2048
    4
 2048
[ CPULongType{4} ]
[ ] RAVE - Latent size 128
[ ] RAVE - Sampling rate: 48000
[+] RAVE - Model successfully loaded: /Users/gabriel/Library/ACIDS/RAVE/darbouka_realtime.ts.ts
 - sr : 48000
 - latent size : 128
 - full latent size : 128
 - ratio2048
- prior parameters    1
 2048
    4
 2048
[ CPULongType{4} ]
to low; setting rate to : 11
libc++abi.dylib: terminating with uncaught exception of type c10::Error: Method 'encode_amortized' is not defined.
Exception raised from get_method at /Users/gabriel/Documents/3_GitHub/rave_vst/build/torch/libtorch/include/torch/csrc/jit/api/object.h:108 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 98 (0x10f8830c2 in libc10.dylib)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 106 (0x10f8817da in libc10.dylib)
frame #2: torch::jit::Object::get_method(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const + 1151 (0x10f4436ff in RAVE)
frame #3: RaveAP::modelPerform() + 1836 (0x10f43cd4c in RAVE)
frame #4: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(RaveAP*), RaveAP*> >(void*) + 44 (0x10f44731c in RAVE)
frame #5: _pthread_start + 148 (0x7fff73a5b109 in libsystem_pthread.dylib)
frame #6: thread_start + 15 (0x7fff73a56b8b in libsystem_pthread.dylib)

[1]    12681 abort      /Applications/RAVE.app/Contents/MacOS/RAVE

[Process completed]

@vvolhejn Thank you very much for your interest, but please do not diffuse this model as 1) it is not working anymore as it is an old version, and 2) it has been given in a specific context and has been leaked ; no rights can be given on the dataset.

deccolquitt commented 2 years ago

@ZodiacFRA I've opened the standalone binary using ~ % open /Users/declancolquitt/rave_vst/build/rave-vst_artefacts/Release/Standalone/RAVE.app but once it crashes i receive no logs (should they just appear on the terminal?)

ZodiacFRA commented 2 years ago

just execute ./Users/declancolquitt/rave_vst/build/rave-vst_artefacts/Release/Standalone/RAVE.app

deccolquitt commented 2 years ago

I'm afraid when I do that I'm just getting

zsh: permission denied: /Users/declancolquitt/rave_vst/build/rave-vst_artefacts/Release/Standalone/RAVE.app

if i put a '.' in front of it (i.e. ./Users/declancolquitt/etc) I then get

zsh: no such file or directory: ./Users/declancolquitt/rave_vst/build/rave-vst_artefacts/Release/Standalone/RAVE.app

ZodiacFRA commented 2 years ago

@ZodiacFRA Gotcha, this is now working. I can load my models. The app tends to crash but I can deal with that.

Thank you.

Nice! @vigliensoni The latent size crash is working then, do not hesitate to open another issue for your crashes, @jreus that should work as well for you, @deccolquitt look at how to launch a binary from your terminal, if you still have issues please open a new one

vvolhejn commented 2 years ago

@domkirke My apologies, I didn't realize the model is not supposed to be public. I see you've already removed the link from my original comment.