Bug 140849 - "Apply and Edit changes" from AutoCorrect crashes LO writer
Summary: "Apply and Edit changes" from AutoCorrect crashes LO writer
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0
Keywords: haveBacktrace
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2021-03-07 07:40 UTC by mattia.b89
Modified: 2024-09-07 09:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (11.79 KB, text/plain)
2021-03-07 09:03 UTC, Julien Nabet
Details
second bt with debug symbols (8.29 KB, text/plain)
2021-03-07 09:29 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mattia.b89 2021-03-07 07:40:28 UTC
Description:
The feature "Apply and Edit changes" from Tools->AutoCorrect, makes LO writer crash.
It happens always for a non-empty document.
This means with a one-character document too.

Steps to Reproduce:
1. open LO writer
2. type in any character e.g. letter 'a'
3. Tools -> AutoCorrect -> Apply and Edit changes...
4. LO crash

Actual Results:
crash

Expected Results:
"fix" document


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.1.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: it-IT (en_GB.UTF-8); UI: en-GB
7.1.1-1
Calc: CL
Comment 1 Julien Nabet 2021-03-07 09:03:23 UTC
Created attachment 170287 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
Comment 2 Julien Nabet 2021-03-07 09:04:29 UTC
I could reproduce this too with LO Debian package 7.0.4.2 => update version (since it's the earliest affected for the moment)
Comment 3 Julien Nabet 2021-03-07 09:29:58 UTC
Created attachment 170289 [details]
second bt with debug symbols

On pc Debian x86-64 with master sources updated today + a patch to fix the assesrtion https://gerrit.libreoffice.org/c/core/+/112118, I got another assertion this time which will indeed lead to a crash.

(The first retrieved assertion doesn't lead to a crash since it's just a control)
Comment 4 sdc.blanco 2021-03-07 09:37:35 UTC
Maybe this is a Linux only problem?  Have been using "Apply and Edit Changes" in Windows without problem (See bug 139953).
Comment 5 Julien Nabet 2021-03-07 09:46:23 UTC
After digging a bit, I submitted a second patch to fix the other bt but it concerns only French UI since it fails at line 670:
    662     if ( rCC.getLanguageTag().getLanguage() == "fr" )
    663     {
    664         bool bFrCA = (rCC.getLanguageTag().getCountry() == "CA");
    665         OUString allChars = ":;?!%";
    666         OUString chars( allChars );
    667         if ( bFrCA )
    668             chars = ":";
    669 
    670         sal_Unicode cChar = rTxt[ nEndPos ];

so in the "if ( rCC.getLanguageTag().getLanguage() == "fr" )" block and you use Locale: it-IT (en_GB.UTF-8); UI: en-GB

To start from a good basis, could you apply https://wiki.documentfoundation.org/QA/FirstSteps
then if you still reproduce the crash try to retrieve a backtrace?
(See https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#GNU.2FLinux:_How_to_get_a_backtrace)
Comment 6 Commit Notification 2021-03-09 12:31:37 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

Related tdf#140849: "Apply and Edit changes" from AutoCorrect crashes LO writer

It will be available in 7.2.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 7 sdc.blanco 2023-05-01 22:34:22 UTC
Maybe this ticket is resolved? or WFM?
Comment 8 Matt K 2024-03-10 00:37:47 UTC
(In reply to sdc.blanco from comment #7)
> Maybe this ticket is resolved? or WFM?

No repro using:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1b1c51ff9e3fe3356a0ba259a0c3e9cfccda0089
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Marking NEEDINFO
Comment 9 QA Administrators 2024-09-07 03:18:41 UTC Comment hidden (obsolete)
Comment 10 mattia.b89 2024-09-07 06:13:31 UTC
Sorry for my absence.
I confirm the issue has been fixed upstream!
Thanks to all.

Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 480(Build:3)
CPU threads: 4; OS: Linux 6.10; UI render: default; VCL: gtk3
Locale: it-IT (en_GB.UTF-8); UI: en-GB
24.8.0-3
Calc: threaded