Bug 155939 - LibreOffice-7.5.4.2 Writer hangs when changing language of text
Summary: LibreOffice-7.5.4.2 Writer hangs when changing language of text
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.4.2 release
Hardware: x86-64 (AMD64) All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.5 target:24.2.0 target:7.6...
Keywords: bibisected, bisected, regression
: 156127 156185 156385 156535 156588 (view as bug list)
Depends on:
Blocks: Languages
  Show dependency treegraph
 
Reported: 2023-06-20 03:28 UTC by sunils
Modified: 2024-03-04 05:28 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshots of the issue. (457.70 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-06-21 06:55 UTC, sunils
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sunils 2023-06-20 03:28:35 UTC
Description:
Libreoffice Writer, 7.5.4.2 (x86_64), Linux Mint.
Tools -> Language -> For All text -> English(UK)
LO hangs and CPU utlised by soffice process keeps going up.
Can work only after restarting libreoffice.
Crash recovery fails for open files.

Steps to Reproduce:
1.Open a text document (.docx/.odt)
2.Tools -> Language -> For All text -> English(UK) (or any language)
3.

Actual Results:
LibreOffice hangs

Expected Results:
Dictionary selected should change to the chose one.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Resetting the profile did not help.
Comment 1 Stéphane Guillou (stragu) 2023-06-20 09:25:16 UTC
I can't reproduced on Ubuntu 20.04 with:

Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (en_AU.UTF-8); UI: en-US
Calc: threaded

I tested with languages that had or didn't have a dictionary.

Can you please share the information copied from Help > About LibreOffice?
Comment 2 sunils 2023-06-21 06:55:37 UTC
Created attachment 188030 [details]
Screenshots of the issue.

1. Version nformation

Version: 7.5.4.2 (X86 64) /LibreOffice Community
Build: 36CCfdc35048bo57fd9854c75...
Environment: CPU threads: 8; OS: Linux 5.4
User Interface: Ul render: default; VCL: gtk3
Locale: enHN (en IN); Ul: en-US
Misc Calc: threaded

(https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h=36ccfdc35048b057fd9854c757a8b67ec53977b6)

2. I was unable to reproduce the issue today in most of the documents. It is still observable in one - which came from MS Office / Windows (version details unavailable). Have attached screen shots of the issue.
Comment 3 Stéphane Guillou (stragu) 2023-06-21 09:55:15 UTC
Thank you.
I could reproduce using attachment 188030 [details]:

0. "Tools > Options > Language Settings > Languages > Default Languages for Documents" set to English (India).
1. Tools > Language > For all text > Reset to Default Language

Result: LibreOffice freezes. I have to force quit.
Does not happen with "For selection" nor with "For paragraph".

Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (en_AU.UTF-8); UI: en-US
Calc: threaded

Also hangs if I got to "Tools > Options > Language Settings > Languages > Default Languages for Documents" and change the default language.

Not in 7.4:

Version: 7.4.7.2 / LibreOffice Community
Build ID: 723314e595e8007d3cf785c16538505a1c878ca5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Bibisected with linux-64-7.6 repo to first bad commit f1a96fd89ea899d23d2e4280522395b6ec89242e which points to core commit:

commit d81379db730a163c5ff75d4f3a3cddbd7b5eddda
author	Michael Stahl <michael.stahl@allotropia.de>	Mon May 08 16:38:03 2023 +0200
committer	Michael Stahl <michael.stahl@allotropia.de>	Tue May 09 10:34:40 2023 +0200
tdf#154877 sw: generalise ExtendedSelectAll()
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151544

In 7.5, was cherrypicked as ad03ed5106499f74b38da28489a9352ce3f01d1a.

Not reproduced in recent master build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ec60d354359067f8c5c686ef2239ee705916de43
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Might have already been fixed, maybe by a commit for bug 155685. Will check in 24.2 repo.
Comment 4 Stéphane Guillou (stragu) 2023-06-21 10:05:38 UTC
Fixed by: ca9341cf60f3f9350662d30b61f6eadefca24667
(checked with linux-64-24.2 bibisect repo)

Thanks Michael!
Comment 5 sunils 2023-06-22 03:25:50 UTC
Thank you! Hanging is not happening with -24.2.

Thank you!
Comment 6 Commit Notification 2023-06-23 07:54:39 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#155939 sw: fix infinite loop when changing document language

It will be available in 7.5.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 Michael Stahl (allotropia) 2023-06-26 10:38:25 UTC
oh, i wasn't able to find this UI and assumed that the bug can only be triggered via API :)
Comment 8 Stéphane Guillou (stragu) 2023-06-27 12:35:52 UTC
Thanks for the cherrypick! :)
Comment 9 Stéphane Guillou (stragu) 2023-07-03 07:49:05 UTC
*** Bug 156127 has been marked as a duplicate of this bug. ***
Comment 10 Stéphane Guillou (stragu) 2023-07-07 06:17:29 UTC
*** Bug 156185 has been marked as a duplicate of this bug. ***
Comment 11 Stéphane Guillou (stragu) 2023-07-19 22:03:02 UTC
*** Bug 156385 has been marked as a duplicate of this bug. ***
Comment 12 Stéphane Guillou (stragu) 2023-07-31 11:51:17 UTC
*** Bug 156535 has been marked as a duplicate of this bug. ***
Comment 13 Stéphane Guillou (stragu) 2023-08-03 08:02:23 UTC
*** Bug 156588 has been marked as a duplicate of this bug. ***
Comment 14 Stéphane Guillou (stragu) 2024-03-04 05:27:37 UTC Comment hidden (obsolete)
Comment 15 Stéphane Guillou (stragu) 2024-03-04 05:28:52 UTC
*** Bug 156535 has been marked as a duplicate of this bug. ***