Hi everyone, A user reported that LibreOffice 24.2.7 always crashes on the Mac: https://old.reddit.com/r/libreoffice/comments/1ggi4sc/libreoffice_2427_is_now_available_the_last/luvd3iw/ I have found the same crash happening on all of my Silicon Mac machines running Sonoma and Sequoia. Installing the Intel installation on my Silicon Mac machines and running with Rosetta 2 doesn’t crash, only the Silicon Mac installation crashes. This crashing looks like it will affect most Silicon Mac users. Not sure if it will affect Mac App Store users as the Mac App Store is still stuck at LibreOffice 24.2.5 but it is probably prudent to assume that this same crash will happen for Mac App Store builds as well. So I checked out commit 60d4b3fb5e3fa9db8a102b04aa0025f2052bc02d and did clean release and codesigned builds on the following two platforms but I am unable to reproduce the bug in either of my local builds: - macOS Sonoma 14.7.1 with Xcode 15.4 - macOS Sequoia 15.1 with Xcode 16.1 I used the following options in my autogen.input: --with-hamcrest=/opt/hamcrest/hamcrest-2.2.jar --with-myspell-dicts --with-lang=de fr ja --enable-release-build --enable-online-update --with-privacy-policy-url=http://blah.com --with-package-format=dmg --enable-macosx-code-signing So is TDF release engineering using any different autogen.input options or using different macOS and/or Xcode versions that me? If yes, I can do a rebuild and see if I can reproduce the crash. If no, does anyone have any ideas what might be different between my builds and TDF’s? Debug data: I was able to recodesign the LibreOffice 24.2.7 download and add the necessary entitlement so that I connect lldb. I got a backtrace (see attached lldb_bt.txt file) and it seems to me that the crash is occurring when VCLXMenu::addMenuListener() calls std::unique_lock aGuard( maMutex ) which calls std::mutex::lock(). In the official Silicon Mac installation that crashes, pthread_mutex_lock() is passed a garbage address. It’s always 0x40 so I am guessing that is a data member of some parent class that std::mutex holds and that parent instance is a nullptr. It’s as if std::mutex is failing to fully initialize itself but only in this one official installer. Any theories or ideas welcome. Patrick
(lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x40) * frame #0: 0x000000018fa498e0 libsystem_pthread.dylib`pthread_mutex_lock + 12 frame #1: 0x000000018f986758 libc++.1.dylib`std::__1::mutex::lock() + 16 frame #2: 0x0000000102eecfb0 libtklo.dylib`VCLXMenu::addMenuListener(com::sun::star::uno::Reference<com::sun::star::awt::XMenuListener> const&) + 36 frame #3: 0x00000001019bce9c libsvtlo.dylib`svt::PopupMenuControllerBase::setPopupMenu(com::sun::star::uno::Reference<com::sun::star::awt::XPopupMenu> const&) + 320 frame #4: 0x000000010134ade4 libfwklo.dylib`framework::MenuBarManager::CreatePopupMenuController(framework::MenuBarManager::MenuItemHandler*, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&) + 1236 frame #5: 0x00000001013462ac libfwklo.dylib`framework::MenuBarManager::FillMenuManager(Menu*, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, bool) + 2472 frame #6: 0x00000001013469cc libfwklo.dylib`framework::MenuBarManager::MenuBarManager(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::util::XURLTransformer> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, Menu*, bool, bool) + 404 frame #7: 0x0000000101351e98 libfwklo.dylib`framework::MenuBarWrapper::initialize(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) + 828 frame #8: 0x00000001013adaf4 libfwklo.dylib`framework::MenuBarFactory::CreateUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, std::__1::basic_string_view<char16_t, std::__1::char_traits<char16_t>>, com::sun::star::uno::Reference<com::sun::star::ui::XUIElement> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) + 2100 frame #9: 0x00000001013ad218 libfwklo.dylib`framework::MenuBarFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) + 204 frame #10: 0x00000001013b35b0 libfwklo.dylib`(anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) + 508 frame #11: 0x0000000101293428 libfwklo.dylib`framework::LayoutManager::implts_createElement(rtl::OUString const&) + 288 frame #12: 0x000000010129250c libfwklo.dylib`framework::LayoutManager::implts_createMenuBar(rtl::OUString const&) + 232 frame #13: 0x000000010129b200 libfwklo.dylib`framework::LayoutManager::createElement(rtl::OUString const&) + 476 frame #14: 0x0000000101c91c78 libsfxlo.dylib`SfxDispatcher::SetMenu_Impl() + 400 frame #15: 0x0000000101c903a4 libsfxlo.dylib`SfxDispatcher::Update_Impl(bool) + 696 frame #16: 0x0000000101ed2cf0 libsfxlo.dylib`SfxBaseController::ConnectSfxFrame_Impl(SfxBaseController::ConnectSfxFrame) + 1268 frame #17: 0x0000000101ed25e0 libsfxlo.dylib`SfxBaseController::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) + 572 frame #18: 0x0000000101ec18d8 libsfxlo.dylib`utl::ConnectFrameControllerModel(com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController2> const&, com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&) + 292 frame #19: 0x0000000101ebeef4 libsfxlo.dylib`(anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) + 7436 frame #20: 0x00000001012c2224 libfwklo.dylib`framework::LoadEnv::impl_loadContent() + 2964 frame #21: 0x00000001012bf504 libfwklo.dylib`framework::LoadEnv::start() + 136 frame #22: 0x00000001012bdfe4 libfwklo.dylib`framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) + 1312 frame #23: 0x0000000101214ed4 libfwklo.dylib`framework::LoadDispatcher::impl_dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) + 748 frame #24: 0x00000001012153ec libfwklo.dylib`non-virtual thunk to framework::LoadDispatcher::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) + 48 frame #25: 0x0000000101bfc40c libsfxlo.dylib`implDispatchDelayed(void*, void*) + 40 frame #26: 0x0000000104b12cf4 libvcllo.dylib`ImplHandleUserEvent(ImplSVEvent*) + 48 frame #27: 0x0000000104b10de8 libvcllo.dylib`ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) + 532 frame #28: 0x00000001069caf40 libvclplug_osxlo.dylib`non-virtual thunk to AquaSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) + 44 frame #29: 0x0000000104daad6c libvcllo.dylib`SalUserEventList::DispatchUserEvents(bool) + 720 frame #30: 0x00000001069cb560 libvclplug_osxlo.dylib`AquaSalInstance::DoYield(bool, bool) + 388 frame #31: 0x0000000104df19e8 libvcllo.dylib`Application::Yield() + 96 frame #32: 0x0000000104df1964 libvcllo.dylib`Application::Execute() + 176 frame #33: 0x0000000100258498 libsofficeapp.dylib`desktop::Desktop::Main() + 2632 frame #34: 0x0000000104df91ec libvcllo.dylib`ImplSVMain() + 392 frame #35: 0x00000001069cafe0 libvclplug_osxlo.dylib`AquaSalInstance::handleAppDefinedEvent(NSEvent*) + 96 frame #36: 0x00000001069fe080 libvclplug_osxlo.dylib`-[VCL_NSApplication sendEvent:] + 92 frame #37: 0x0000000193bac89c AppKit`-[NSApplication _handleEvent:] + 60 frame #38: 0x0000000193652b08 AppKit`-[NSApplication run] + 520 frame #39: 0x0000000193629364 AppKit`NSApplicationMain + 888 frame #40: 0x00000001069cd010 libvclplug_osxlo.dylib`AquaSalInstance::SVMainHook(int*) + 152 frame #41: 0x0000000104df91c8 libvcllo.dylib`ImplSVMain() + 356 frame #42: 0x00000001002821fc libsofficeapp.dylib`soffice_main + 216 frame #43: 0x0000000100003f40 soffice`main + 20 frame #44: 0x000000018f6cc274 dyld`start + 2840