Summary: | LibreOffice crashes/hangs when macOS onscreen keyboard is enabled (Arm64) M1 | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | CL <creede> |
Component: | Writer | Assignee: | Patrick Luby (volunteer) <guibomacdev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aron.budea, guibomacdev, iplaw67, kli.sarah, lo, telesto |
Priority: | medium | Keywords: | accessibility |
Version: | 7.6.0.0 alpha0+ | ||
Hardware: | x86-64 (AMD64) | ||
OS: | macOS (All) | ||
Whiteboard: | target:7.6.0 target:7.5.1 target:7.5.0 | ||
Crash report or crash signature: | ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: soffice [3689] Path: /Applications/LibreOfficeDev.app/Contents/MacOS/soffice Identifier: | Regression By: | |
Bug Depends on: | |||
Bug Blocks: | 133092 | ||
Attachments: |
Apple stack trace on hang
Apple Crash Trace with LO7.6alpha Apple Crash Trace with master build from 15/01/2023 crash log 7.6.0.0 x86 Mac |
Description
CL
2022-04-07 18:42:01 UTC
Unfortunately, LibreOffice is known not to work correctly with many of Apple's Accessibility tools (and even 3rd party tools). As you have pointed out, activating the onscreen keyboard causes LO to crash. This is unsurprising. LO on macOS has never kept up with Apple's changes to the APIs used to provide accessibility interfacing. Unfortunately, there is very little that is likely to happen here unless either a volunteer with lots of free time on their hands can come and revisit the whole LO accessibility code, or else someone with deep pockets has the money to finance the development. I have just tested this on 7.2.6.2 and was about to comment that it appeared to be working OK, but then I activated a LO dialog (the About dialog), and boom ! instant hang. Oh well, confirming. Created attachment 179783 [details]
Apple stack trace on hang
Enclosing a stack trace when LO hangs after activating the virtual onscreen keyboard and a dialog is displayed (in this case the LO About dialog).
*** Bug 152452 has been marked as a duplicate of this bug. *** No repro Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 8635c9aa8c6f1078a9e220076d5a08daf30077e8 CPU threads: 8; OS: Mac OS X 12.3.1; UI render: Skia/Metal; VCL: osx Locale: nl-NL (nl_NL.UTF-8); UI: en-US Calc: threaded (In reply to Telesto from comment #4) > No repro > Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community > Build ID: 8635c9aa8c6f1078a9e220076d5a08daf30077e8 > CPU threads: 8; OS: Mac OS X 12.3.1; UI render: Skia/Metal; VCL: osx > Locale: nl-NL (nl_NL.UTF-8); UI: en-US > Calc: threaded I get a hard crash with Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: ad387d5b984c6666906505d25685065f710ed55d CPU threads: 8; OS: Mac OS X 13.0.1; UI render: default; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded Let me try the very latest 7.6 dev build and see. Still crashing on Arm : Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: 17a8cb1573c5b75e5b7a6c480e09c681edcc26c0 CPU threads: 8; OS: Mac OS X 13.0.1; UI render: default; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded Created attachment 184321 [details]
Apple Crash Trace with LO7.6alpha
(In reply to Alex Thurgood from comment #6) > Still crashing on Arm : > > Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community > Build ID: 17a8cb1573c5b75e5b7a6c480e09c681edcc26c0 > CPU threads: 8; OS: Mac OS X 13.0.1; UI render: default; VCL: osx > Locale: fr-FR (fr_FR.UTF-8); UI: en-US > Calc: threaded That's master build from 22/12/2022. I can't reproduce, I can't confirm the issue in question. No crash. Tested latest Pre-Release, Release Candidate version 7.4.4 RC1 (2022-12-21): Version: 7.4.4.1 / LibreOffice Community Build ID: 988f4a351a6fa8cf4bdf2bdc873ca12cf8cbe625 CPU threads: 10; OS: Mac OS X 13.1; UI render: default; VCL: osx Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded Tested latest daily master version (2022-12-22): Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: 8635c9aa8c6f1078a9e220076d5a08daf30077e8 CPU threads: 10; OS: Mac OS X 13.1; UI render: Skia/Metal; VCL: osx Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded % uname -m arm64 % machine arm64e % sw_vers ProductName: macOS ProductVersion: 13.1 BuildVersion: 22C65 % sw_vers -ProductName macOS % sw_vers -ProductVersion 13.1 % sw_vers -BuildVersion 22C65 (In reply to Sierk Bornemann from comment #9) Hi Sierk, > I can't reproduce, I can't confirm the issue in question. No crash. > CPU threads: 10; OS: Mac OS X 13.1; UI render: Skia/Metal; VCL: osx I thought that this might be a difference between our two configs (I had Skia rendering disabled), but I activated Skia rendering, and it still crashes as soon as I click on any key of the virtual onscreen keyboard. The only other immediate difference that I can see is that I'm on 13.0.1 with my Macbook Pro, and you've already moved to 13.1 Very strange. % uname -m arm64 % machine arm64e % sw_vers ProductName: macOS ProductVersion: 13.0.1 BuildVersion: 22A400 I think I know what is causing this bug. The stack trace in attachment 179783 [details] is caused by issue 148435 but attachment 184321 [details] looks like a real bug in the LibreOffice accessibility code. The trigger for this bug is that you have to using macOS accessibility (or some tool that uses it). Is it possible to upload another stack trace with a recent nightly build? Created attachment 184679 [details] Apple Crash Trace with master build from 15/01/2023 Master build tested from buildbot https://dev-builds.libreoffice.org/daily/master/MacOSX-aarch64@tb92-TDF/current/ with 15/01/2023 Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: d50eca2a30bdabdc1735c590d6ec1913c6dd22fd CPU threads: 8; OS: Mac OS X 13.0.1; UI render: Skia/Metal; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded I can reproduce this bug in the latest nightly build and in my local build. Note: I had to rebuild my local build without debug enabled before I could reproduce the bug. It appears to me that a string is getting deleted (presumably by another thread) while LibreOffice's accessibility code is still using the same string. Adding a SolarMutexGuard at the beginning of the accessibility function where the crash occurs stops the crashing. So, I think the problem is that many of the accessibility calls do not lock the application lock. I will go through all of the standard macOS accessibility functions that LibreOffice has implemented and add SolarMutexGuard calls where appropriate. Patrick Luby committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/de1d75a0cd25f239cdc751dec75c9019fbcabd8e tdf#148453 Fix crash by turning off optimization for Objective-C selector It will be available in 7.6.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. Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/92d7325faac0ea005b373846cffbf87095abb525 tdf#148453 Fix crash by turning off optimization for Objective-C selector It will be available in 7.5.1. 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. My fix is now in the nightly master build. Can anyone verify that this bug is fixed? Verified fixed in Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: 7f23dae00fedc9d7119b44b6c44d9eca4f8c87b8 CPU threads: 8; OS: Mac OS X 13.0.1; UI render: Skia/Metal; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-7-5-0": https://git.libreoffice.org/core/commit/7d09f9f54af7081991e37cb828e07cd759aa5d0d tdf#148453 Fix crash by turning off optimization for Objective-C selector It will be available in 7.5.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. I could reproduce the bug on my Intel Mac with the 7.6.alpha build (In reply to Stefan Fuhrmann from comment #19) > I could reproduce the bug on my Intel Mac with the 7.6.alpha build I cannot reproduce the bug on my Silicon Mac with the May 28 nightly build: Version: 7.6.0.0.alpha1+ (AARCH64) / LibreOffice Community Build ID: 7e3ddf1e5aae5e4e956495e3d86a8cbf6e251b5e CPU threads: 8; OS: Mac OS X 12.6.5; UI render: default; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Can anyone who can still reproduce this bug attach a crash log or Activity Monitor sample? attaching the crash log Created attachment 187558 [details]
crash log 7.6.0.0 x86 Mac
(In reply to Stefan Fuhrmann from comment #22) > Created attachment 187558 [details] > crash log 7.6.0.0 x86 Mac Thank you for the crash log. It looks the same as the crash logs we are seeing in issue 146626. If you have any specific steps that you do that trigger the crash, can you post them? I have not been able to reproduce issue 146626 on my Mac Silicon so any steps you have might help. Forgot to add a link for issue 146626: https://bugs.documentfoundation.org/show_bug.cgi?id=146626 Thank you for your reply. Looking at your aforementioned bug, "my" bug has nothing to do with Calc (have not tried to reproduce the bug with Calc) or with saving the document. Steps I took, to reproduce the crash. 1. Open Writer and work on it. Writing, Set Paragraph Style. Nothing happens. I can work as long as I want. 2. Open the keyboard viewer. 3. Go back to Writer. As soon as a start scrolling with the mouse inside the document, Writer crashes. thanks again for taking the time! Thank you for the steps. I can now reproduce the crash. I have posted my slightly modified steps over in issue 148453: https://bugs.documentfoundation.org/show_bug.cgi?id=146626#c36 I will reset this bug as resolved/fixed and continue posting my debugging efforts over in issue 148453. |