Segmentation fault on Linux for headless run (on RPi4)


my program crashed with a segmentation fault on Linux [1] when built[2] and run completely headless. More specifically, over a SSH session with no X forwarding enabled.

I now further investigated, and found out, that even the Audio Plugin Example App and the GuiApp Example App do so. Therefore I assume, that my code is not the problem.

This is the backtrace I receive via gdb:

(gdb) run
Starting program: /home/pi/JUCECommercial/examples/CMake/AudioPlugin/AudioPlugin/AudioPluginExample_artefacts/Standalone/Audio Plugin Example
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/arm-linux-gnueabihf/”.

Program received signal SIGSEGV, Segmentation fault.
0x00205730 in juce::LinuxComponentPeer::updateScaleFactorFromNewBounds(juce::Rectangle const&, bool) ()

AFAIK JUCE6 now comes with an out-of-the-box headless build and run on Linux. Therefore, I don’t know what could be the problem here.
Any help or suggestions appreciated! :slight_smile:


[1]: Specifically, the most recent Rasperry OS on a RPi4.
[2]: Build commands:

mkdir build && cd build
TARGET_ARCH=’-march=armv7l’ LDFLAGS=-latomic cmake … -G “Unix Makefiles”
make AudioPluginExample_Standalone
./AudioPlugin/AudioPluginExample_artefacts/Standalone/Audio\ Plugin\ Example

Oh, and I forgot: I’m using JUCE 6.0.5 here.

Thanks for reporting. This has been fixed on develop here:


glad to help. :slight_smile: