Headless APH on Raspberry Pi

JUCE 8.0.4 on Raspberry Pi5 Debian GNU/Linux 12 (bookworm)

I tried testing a plugin in APH to see if it could run headless on Raspberry Pi. APH is a handy test host. Booting the Pi into headless mode and running ./AudioPluginHost from the command line resulted in a segfault.

Backing up a bit and booting the Pi into GUI mode. If I double click on APH, launches fine and remembers its .filtergraph location.

Running APH from the command line also launches fine and remembers its filtergraph. (OS still in GUI mode).

Trying gdb from the command line and launching APH resulted in this message:

First time using gdb, maybe I have misconfigured?

Booting Pi into headless mode and running APH from the command line using gdb:

Starting program: /home/mitch/Desktop/AudioPluginHost AudioPluginHost
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 1434]
[New Thread 0x7ffff5dbeec0 (LWP 1437)]
[New Thread 0x7ffff55aeec0 (LWP 1438)]
[Thread 0x7ffff55aeec0 (LWP 1438) exited]
[New Thread 0x7ffff55aeec0 (LWP 1439)]
[Thread 0x7ffff55aeec0 (LWP 1439) exited]
[New Thread 0x7ffff55aeec0 (LWP 1440)]
[New Thread 0x7ffff4d9eec0 (LWP 1441)]
[Thread 0x7ffff4d9eec0 (LWP 1441) exited]
[New Thread 0x7ffff4d9eec0 (LWP 1442)]
[Thread 0x7ffff4d9eec0 (LWP 1442) exited]
[New Thread 0x7ffff4d9eec0 (LWP 1443)]
[Thread 0x7ffff4d9eec0 (LWP 1443) exited]
[New Thread 0x7ffff4d9eec0 (LWP 1444)]
[New Thread 0x7fffe7c9eec0 (LWP 1445)]
[New Thread 0x7fffe73beec0 (LWP 1446)]
[New Thread 0x7fffe6baeec0 (LWP 1447)]
[New Thread 0x7fffe639eec0 (LWP 1448)]
Thread 1 "AudioPluginHost" received signal SIGSEGV, Segmentation fault.
0x0000555555922710 in juce::detail::ComponentHelpers::getParentOrMainMonitorBounds(juce::Component const&) [clone .isra.0] ()
(gdb) bt
#0 0x0000555555922710 in juce::detail::ComponentHelpers::getParentOrMainMonitorBounds(juce::Component const&) [clone .isra.0] ()
#1 0x0000555555934a54 in juce::Component::centreWithSize(int, int) ()
#2 0x00005555556855a0 in MainHostWindow::MainHostWindow() ()
#3 0x00005555556890f8 in PluginHostApp::initialise(juce::String const&) ()
#4 0x00005555557eb364 in juce::JUCEApplicationBase::initialiseApp() ()
#5 0x0000555555649e84 in juce::JUCEApplicationBase::main() ()
#6 0x00007ffff76c7740 in __libc_start_call_main (main=main@entry=0x5555556457a8 <main>, argc=argc@entry=2, argv=argv@entry=0x7ffffffff358)
at ../sysdeps/nptl/libc_start_call_main.h:58
#7 0x00007ffff76c7818 in __libc_start_main_impl (main=0x5555556457a8 <main>, argc=2, argv=0x7ffffffff358, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:360
#8 0x000055555564c330 in _start ()
(gdb)

I am new to Linux and headless operation. Any tips appreciated. Thanks.

Trying to dig a bit deeper…

In HostStartup.cpp Initialize() added mainWindow->setVisible (false);

Launching APH in CLI mode on the Raspberry Pi gets me a bit further:

I must be missing something to run APH headless?