Download it now!
Bug 125241 - Loading a large autocorrect replacement table causes freezing in 6.2.x
Summary: Loading a large autocorrect replacement table causes freezing in 6.2.x
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.2.5 target:6.3.0
Keywords: bibisectRequest, perf, regression
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2019-05-12 17:48 UTC by Telesto
Modified: 2019-05-21 09:33 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
WinDbg stack trace of hung soffice.bin (TB39 symbols) when loading large list (16.40 KB, text/plain)
2019-05-17 05:39 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2019-05-12 17:48:28 UTC
Description:
Spin-off: bug 109158 comment 35
There's an important performance regression since the 6.2.x branch.

trying to load large autocorrect replacement tables  such as the one in attachment 134684 [details] causes freezing in LibO 6.2.0 and 6.2.3 final releases

Steps to Reproduce:
1. Download attachment 134684 [details]
2. Copy it into instdir\share\autocorr dir
3. Launch Writer
4. Tools -> Autocorrect -> Autocorrect options. Load Italian (Italy)

Note: there is already an older - similar - issue in 6.1.5. Load the Italian (Italy), switch to a different one (say Italy Switzerland) and back to Italian.. -> Same hang.

The difference:  The list can be loaded with no problems in latest 6.1.5 release. Now it's completely broken


Actual Results:
Freeze

Expected Results:
No hang


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.0.0.alpha0+
Build ID: 91b2239783dc716bd71ce7962bfd7e341dfe4175
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-05-08_09:49:32
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: threaded
Comment 1 Telesto 2019-05-16 10:05:27 UTC
Note:
For me loading appears to be successful (the replacement table does show). However when scrolling the list of replacements the hang occurs. Also will the dialog still show Dutch language after selecting Italian
Comment 2 tommy27 2019-05-17 05:08:18 UTC
my list is an italian auto-correct list.

the hang happens when loading the italian list.

since the table loads the latest used language, I suppose that in your case it loads the Dutch language at first (which is succesfull) then it hangs while trying to load the italian one from the language menu.

try removing that large italian list and use the default italian autocorrect subset. then replace the default with my list and try to releoad the replacement table.

in that case it will try to load at first the italian which is the last loaded list and the hang will appear
Comment 3 V Stuart Foote 2019-05-17 05:39:17 UTC
Created attachment 151476 [details]
WinDbg stack trace of hung soffice.bin (TB39 symbols) when loading large list
Comment 4 V Stuart Foote 2019-05-17 06:02:02 UTC
(In reply to tommy27 from comment #2)
> my list is an italian auto-correct list.
> 
> the hang happens when loading the italian list.
> 
So, simply rename the list to match local. For example I just copied the ~4MB acor_it-IT.dat into the share/autocorr directory of a parallel install. But named it acor_en-US.dat so it is picked up on load without fuss.

The WinDbg StackTrace shows load is building the SVTreeList for the dialog when it freezes before opening the dialog.
Comment 5 Caolán McNamara 2019-05-17 09:13:57 UTC
https://gerrit.libreoffice.org/#/c/72450/ will address the most part of this
Comment 6 Commit Notification 2019-05-17 14:47:41 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/e4576e3da166b97c5c5b2d72903d51bddc04780f%5E%21

tdf#125241 SvTreeListBox has a separate SetUpdateMode

It will be available in 6.2.5.

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 tommy27 2019-05-18 05:38:56 UTC
thanks Caolan. I confirm it's fixed in LibO 6.2.5.0.0+ (x64)
Build ID: 21e1aa9d6b13b39b87435f8998c7ea6123a069fd
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:libreoffice-6-2, Time: 2019-05-17_23:24:18
Locale: it-IT (it_IT); UI-Language: en-US
Calc: threaded
Comment 8 V Stuart Foote 2019-05-18 12:35:42 UTC
Yep, fixed against 6.2.5, but still a wip for master/6.3.0 where Caolán is doing some refactoring that should fix this and the original bug 109158

Stay tuned...
Comment 9 Commit Notification 2019-05-18 20:41:42 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/633adcfea2fbf455e4ab841744d8ae61869af34b%5E%21

Related: tdf#125241 for gtk use fixed height and width in huge list case

It will be available in 6.3.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 10 V Stuart Foote 2019-05-19 03:45:40 UTC
(In reply to Commit Notification from comment #9)
his mornings TB42 build of master/6.3.0 still hanging, https://gerrit.libreoffice.org/#/c/72450/ is still cooking
Comment 11 Commit Notification 2019-05-20 07:53:02 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/688c5b8d64797596ee9826c3288824b5354a44a9%5E%21

tdf#125241 SvTreeListBox has a separate SetUpdateMode

It will be available in 6.3.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 12 Commit Notification 2019-05-21 09:33:57 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/eaa01effbcf34d2984f1bd1a8002479c717d82a2%5E%21

Related: tdf#125241 for gtk use fixed height and width in huge list case

It will be available in 6.2.5.

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.