Bug 128659 - Cannot add AutoCorrect entries once the user/autocorr/acor_xx-XX.dat file is created
Summary: Cannot add AutoCorrect entries once the user/autocorr/acor_xx-XX.dat file is ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
6.3.3.2 release
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0 target:6.4.0.1 target:6....
Keywords: bibisected, bisected, regression
: 128947 (view as bug list)
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2019-11-07 23:31 UTC by Mihail Balabanov
Modified: 2019-11-30 17:30 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mihail Balabanov 2019-11-07 23:31:08 UTC
Description:
Entries added in Tools > AutoCorrect > AutoCorrect Options... > Replace tab are not saved after confirming the dialog if the acor_xx-XX.dat file for the respective language already exists in user/autocorr.

Steps to Reproduce:
1. Open a new document in Writer.
2. Open Tools > AutoCorrect > AutoCorrect Options... > Replace.
3. Select a language for which there is still no acor_xx-XX.dat file in the user folder; let’s say, for example, Afrikaans (Namibia).
4. Add one or more autocorrect entries by entering them and clicking the New button.
5. Close the dialog with OK. An acor_af-NA.dat file is created in user/autocorr.
6. Open Tools > AutoCorrect > AutoCorrect Options... > Replace again. Select the same language. Your old entries are in the list.
7. Add some more entries. They appear in the list.
8. Close the dialog with OK.
9. Open Tools > AutoCorrect > AutoCorrect Options... > Replace once again.

Actual Results:
After step 9, only the entries from step 4 are in the UI list and in the .dat file. The ones from step 7 are lost.

(Curiously, the timestamp of the file gets updated but the entries are not added to DocumentList.xml.)

Expected Results:
All entries from steps 4 and 7 should be stored into the .dat file for the language, appear in the list and be used for the AutoCorrect feature.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 6.3.3.2 (x64)
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: bg-BG (bg_BG); UI-Language: en-US
Calc: threaded

Deleting the acor_xx-XX.dat file resets the bug (the above process can be repeated from step 1).
Comment 1 tommy27 2019-11-19 06:29:47 UTC
I confirm issue under Win10 x64 using LibO 6.3.3.2 which I tested under 2 different machines even with a clean user profile.

as an additional note I can tell that even adding new autocorrect entries from the right click menu fails, not only from the replacement table.

autocorrect works fine in 6.1.6 (I haven't tried yet any of the 6.2.x version) so it a regression. needs bibisecting.

I raise priority to major since it makes autocorrect function unreliable...
data entered by the user are not stored so no autocorrection of the manually entered entries take place when you type those mistakes another time.

this means that autocorrect is broken in 6.3.x
Comment 2 tommy27 2019-11-19 12:26:06 UTC
it seems a very recent regression.
according to my tests, LibO 6.3.2 has no bug, hence one of the commits made during the release of the 6.3.3 has created the issue.

maybe this one is the offending commit....

Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/4ea561aa56208c63938fbc4dbf1e1e509de456ec

tdf#109158 improve load time of autocorrect XML file

It will be available in 6.3.3.


@Noel
would you please take a look at this and tell if my guess is wrong or right?
Comment 3 Xisco Faulí 2019-11-20 23:03:04 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=77dec7588c9141b03f8ec0139eb96c298b26f261

author	Noel Grandin <noel.grandin@collabora.co.uk>	2019-09-19 12:29:42 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2019-09-20 10:33:24 +0200
commit 77dec7588c9141b03f8ec0139eb96c298b26f261 (patch)
tree d56625bf373e1966d57854a61168385c8a08e734
parent 3aff00ea2ff704547a4d9fa6e2bb2141eb57bf1d (diff)
tdf#109158 improve sorting when loading large autocorrect file

Bisected with: bibisect-linux64-6.4

Adding Cc: to Noel Grandin
Comment 4 Julien Nabet 2019-11-22 09:26:12 UTC
*** Bug 128947 has been marked as a duplicate of this bug. ***
Comment 5 tommy27 2019-11-27 11:09:37 UTC
I think this a serious regression since it breaks a major feature of LibO

any user who relies on the autocorrect engine will certainly be negatively impressed.

LibO 6.3.x is in the middle of it's lifecycle and it should be better to fix it in 6.3.4

sorry for being pushy but I think this issue could affect LibO's reputation.
Comment 6 Xisco Faulí 2019-11-27 11:13:40 UTC
I agree with you. Increasing it to Critical
Comment 7 Commit Notification 2019-11-28 12:12:11 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/208ca3d33d4e6dff9e70a3efa098628b02151729

tdf#128659 Cannot add AutoCorrect entries

It will be available in 6.5.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 8 Commit Notification 2019-11-28 15:12:34 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#128659 Cannot add AutoCorrect entries

It will be available in 6.4.0.1.

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 9 Commit Notification 2019-11-28 16:28:09 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

tdf#128659 Cannot add AutoCorrect entries

It will be available in 6.3.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 10 Commit Notification 2019-11-29 10:41:07 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-3-4":

https://git.libreoffice.org/core/commit/1021d7a635b5567a62f0711263eed3c3011ec687

tdf#128659 Cannot add AutoCorrect entries

It will be available in 6.3.4.

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 11 tommy27 2019-11-30 16:48:29 UTC
thanks Noel
Comment 12 Xisco Faulí 2019-11-30 17:30:01 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: 47dd2c63f649828a833543e21d4eca5866ec9ebe
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Noel, thanks for fixing this issue!