https://bugs.documentfoundation.org/show_bug.cgi?id=169711

            Bug ID: 169711
           Summary: Crash on macOS when running LibreOffice headless via
                    Terminal without GUI
           Product: LibreOffice
           Version: 25.8.3.2 release
          Hardware: ARM
                OS: macOS (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

Description:
When loading /Applications/LibreOffice.app/Contents/MacOS/soffice via script
without being logged in for the GUI, the macOS process crashes.

As far as I see in the source code, the AquaSalInstance constructor creates
some controls like a NSComboBox. But that triggers initialization of
WMClientWindowManager, which calls an XPC connection to the window manager.
That fails and the ap is killed.

Could LibreOffice be improved to see the "--headless" command line option early
and then maybe not create windows/controls to avoid this?


Steps to Reproduce:
1.Login via Terminal to a user without GUI. Or login via ssh.
2.run soffice executable
3.it crashes

Actual Results:
crash with _xpc_api_misuse in the crash log.

Expected Results:
it works :-)


Reproducible: Always


User Profile Reset: Yes

Additional Info:
the crash report:

Process:               soffice [3694]
Path:                  /Applications/LibreOffice.app/Contents/MacOS/soffice
Identifier:            org.libreoffice.script
Version:               25.8.3.2 (25.8.3.2)
Code Type:             ARM-64 (Native)
Parent Process:        fmsased [2094]
Responsible:           fmserver_helperd [1901]
User ID:               502

Date/Time:             2025-11-27 15:11:51.7618 +0100
OS Version:            macOS 15.5 (24F74)
Report Version:        12
Anonymous UUID:        10EDCFAD-31C7-5E59-A421-416CEB1E8D21


Time Awake Since Boot: 1100 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: WMClientWindowManager

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x000000018f7bc77c

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [3694]

Application Specific Signatures:
API Misuse

Thread 0 Crashed::  Dispatch queue: WMClientWindowManager
0   libxpc.dylib                               0x18f7bc77c _xpc_api_misuse + 92
1   libxpc.dylib                               0x18f79a33c
xpc_connection_set_target_uid + 216
2   WindowManagement                           0x270b4ac58
-[WMClientWindowManager _createXPCConnection] + 1004
3   WindowManagement                           0x270b4b834
-[WMClientWindowManager _xpcConnection] + 116
4   WindowManagement                           0x270b48e48
__31-[WMClientWindowManager stages]_block_invoke + 36
5   libdispatch.dylib                          0x18f8f485c
_dispatch_client_callout + 16
6   libdispatch.dylib                          0x18f8ea7a8
_dispatch_lane_barrier_sync_invoke_and_complete + 56
7   WindowManagement                           0x270b48d90
-[WMClientWindowManager stages] + 300
8   AppKit                                     0x1947c2734
__54-[NSWMWindowCoordinator initializeStageFramesIfNeeded]_block_invoke + 32
9   libdispatch.dylib                          0x18f8f485c
_dispatch_client_callout + 16
10  libdispatch.dylib                          0x18f8dda28
_dispatch_once_callout + 32
11  AppKit                                     0x1947c26e0
-[NSWMWindowCoordinator initializeStageFramesIfNeeded] + 304
12  AppKit                                     0x193ab5aa8 -[NSWindow
_commonInitFrame:styleMask:backing:defer:] + 692
13  AppKit                                     0x193ab5494 -[NSWindow
_initContent:styleMask:backing:defer:contentView:] + 848
14  AppKit                                     0x193ab5138 -[NSWindow
initWithContentRect:styleMask:backing:defer:] + 48
15  AppKit                                     0x193d5c318 -[NSComboBoxWindow
initWithContentRect:comboBoxCell:] + 88
16  AppKit                                     0x193d5bd10 -[NSComboBoxCell
initPopUpWindow] + 892
17  AppKit                                     0x193dad2d4 -[NSComboBoxCell
initTextCell:] + 100
18  libvclplug_osxlo.dylib                     0x10501fd10
AquaSalInstance::AquaSalInstance() + 440
19  libvclplug_osxlo.dylib                     0x10501fae8 create_SalInstance +
248
20  libmergedlo.dylib                          0x10a72a02c (anonymous
namespace)::tryInstance(rtl::OUString const&, bool) + 208
21  libmergedlo.dylib                          0x10a729df4 CreateSalInstance()
+ 252
22  libmergedlo.dylib                          0x10a779550 InitVCL() + 140
23  libmergedlo.dylib                          0x10a779384 ImplSVMain() + 324
24  libmergedlo.dylib                          0x1097b9504 soffice_main + 208
25  soffice                                    0x10008851c main + 20
26  dyld                                       0x18f6f2b98 start + 6076

PS: There is no user profile yet.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to