Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault in juce::AudioFormatWriter::writeFromFloatArrays when using --render on macOS #45

Open
0xdevalias opened this issue Nov 7, 2023 · 1 comment

Comments

@0xdevalias
Copy link

0xdevalias commented Nov 7, 2023

While trying to use the --render command of the Vital CLI on macOS, I got a segfault.

Source: https://www.reddit.com/r/VitalSynth/comments/16hrx39/comment/k86801j/?utm_source=share&utm_medium=web2x&context=3

⇒ cd ~/Desktop

⇒ /Applications/Vital.app/Contents/MacOS/Vital --render "/Users/devalias/Music/Vital/Factory/Presets/Plucked String.vital" --midi 48 --length
3 --bpm 120 --images
Thread 0 Crashed:: JUCE Message Thread Dispatch queue: com.apple.main-thread
0   Vital                         	       0x105b4a238 juce::AudioFormatWriter::writeFromFloatArrays(float const* const*, int, int) + 40
1   Vital                         	       0x105efb2ac SynthBase::renderAudioToFile(juce::File const&, float, float, std::__1::vector<int, std::__1::allocator<int>>, bool) + 3132
2   Vital                         	       0x105ce39be processCommandLine(juce::String const&) + 6334
3   Vital                         	       0x105e59ffa StandaloneSynth::initialise(juce::String const&) + 570
4   Vital                         	       0x105b8c7e2 juce::JUCEApplicationBase::initialiseApp() + 1042
5   Vital                         	       0x105cbed5b juce::JUCEApplication::initialiseApp() + 11
6   Vital                         	       0x105b4a578 main + 216
7   dyld                          	    0x7ff806ac241f start + 1903

crashreport.txt

ChatGPT's advice based on the crash report:

The crash report indicates that the application Vital crashed due to a segmentation fault (SIGSEGV), which is a type of crash where a program attempts to access a restricted area of memory.

Here are the key points from the crash report:

- **Process**: Vital (audio.vital.synth)
- **Version**: 1.5.5
- **Crashed Thread**: 0 JUCE Message Thread (main thread)
- **Exception Type**: EXC_BAD_ACCESS (SIGSEGV)
- **Exception Codes**: KERN_INVALID_ADDRESS at 0x0000000000000018

The crash occurred in thread 0, which is the main thread of the application. The function call stack indicates that the crash happened during a call to `juce::AudioFormatWriter::writeFromFloatArrays`, which is a function from the JUCE framework used to write audio data. It appears that the application attempted to access memory at address `0x18`, which was not a valid address, leading to the segmentation fault.

..snip..
@0xdevalias
Copy link
Author

It seems this segfault (or something similar to it) has existed since at least March 2021:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant