I have had the same bug for about a year. It is on libre, neo and open offices. Keyboard viewer causes libreoffice to hang and crash. I thought you had (amost) fixed it in the previous version (maybe 7.4.4.7) where it just was a bit wonky at exit. But I’ve just installed 7.5.0 and it is as bad as ever.
After my original report I installed - Version: 7.4.5.1 / LibreOffice Community Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f CPU threads: 4; OS: Mac OS X 12.6.3; UI render: default; VCL: osx Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: default it doesn’t hang or crash. But sometimes on exit the LibreOffice 7.4 Document Recovery dialogue is presented without any files listed. If Keyboard Viewer is closed Calc operates normally. Let me know if you need any experiments run.
If the problem got worse in 7.5, you might clone the 7.5 binary bisecting repository and investigate: https://wiki.documentfoundation.org/QA/Bibisect/macOS https://wiki.documentfoundation.org/QA/Bibisect
(In reply to bz137195 from comment #0) > I have had the same bug for about a year. It is on libre, neo and open > offices. > Keyboard viewer causes libreoffice to hang and crash. I thought you had > (amost) fixed it in the previous version (maybe 7.4.4.7) where it just was a > bit wonky at exit. But I’ve just installed 7.5.0 and it is as bad as ever. Hello, Can you provide a link to the original bug report?
(In reply to Mike Little from comment #3) > (In reply to bz137195 from comment #0) > > I have had the same bug for about a year. It is on libre, neo and open > > offices. > > Keyboard viewer causes libreoffice to hang and crash. I thought you had > > (amost) fixed it in the previous version (maybe 7.4.4.7) where it just was a > > bit wonky at exit. But I’ve just installed 7.5.0 and it is as bad as ever. > > Hello, > Can you provide a link to the original bug report? This is the original bug report.
I bisected https://bibisect.libreoffice.org/mac64-7.1.git 76c416a97157d788f3048dd504fcf5b97be8c027 is the first bad commit commit 76c416a97157d788f3048dd504fcf5b97be8c027 Author: libreoffice <libreoffice@libreoffices-Mac-mini.local> Date: Tue Dec 1 17:39:28 2020 +0100 source 12e30b658d0adfd00c463be8a7f0d6cf91ee0974 source 12e30b658d0adfd00c463be8a7f0d6cf91ee0974 LibreOffice.app/Contents/Frameworks/libsmlo.dylib | Bin 1489384 -> 1489336 bytes LibreOffice.app/Contents/Resources/setuprc | 2 +- LibreOffice.app/Contents/Resources/versionrc | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) 7.2 and 7.3 also faulty
(In reply to bz137195 from comment #5) > I bisected https://bibisect.libreoffice.org/mac64-7.1.git > 76c416a97157d788f3048dd504fcf5b97be8c027 is the first bad commit > commit 76c416a97157d788f3048dd504fcf5b97be8c027 > Author: libreoffice <libreoffice@libreoffices-Mac-mini.local> > Date: Tue Dec 1 17:39:28 2020 +0100 > > source 12e30b658d0adfd00c463be8a7f0d6cf91ee0974 > > source 12e30b658d0adfd00c463be8a7f0d6cf91ee0974 > > LibreOffice.app/Contents/Frameworks/libsmlo.dylib | Bin 1489384 -> 1489336 > bytes > LibreOffice.app/Contents/Resources/setuprc | 2 +- > LibreOffice.app/Contents/Resources/versionrc | 2 +- > 3 files changed, 2 insertions(+), 2 deletions(-) > > 7.2 and 7.3 also faulty That commit only touches the Math application. Can you confirm it by doing in the 7.1 repository git checkout 76c416a97157d788f3048dd504fcf5b97be8c027 and testing if you get the hang. Then, git checkout HEAD~1 and testing if you get the hang. If you get the hang even after the second checkout, the bibisect result is not correct.
tested. hang at 76c416a97 no fault found at 7cda3bb08
Patrick: after a brief discussion in the dev chat, I'm Ccing you in case you are interested. It might be that the bibisect result is relevant after all.
Created attachment 186629 [details] Sample when Recover Document dialog is displayed
I can reproduce this in both LibreOffice 7.5.2.2 and the nightly build. Here are the steps that I did to reproduce the bug: 1. Open a new math formula document 2. Display the macOS Keyboard Viewer 3. Pu the cursor in the input area in the bottom half of the document 4. Input ASCII characters in Keyboard Viewer 5. Save the document using Command-S keys 6. Quit using Command-Q keys Sometimes it'll work, but sometimes the Recover Document dialog will appear during quitting. I took a sample in the Activity Monitor application when that dialog is display and no buttons are pressed in attachment 186629 [details]. In the sample, it looks like there is a crash in LibreOffice's accessibility code. Specifically, some memory is being deleted twice.
Thanks a lot. As the steps did not mention using Math, I thought the bibisect result was bogus.
(In reply to Buovjaga from comment #11) > Thanks a lot. As the steps did not mention using Math, I thought the > bibisect result was bogus. Maybe it is indirectly related, who knows? What I found was that when doing the steps in comment 10 was the only time that the catch block code was invoked in the accessibility code. The catch block is where I saw a release call on an autoreleased NSArray (the attributeNames variable was created with [NSMutableArray arrayWithObjects:], not [[NSMutableArray alloc] init:]): https://gerrit.libreoffice.org/c/core/+/150307/1/vcl/osx/a11ywrapper.mm Anyway, I'll commit the above patch if it passes gerrit's tests. I am not sure that the patch will fix this bug (I cannot reproduce the bug in my development build). So, if the bug still occurs in the next nightly build, can you take a sample in the Activity Monitor application when the Recover Document dialog appears?
Patrick Luby committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/127eacf630e1712fd5addcabed404b2d33752311 Related: tdf#153374 Don't release autoreleased attributeNames 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.
Tested: https://dev-builds.libreoffice.org/daily/master/MacOSX-x86_64@tb94-TDF/2023-04-13_04.17.00/LibreOfficeDev_7.6.0.0.alpha0_MacOS_x86-64_sdk.dmg Could not find fault. Thanks for your work.
Patrick, you can mark this bug as Assigned, Resolved, so on... As you consider the actual status of this bug.
Marking as resolved/fixed.
(In reply to bz137195 from comment #14) > Tested: > https://dev-builds.libreoffice.org/daily/master/MacOSX-x86_64@tb94-TDF/2023- > 04-13_04.17.00/LibreOfficeDev_7.6.0.0.alpha0_MacOS_x86-64_sdk.dmg > > Could not find fault. > Thank you for testing my fix. Marking as verified/fixed. If you see the crash again, feel free to reopen this bug.
Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/c10a242bf1c9c0460d0ed19f2925a91abd3d0c8b Related: tdf#153374 Don't release autoreleased attributeNames It will be available in 7.5.3. 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 have submitted https://bugs.documentfoundation.org/show_bug.cgi?id=155376 I’ve added this comment in case the new behaviour is related to your fix