Alternative workaround to macOS SIGABRT on exit?
Scott Kostyshak <[email protected]>
| Newsgroups | gmane.editors.lyx.devel |
|---|---|
| Message-ID | <abpZr5Kf6Vs_dahF@jimmy> |
On lyx-users Anders reports that the following does not trigger the issue: command-sequence buffer-close-all; lyx-quit This suggests the idea that we can just call buffer-close-all inside of lyx-quit, as done in the attached patch. Any thoughts? I have no strong opinion at all on this, and am fine to keep the code as is. Scott -- lyx-devel mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-devel
0001-Alternative-workaround-for-macOS-SIGABRT-on-exit.patch
(text/x-diff, 1.3 KB)
From baf781f63eb949315bfcc948fb933fabdc590b76 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak <[email protected]> Date: Wed, 18 Mar 2026 08:46:13 +0100 Subject: [PATCH] Alternative workaround for macOS SIGABRT on exit Anders confirms [1] that the following works well: command-sequence buffer-close-all; lyx-quit This commit just modifies LYX_QUIT to first call BUFFER_CLOSE_ALL on macOS. [1] https://www.mail-archive.com/search?l=mid&q=733DAA0A-C2E5-47E8-A7EA-0710F43F7952%40me.com --- src/frontends/qt/GuiApplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp index d658cec6cb..0ff17196b1 100644 --- a/src/frontends/qt/GuiApplication.cpp +++ b/src/frontends/qt/GuiApplication.cpp @@ -1800,8 +1800,9 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr) // FIXME: This fix should be removed once the problem is gone. #if defined(Q_OS_MACOS) && QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) if (QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::MacOS, 26)) - std::this_thread::sleep_for(std::chrono::seconds(2)); + lyx::dispatch(FuncRequest(LFUN_BUFFER_CLOSE_ALL)); #endif + // quitting is triggered by the gui code // (leaving the event loop). if (current_view_) -- 2.48.1
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEMfkICpsJzYuNuGlOA4ZnarZHC+sFAmm6Wi0ACgkQA4ZnarZH C+u+AQf/W6RLN5XpcWWMpQcvfZTGou3ecXb8rJ03HgqRweqAwxS83pEk0s5oGRQR duGlkN0CAfE2zI4WLcY4TIwZP/9gHxTxyhvA+o5zuFj8WJIRR2mdpQGd/LcDr+/V g9F5W3Gk6DFMhkmLCI+dmDefGAmP8De1G4V+7lQnVxqY8laYlFP3ziLHCUpomVu2 JwSfRpl7Z7c0UU7zGA1bfdjGWL3NeAXco1mDfT1NLzWhcNF33eZitQ3HS+p46lZT lyw4hrs6yyEV+mki8m1zdEPV6+H6ma3A1MSvGQxzQJcXDU/BJRXjZ3sLbMc6ACHS /wZFyRwPsqofBUBbQedjwJo4Yz8yPg== =EWKo -----END PGP SIGNATURE-----