Bug 152648 - Hang pressing Calc button in Start Center with Voice Over enabled (macOS)
Summary: Hang pressing Calc button in Start Center with Voice Over enabled (macOS)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All macOS (All)
: medium normal
Assignee: Patrick Luby (volunteer)
URL:
Whiteboard: target:7.6.0 target:7.5.0.2
Keywords: notBibisectable, regression
Depends on:
Blocks:
 
Reported: 2022-12-22 23:07 UTC by Telesto
Modified: 2023-01-12 16:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Apple stack trace on hang. (2.46 MB, text/plain)
2023-01-09 11:07 UTC, Alex Thurgood
Details
A spreadsheet with several thousand cells for testing VoiceOver (10.75 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-01-09 23:15 UTC, Patrick Luby (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-12-22 23:07:23 UTC
Description:
Hang pressing Calc button in Start Center with Voice Over enabled (macOS)

Steps to Reproduce:
1. Activate Accessibility -> Voice Over
2, Lauch LibreOffice
3. Click Calc button to launch calc

Actual Results:
Hang

Expected Results:
No freeze


Reproducible: Always


User Profile Reset: No

Additional Info:
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
Comment 1 Alex Thurgood 2023-01-09 11:06:38 UTC
Confirming.

Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: 17a8cb1573c5b75e5b7a6c480e09c681edcc26c0
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

Enclosing Apple Trace.

Looks very similar to previous aqua ally callbacks which caused crashing and which Patrick fixed elsewhere ?
Comment 2 Alex Thurgood 2023-01-09 11:07:02 UTC
Created attachment 184539 [details]
Apple stack trace on hang.
Comment 3 Patrick Luby (volunteer) 2023-01-09 14:13:09 UTC
(In reply to Alex Thurgood from comment #1)
> Enclosing Apple Trace.
> 
> Looks very similar to previous aqua ally callbacks which caused crashing and
> which Patrick fixed elsewhere ?

I can also reproduce this hang. Like in your stack trace, I see a hang in the following LibreOffice accessiblity function in the middle of the stack trace:

-[AquaA11yTableWrapper rowsAttribute]

Everything below that is adding an NSView to the window. A quick look at that code and it looks like it is adding a separate NSView to the window for every cell in a spreadsheet. Adding NSViews is slow so it looks like LibreOffice is working through a huge list of cells.

I will have to look deeper at the code as there is a hardcoded 1000 cell limit which would slow, but eventually LibreOffice would unhang. Maybe that limit needs to be drastically lower. I'll post when I have some more data.
Comment 4 Patrick Luby (volunteer) 2023-01-09 23:15:36 UTC
Created attachment 184549 [details]
A spreadsheet with several thousand cells for testing VoiceOver

I think that I have fixed the hang in @ Alex Thurgood's stack trace in the following patch:

https://gerrit.libreoffice.org/c/core/+/145245

The patch still needs to be reviewed and tested before it appears in a nightly build, but the patch definitely eliminates the hang when opening a new, empty Calc document for me.

Also, I have uploaded a simple Calc spreadsheet with several thousand cells that can be used as a stress test LibreOffice's accessibility code.
Comment 5 Commit Notification 2023-01-10 06:54:04 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d96c98647511b6c1f1d1d9a969df39f859cc0696

tdf#152648 Handle overflow when multiplying rows and columns

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.
Comment 6 Commit Notification 2023-01-10 14:49:59 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/7a7a831809fdcf8a25b907ab7f576cb5210d7b47

tdf#152648 Handle overflow when multiplying rows and columns

It will be available in 7.5.0.2.

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.
Comment 7 Alex Thurgood 2023-01-12 16:14:00 UTC
Verified fixed in

Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: d2a27ceece84998c686477ffd2073f3516b568a7
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


Thanks again Patrick !