jatinchowdhury18 / KlonCentaur

Digital emulation of the Klon Centaur guitar pedal using RNNs, Wave Digital Filters, and more
BSD 3-Clause "New" or "Revised" License
325 stars 24 forks source link

standalone segfaults #37

Open magnetophon opened 3 years ago

magnetophon commented 3 years ago

On NixOS, the standalone version of this plugin segfsaults directly after starting, without showing a window. The terminal shows:

ChowCentaur
[1]    533966 segmentation fault (core dumped)  ChowCentaur

Also see: https://github.com/NixOS/nixpkgs/pull/136761?notification_referrer_id=MDE4Ok5vdGlmaWNhdGlvblRocmVhZDIzNzkzNTIwMjY6NzY0NTcxMQ%3D%3D&notifications_query=is%3Aunread#issuecomment-921937253

jatinchowdhury18 commented 3 years ago

Hmmm, when I've run into this issue on Linux before, it's been because one (or more) of the dependencies was missing. For reference, these are the dependencies that I use for making the Linux installer.

Beyond that, would it be possible to get a stacktrace to see where the failure might be occuring?

magnetophon commented 3 years ago

I have these dependencies:

alsa-lib
, curl
, freeglut
, freetype
, libGL
, libXcursor
, libXext
, libXinerama
, libXrandr
, libjack2
, pkg-config
, python3

The only ones not explicitly mentioned are libc6, libgcc-s1 and libstdc++6, but I assume nix provides these as part of stdenv, otherwise it wouldn't build at all. Does that sound correct to you?

A stacktrace can be troublesome on NixOS, I hope we can fix this without one...

jatinchowdhury18 commented 3 years ago

Hmmm, I noticed that Jack wasn't part of the dependencies... i wonder if that could be the problem. As a test, would it be possible to try compile without Jack? For now, that can be done by settings JUCE_JACK=0 in the CMake configuration.

magnetophon commented 3 years ago

Yes it is: libjack2. Do you still want me to try without jack?

jatinchowdhury18 commented 3 years ago

Oh yeah, I see I missed that when I read the list initially. Building without Jack probably won't make a different then.

Would it be possible to try adding a couple of "print" statements (for example, here and here) to see where the program gets to before is segfaults.

magnetophon commented 3 years ago

Sure, could you tell me exactly what to change? Preferably in the form of a few sed commands or a diff, but just the code would be fine too.

jatinchowdhury18 commented 3 years ago

Actually, here's a branch with the print statements added: https://github.com/jatinchowdhury18/KlonCentaur/compare/nix-os-debug

Definitely let me know what you find!

magnetophon commented 3 years ago

Thanks!

Unfortunately none of the print statements are reached, or at least no output other than the segfault is printed to the terminal.

To make sure I didn't mix anything up, I opened the binary in vim, and it indeed contains the string Constructing ChowCentaur editor....