[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #20 from Commit Notification --- Hossein committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/65f1b7351d5deccbae84156fef4c9580ac34dcb9 tdf#169711 Enable headless mode on macOS builds It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Commit Notification changed: What|Removed |Added Whiteboard||target:26.8.0 -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #19 from Christian Schmitz --- I did a grep on the files, but I think the svp_create_SalInstance function is not there, so I presume the ENABLE_HEADLESS option is not enabled for building for macOS. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Buovjaga changed: What|Removed |Added Ever confirmed|1 |0 Status|REOPENED|UNCONFIRMED -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Christian Schmitz changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED --- Comment #18 from Christian Schmitz --- I downloaded the nightly build from 26th February 2026 on macOS 15 today and run it without GUI in a background server process. We run this test.sh script: #!/bin/bash echo "Hello" export PATH=/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin /Applications/LibreOfficeDev.app/Contents/MacOS/soffice --convert-to pdf --safe-mode --headless --nologo --outdir /Data/Documents /Data/Documents/test.docx the output is: /Data/Documents/test.sh: line 7: 4167 Trace/BPT trap: 5 /Applications/LibreOfficeDev.app/Contents/MacOS/soffice --convert-to pdf --headless --nologo --outdir /Data/Documents /Data/Documents/test.docx and the crash report: - Translated Report (Full Report Below) - Process: soffice [4167] Path: /Applications/LibreOfficeDev.app/Contents/MacOS/soffice Identifier:org.libreoffice.script Version: 26.8.0.0 (26.8.0.0.alpha0) Code Type: ARM-64 (Native) Parent Process:Exited process [4166] Responsible: fmserver_helperd [340] User ID: 502 Date/Time: 2026-02-26 14:18:26.4583 +0100 OS Version:macOS 15.5 (24F74) Report Version:12 Anonymous UUID:10EDCFAD-31C7-5E59-A421-416CEB1E8D21 Time Awake Since Boot: 2600 seconds System Integrity Protection: enabled Crashed Thread:0 Dispatch queue: WMClientWindowManager Exception Type:EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0001, 0x000193fbc77c Termination Reason:Namespace SIGNAL, Code 5 Trace/BPT trap: 5 Terminating Process: exc handler [4167] Application Specific Signatures: API Misuse Thread 0 Crashed:: Dispatch queue: WMClientWindowManager 0 libxpc.dylib 0x193fbc77c _xpc_api_misuse + 92 1 libxpc.dylib 0x193f9a33c xpc_connection_set_target_uid + 216 2 WindowManagement 0x27534ac58 -[WMClientWindowManager _createXPCConnection] + 1004 3 WindowManagement 0x27534b834 -[WMClientWindowManager _xpcConnection] + 116 4 WindowManagement 0x275348e48 __31-[WMClientWindowManager stages]_block_invoke + 36 5 libdispatch.dylib 0x1940f485c _dispatch_client_callout + 16 6 libdispatch.dylib 0x1940ea7a8 _dispatch_lane_barrier_sync_invoke_and_complete + 56 7 WindowManagement 0x275348d90 -[WMClientWindowManager stages] + 300 8 AppKit 0x198fc2734 __54-[NSWMWindowCoordinator initializeStageFramesIfNeeded]_block_invoke + 32 9 libdispatch.dylib 0x1940f485c _dispatch_client_callout + 16 10 libdispatch.dylib 0x1940dda28 _dispatch_once_callout + 32 11 AppKit 0x198fc26e0 -[NSWMWindowCoordinator initializeStageFramesIfNeeded] + 304 12 AppKit 0x1982b5aa8 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 692 13 AppKit 0x1982b5494 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 848 14 AppKit 0x1982b5138 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 48 15 AppKit 0x19855c318 -[NSComboBoxWindow initWithContentRect:comboBoxCell:] + 88 16 AppKit 0x19855bd10 -[NSComboBoxCell initPopUpWindow] + 892 17 AppKit 0x1985ad2d4 -[NSComboBoxCell initTextCell:] + 100 18 libvclplug_osxlo.dylib 0x10708d958 AquaSalInstance::AquaSalInstance() + 444 19 libvclplug_osxlo.dylib 0x10708d6e4 create_SalInstance + 256 20 libmergedlo.dylib 0x10e7a12ac (anonymous namespace)::tryInstance(rtl::OUString const&, bool) + 220 21 libmergedlo.dylib 0x10e7a0f88 CreateSalInstance() + 268 22 libmergedlo.dylib 0x10e7fb45c InitVCL() + 180 23 libmergedlo.dylib 0x10e7fb1f4 ImplSVMain() + 408 24 libmergedlo.dylib 0x10d7e0c18 soffice_main + 200 25 soffice
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 CHEN Kai changed: What|Removed |Added Resolution|--- |FIXED Status|REOPENED|RESOLVED --- Comment #17 from CHEN Kai --- You were right to question the Codex environment. I retested outside Codex, using a normal terminal session (Ghostty + zsh), with direct invocation of the master daily build: /Applications/LibreOfficeDev.app/Contents/MacOS/soffice --headless --convert-to pdf ... Version: LibreOfficeDev 26.8.0.0.alpha0 4bf07d898cd3084ff9012f11776d1489b103236c Result (tested twice): - exit code 0 both times - PDF generated successfully both times - no new soffice .ips crash report was created So I can no longer reproduce this with the master build when running outside Codex. My earlier reproduction (including the .ips I attached from the master build) was from a Codex-launched process, and that environment seems to affect the result. I will investigate that separately. Thanks for pointing this out. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #16 from Buovjaga --- (In reply to CHEN Kai from comment #15) > Created attachment 205791 [details] > soffice-2026-02-26-143449.ips > > Tested with the latest master daily build you pointed to (macOS aarch64). > > Version: LibreOfficeDev 26.8.0.0.alpha0 > Build ID: 4bf07d898cd3084ff9012f11776d1489b103236c I'm not seeing _xpc_api_misuse in there. However, I notice: Coalition: com.openai.codex [7005] Responsible Process: Codex [29723] https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report "Process coalitions track resource usage among groups of related processes, such as an operating system process supporting a specific API’s functionality in an app. Most processes, including app extensions, form their own coalition." Can this OpenAI Codex use affect the result? What if you run it normally, without Codex? -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #15 from CHEN Kai --- Created attachment 205791 --> https://bugs.documentfoundation.org/attachment.cgi?id=205791&action=edit soffice-2026-02-26-143449.ips Tested with the latest master daily build you pointed to (macOS aarch64). Version: LibreOfficeDev 26.8.0.0.alpha0 Build ID: 4bf07d898cd3084ff9012f11776d1489b103236c -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 CHEN Kai changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #14 from CHEN Kai --- Tested with the latest master daily build you pointed to (macOS aarch64). Version: LibreOfficeDev 26.8.0.0.alpha0 Build ID: 4bf07d898cd3084ff9012f11776d1489b103236c Environment: - macOS 26.3 (25D125) - Apple Silicon (arm64) - GUI session logged in Result: Direct invocation still aborts in headless conversion mode: /Applications/LibreOfficeDev.app/Contents/MacOS/soffice --headless --convert-to pdf ... I tested twice; both runs exited with code 134 and produced no PDF output. A new crash report was generated: - soffice-2026-02-26-143449.ips The crash stack still includes: - ___RegisterApplication_block_invoke - _RegisterApplication - GetCurrentProcess - NSApplication sharedApplication/init - create_SalInstance - InitVCL() - soffice_main As a control test, launching the same conversion through macOS LaunchServices still works: open -W -n -a "/Applications/LibreOfficeDev.app/Contents/MacOS/soffice" --args ... So the issue still appears to be in the direct startup path on macOS, not in conversion itself. Please reopen. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Buovjaga changed: What|Removed |Added Resolution|--- |FIXED CC||[email protected] Status|REOPENED|RESOLVED --- Comment #13 from Buovjaga --- (In reply to CHEN Kai from comment #11) > I can still reproduce this on February 26, 2026 on macOS 26.3 (25D125), > Apple Silicon (arm64), while logged into the GUI. > > I tested both: > - LibreOffice Fresh 26.2.0.3 > - LibreOffice Still 25.8.5.2 You are testing with the wrong versions. Please test with a fresh master build: https://dev-builds.libreoffice.org/daily/master/current.html -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #12 from CHEN Kai --- Created attachment 205790 --> https://bugs.documentfoundation.org/attachment.cgi?id=205790&action=edit Still 25.8.5.2 -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 CHEN Kai changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED Ever confirmed|0 |1 --- Comment #11 from CHEN Kai --- I can still reproduce this on February 26, 2026 on macOS 26.3 (25D125), Apple Silicon (arm64), while logged into the GUI. I tested both: - LibreOffice Fresh 26.2.0.3 - LibreOffice Still 25.8.5.2 Direct invocation of soffice for headless conversion aborts with exit code 134 (SIGABRT), for example: "/Applications/LibreOffice.app/Contents/MacOS/soffice" --headless --convert-to pdf ... `soffice --version` works, but `--headless --convert-to` crashes and generates a macOS .ips crash report. The crash stack still includes: - ___RegisterApplication_block_invoke - _RegisterApplication - GetCurrentProcess - NSApplication sharedApplication/init - create_SalInstance - InitVCL() Workaround (works reliably here): Launching the same headless conversion via macOS LaunchServices succeeds: open -W -n -a "/Applications/LibreOffice.app/Contents/MacOS/soffice" --args ... This suggests the issue is in the direct startup path / app registration on newer macOS, not in document conversion itself. Could this bug be reopened, or should I file a new bug and mark it as related/regression on newer macOS? I can attach .ips crash reports from both Fresh and Still. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #10 from CHEN Kai --- Created attachment 205789 --> https://bugs.documentfoundation.org/attachment.cgi?id=205789&action=edit crash report -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Buovjaga changed: What|Removed |Added Resolution|WORKSFORME |FIXED -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #9 from Hossein --- (In reply to Buovjaga from comment #8) > We don't know the exact fixing commit, so fixed is the wrong status. At least for this specific bug, things are somehow clear. It was related to the lack of headless mode support in VCL, which is, as you know, fixed in 5d4a689293d47c7671315452f6b90a185fe809c0 and 857a760f317ad6540a6f03169ef8dda97d2c1de7 among others. The build was broken, and then got fixed in d6773eccb382c0c6b9d78f406c96230c5f40f44c. Therefore, I think this can be safely marked as Resolved/Fixed. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Buovjaga changed: What|Removed |Added Resolution|FIXED |WORKSFORME --- Comment #8 from Buovjaga --- We don't know the exact fixing commit, so fixed is the wrong status. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Hossein changed: What|Removed |Added Blocks||103266 Referenced Bugs: https://bugs.documentfoundation.org/show_bug.cgi?id=103266 [Bug 103266] [META] Command line bugs and enhancements -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Hossein changed: What|Removed |Added Blocks||170933 Referenced Bugs: https://bugs.documentfoundation.org/show_bug.cgi?id=170933 [Bug 170933] [META] Headless mode -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Hossein changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #7 from Hossein --- (In reply to Christian Schmitz from comment #6) > So I may wait for 26.8 being available. > If a nightly build or similar is available, I'd love to try it. You may find nightly builds here: https://dev-builds.libreoffice.org/daily/master/ As per above discussions, I close down the bug as Resolved/Fixed. If the problem persists, feel free to re-open it. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #6 from Christian Schmitz --- Thanks for testing. I just tried 25.8.4.2 again. This still calls 16 AppKit 0x19c89fd10 -[NSComboBoxCell initPopUpWindow] + 892 17 AppKit 0x19c8f12d4 -[NSComboBoxCell initTextCell:] + 100 18 libvclplug_osxlo.dylib 0x1088a7f74 AquaSalInstance::AquaSalInstance() + 440 19 libvclplug_osxlo.dylib 0x1088a7d4c create_SalInstance + 248 even if I pass --headless, so maybe this version doesn't do it. So I may wait for 26.8 being available. If a nightly build or similar is available, I'd love to try it. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #5 from Hossein --- (In reply to Christian Schmitz from comment #4) > When you try to debug this, you need to run on macOS without GUI logged in. > Like login via ssh remotely to a Mac where nobody is logged in on the GUI. > > Did you try that? Thanks for describing the problem in more detail. Previously I was testing with a user logged on. But, now I tested in the scenario that you described, without logging in: Latest LO 25.8 stable hangs (and not crashes): Version: 25.8.3.2 (AARCH64) Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e CPU threads: 10; OS: macOS 26.2; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Upon logging in, retrying the same command works as expected. % /Applications/LibreOffice.app/Contents/MacOS/soffice --convert-to pdf --safe-mode --headless --nologo --safe-mode --outdir /tmp/test /tmp/test.docx soffice[59692:1326884] +[NSXPCSharedListener endpointForReply:withListenerName:replyErrorCode:]: an error occurred while attempting to obtain endpoint for listener 'ClientCallsAuxiliary': Connection interrupted And it hangs at this point. But latest LO 26.8 dev master compiled with --headless works fine. % instdir/LibreOfficeDev.app/Contents/MacOS/soffice --convert-to pdf --safe-mode --headless --nologo --safe-mode --outdir /tmp/test /tmp/test.docx Fontconfig warning: no elements found. Check configuration. Fontconfig warning: adding /@.__OOO/var/cache/fontconfig Fontconfig warning: adding fontconfig warn:writerfilter.dmapper:59748:1328413:sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:1415: this should happen at a section context end ... warn:legacy.osl:59748:1328413:oox/source/helper/storagebase.cxx:67: StorageBase::StorageBase - missing base input stream convert /tmp/test.docx as a Writer document -> /private/tmp/test/test.pdf using filter : writer_pdf_Export warn:vcl.schedule.deinit:59748:1328413:vcl/source/app/scheduler.cxx:181: DeInit task: Timer a: 1 p: 7 desktop::Desktop m_firstRunTimer 3000ms (0x16f853080) (ignored) warn:vcl.schedule.deinit:59748:1328413:vcl/source/app/scheduler.cxx:202: DeInit active tasks: 1 (ignored: 1) warn:sal.osl.pipe:59748:1328413:sal/osl/unx/pipe.cxx:354: shutdown() failed: ENOTCONN warn:sal.osl.pipe:59748:1328420:sal/osl/unx/pipe.cxx:400: accept() failed: ECONNABORTED I built LO again without --enable-headless to see the difference. The same hang happens in this case: % /Applications/LibreOffice.app/Contents/MacOS/soffice --convert-to pdf --safe-mode --headless --nologo --safe-mode --outdir /tmp/test /tmp/test.docx 2026-01-22 06:44:42.009 soffice[51719:1540934] +[NSXPCSharedListener endpointForReply:withListenerName:replyErrorCode:]: an error occurred while attempting to obtain endpoint for listener 'ClientCallsAuxiliary': Connection interrupted Hang happens here. You may add the following configuration options, and test yourself with the latest sources: https://wiki.documentfoundation.org/Development/BuildingOnMac --enable-headless --without-system-fontconfig --without-system-freetype Therefore, the problem seems to be fixed, and will be available once LibreOffice is shipped with headless mode enabled. I will ask for adding --enable-headless in the futures builds, and then close this bug report as RESOLVED/FIXED, if there are no objections. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #4 from Christian Schmitz --- When you try to debug this, you need to run on macOS without GUI logged in. Like login via ssh remotely to a Mac where nobody is logged in on the GUI. Did you try that? The crash happens way before any file is loaded. The key thing is that some background GUI service is not running, so creating Cocoa controls fails. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #3 from Hossein --- (In reply to Christian Schmitz from comment #1) > Call is e.g. > > /Applications/LibreOffice.app/Contents/MacOS/soffice --convert-to pdf > --safe-mode --headless --nologo --safe-mode --outdir /tmp/test /tmp/test.docx > > I added safe mode and no logo, but that didn't help. The above command works fine for me over ssh to localhost, after enabling it in "System Preferences > Sharing > Remote Login" in macOS: Version: 25.8.3.2 (AARCH64) Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e CPU threads: 10; OS: macOS 26.2; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Also, for LibreOfficeDev, built without --enable-headless: $ instdir/LibreOfficeDev.app/Contents/MacOS/soffice --convert-to pdf --safe-mode --headless --nologo --safe-mode --outdir /tmp/test /tmp/test.docx Version: 26.8.0.0.alpha0+ (AARCH64) Build ID: d0265596672d78ad6f3980ff6fb900535aefd11f CPU threads: 10; OS: macOS 26.2; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded I used a very simple docx file with a few characters in it. Is it possible that you share the docx file? The crash can be related to that. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 Buovjaga changed: What|Removed |Added CC||ilmari.lauhakangas@libreoff ||ice.org --- Comment #2 from Buovjaga --- I wonder, if a build with --enable-headless would help. Support for macOS was just added, see 5d4a689293d47c7671315452f6b90a185fe809c0 and other commits in the relation chain. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 169711] Crash on macOS when running LibreOffice headless via Terminal without GUI
https://bugs.documentfoundation.org/show_bug.cgi?id=169711 --- Comment #1 from Christian Schmitz --- Call is e.g. /Applications/LibreOffice.app/Contents/MacOS/soffice --convert-to pdf --safe-mode --headless --nologo --safe-mode --outdir /tmp/test /tmp/test.docx I added safe mode and no logo, but that didn't help. -- You are receiving this mail because: You are the assignee for the bug.
