Bug 149807 - Libreoffice Calc regularly/randomly hangs on macOS mojave
Summary: Libreoffice Calc regularly/randomly hangs on macOS mojave
Status: RESOLVED DUPLICATE of bug 148435
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.5.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-01 13:13 UTC by MattP
Modified: 2023-02-09 08:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
macos hang report from macos error reporter (2.88 MB, text/plain)
2022-07-01 13:14 UTC, MattP
Details
Sampling file 1 (142.46 KB, text/plain)
2022-09-07 14:20 UTC, Vincent Boudry
Details
Sampling file 2 (142.34 KB, text/plain)
2022-09-07 14:20 UTC, Vincent Boudry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MattP 2022-07-01 13:13:33 UTC
Description:
Libreoffice Calc regularly/randomly hangs on macOS mojave and has to be force-quit, recovered and data re-entered.



Steps to Reproduce:
Open a new calc spreadsheet.
Copy and paste URLs from chrome address bar into various cells (no idea if chrome or copy/paste has anything to do with it).
After a few copy and pastes LO/Calc hangs (spinning wheel).  
Can leave it for 30 minutes and it is still the spinning beachball of death.
Eventually have to "force quit" and start/recover documents.  
I get the apple error reporter but no libreoffice error reporter because it is a hang and so I guess the LO crash reporter also can't come up before the force quit from macos side.

Sometimes just right clicking on a cell causes the hang (was trying to test mouse paste vs keyboard paste).  Didn't get to paste, just the mouseclick caused hang.

Paste unformatted doesn't make a difference.

Restarted in safe mode and created a new Calc document... I could still reproduce in safe mode.  I did not reset my profile because the docs (https://wiki.documentfoundation.org/UserProfile#Help_wizard_.28LibreOffice_5.3_and_newer.29) say if the problem is reproducible in safe-mode that the user profile is not the problem.

Problem is also present on 7.3.X.  I just downgraded to 7.2 hoping the problem would go away.

Hardware acceleration is disabled.
Skia is disabled (in the 7.3 version that had the issue).


macos Mojave
2012 Macbook pro
external monitor via thunderbolt 2 dock
No clipboard management apps.

I can't reproduce this in predictable steps because it isn't clear exactly what is triggering the hang.  ...but it is happening often enough that I can't use Calc anymore because the hangs are frequent enough I have to constantly force-quit/recover and re-enter data lost since the last autosave.

I suspect it is some hardware/rendering bug specific to my hardware or macOS version.  I used Libreoffice for a long time with this hardware setup and it was rock solid (no crashes/hangs).  This has only become a problem in the last few months I guess.

I guess next step could be to downgrade minor version by minor version until the problem goes away so we at least know which commit-set introduced this.



Actual Results:
Libreoffice calc hangs regularly during mouse or clipboard interaction and has to be force quit.

Expected Results:
Calc should not hang


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Happy to provide system/hardware report but not sure what format you might want that in.  I can also provide the crash dump text that apple generates after the force quit.
Comment 1 MattP 2022-07-01 13:14:31 UTC
Created attachment 181070 [details]
macos hang report from macos error reporter
Comment 2 m_a_riosv 2022-07-01 18:20:05 UTC
Maybe a dup of https://bugs.documentfoundation.org/show_bug.cgi?id=148265
Comment 3 MattP 2022-07-06 13:19:50 UTC
The freeze happens regularly but not through predictable steps.  Sometimes on copy, sometimes just on mouse interaction.

But it happens a LOT.... so if you can give me some input on how to collect some more data that might help you track this down I'm happy to do that.  But I would need some input/instruction on what will help.
Comment 4 QA Administrators 2022-07-07 03:31:10 UTC Comment hidden (obsolete)
Comment 5 MattP 2022-08-21 10:24:26 UTC
This is still a regular issue.  When using libreoffice I have gotten in the habit of hitting cmd-s every 10 seconds or so to minimize loss of work.  

Happens at work and at home (both cases with thunderbolt 2 dock and external monitors, but not sure if that is relevant).

I'm happy to work with someone from the Libreoffice team to repro this and capture additional data that will help to pinpoint the cause of the hang.

Meanwhile I've had to subscribe to Microsoft office and get used to using Excel after 10 years without (I hate their interface).  Don't want to, but this regular hang and data loss issue gets in the way of work.

Anyway, just a reminder I'm happy to invest time on this bug with the right person from the Libreoffice team to get this resolved.

Still present in 7.3.5.2  probably latest alpha too, but I didn't check again.
Comment 6 Vincent Boudry 2022-09-07 14:19:22 UTC
I experience this behaviour as well, but already in version 7.2 :
in the middle of an edition, the application freezes.

As this seems rather random, it is hard to tackle.
My impression is that a click or mouse event (drag-drop) too close in time to a previous one is causing this, and that it is not only related to calc.

I attach two sampling files of LO while hanging taken a couple of seconds apart (they are probably very similar).  One can clearly see a mutex hanging there...

Best regards,
Vincent Boudry.
Comment 7 Vincent Boudry 2022-09-07 14:20:15 UTC
Created attachment 182283 [details]
Sampling file 1
Comment 8 Vincent Boudry 2022-09-07 14:20:51 UTC
Created attachment 182284 [details]
Sampling file 2
Comment 9 MattP 2022-09-12 08:07:56 UTC
For what it's worth, this doesn't just happen on mouse/keyboard interaction.
Often just opening a spreadsheet file is enough to hang at opening.
I have to force-quit and then usually tell it to delete locks/recovery-data and try again.

It has gotten so bad that I've abandoned LibreOffice because it happens so frequently.

I will be very happy to start using LibreOffice again once this bug is fixed.  I ran LO on Mojave for a long time without issue, so this bug was introduced at some point.  I'm stuck on Mojave (for now) due to needing support for some legacy 32 bit apps.

Maybe if I get some time I will step through old versions and try and figure out what build introduced this in the hope that more specific information will be enough for the team to address this.

If someone from the dev teams wants to repro/debug this with me, I'm happy to get on a screenshare session and do what needs to be done to track down the root cause.  I'm a webapp guy and don't have that much experience debugging native apps or LO in particular.
Comment 10 Michael Warner 2022-09-12 13:29:08 UTC
> Steps to Reproduce:
> Open a new calc spreadsheet.
> Copy and paste URLs from chrome address bar into various cells (no idea if
> chrome or copy/paste has anything to do with it).
> After a few copy and pastes LO/Calc hangs (spinning wheel).  

FWIW, I'm not able to reproduce this in:

Version: 7.4.0.2 / LibreOffice Community
Build ID: 1512ce97d7ed39dce3121f7e15651fd8895f950e
CPU threads: 10; OS: Mac OS X 12.5; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded



@MattP, if you are comfortable with using git, then the best way you can help debug this is to try and bibisect it to a range of commits or even a single commit. You can find instructions for this here:

https://wiki.documentfoundation.org/QA/Bibisect
Comment 11 Telesto 2023-02-09 08:54:24 UTC
(In reply to Vincent Boudry from comment #7)
> Created attachment 182283 [details]
> Sampling file 1

The problem shown in the sampling got fixed with LibreOffice 7.4.4 and newer
Comment 12 Telesto 2023-02-09 08:56:33 UTC

*** This bug has been marked as a duplicate of bug 148435 ***