Bug 140590 - Crash in: mergedlo.dll: Using Save-As dialog in Tools>Chapter Numbering
Summary: Crash in: mergedlo.dll: Using Save-As dialog in Tools>Chapter Numbering
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.1.3 target:7.0.6
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Chapter-Numbering-Dialog
  Show dependency treegraph
 
Reported: 2021-02-22 08:50 UTC by sdc.blanco
Modified: 2021-03-26 13:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["mergedlo.dll"]


Attachments
a different chapter.cfg that will crash (8.58 KB, application/xml)
2021-03-04 15:30 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2021-02-22 08:50:48 UTC
This bug was filed from the crash reporting server and is br-f1f45f5c-7d4d-4c0d-995f-23367215a550.  Reason:  EXCEPTION_ACCESS_VIOLATION_WRITE 
=========================================

1. Tools > Chapter Numbering
2. Load /Save - Save As (opens dialog box, click Ok)
3. Repeat step 2 multiple times.
4. Crash.

The crash report here appeared after doing this 28 times in a row.

Here is another report, from using the same procedure (I did not count how many times, but it was probably around 20-30 times).  But notice that the reason is different: EXCEPTION_ACCESS_VIOLATION_READ 

https://crashreport.libreoffice.org/stats/crash_details/d49dc582-96a6-4e83-a883-abac145358a8

Both times this was conducted in Safe Mode with

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 7752bbe121fa0cd892ffc6ddaf465f519573dc09
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-US (en_DK); UI: en-US
Calc: threaded


Additional Information:

1. In "regular" mode, I got a crash from using Save As a single time.  So -- to be sure it was not just a user profile problem, I attempted in Safe Mode.  Of course, users will not use Save As 28 times in a row, but presumably there is an implementation problem that needs to be examined, which might be related to bug 140528.
Comment 1 Xisco Faulí 2021-02-22 09:25:46 UTC
It looks like a dupe of bug 140528

*** This bug has been marked as a duplicate of bug 140528 ***
Comment 2 Timur 2021-03-02 11:50:39 UTC
Somewhat changed and confirmed after testing fix in 7.2+ of https://bugs.documentfoundation.org/show_bug.cgi?id=140528.

Steps only with chapter.cfg attachment 170167 [details]:
1. Copy attached chapter.cfg in your {user profile}/config directory before starting Writer
2. Tools > Chapter Numbering
3. Load/Save > choose an entry to Load
4a. Load/Save > Save As in Win
4b. in Lin also write some name (with spaces), Ok
Crash

That chapter.cfg copied in 6.0 saves fine. .cfg doesn't load entries in 6.1-6.4. 7.0 oldest has empty list, while latest crashes as well as 7.2+.

Bibisect in 7.0 points to a fix for issue from 6.1:
commit 23f635c056a385ed8f8c35980f2c897b04508f08
Date:   Thu Feb 27 15:23:45 2020 +0100
    source sha:5320fccc290f338d344c5d3c75101c98057788cd
   prev source sha:b5fa0fb35c362492a136ec56746e062bc800d7e7
author	Noel Grandin <noel.grandin@collabora.co.uk>	2020-02-27 15:33:22 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2020-02-27 15:17:10 +0100
commit	5320fccc290f338d344c5d3c75101c98057788cd (patch)
tree	3cea51528d171bd0dbef6e3ba966d25f1d8caa43
parent	b5fa0fb35c362492a136ec56746e062bc800d7e7 (diff)
tdf#130908 Chapter Numbering can't load custom style

Since 6.0 was fine, this looks like a regression.
Comment 3 sdc.blanco 2021-03-03 12:41:01 UTC
Possibly this is a STR for this bug.
1. Tools > Chapter Numbering
2. For level 1 through level 10, choose a value for Number, using dropdown box
3. Choose Load/save > Save As
Crash
https://crashreport.libreoffice.org/stats/crash_details/3f5360b6-a5ad-45ba-9481-d0cb1a7283e5

Tested with a version after commit for bug 140528:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 6fb9f368c6824a8ff7bc5bc5cf66fc2df7d055b7
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DK); UI: en-US
Calc: CL
Comment 4 Xisco Faulí 2021-03-04 14:40:39 UTC
(In reply to sdc.blanco from comment #3)
> Possibly this is a STR for this bug.
> 1. Tools > Chapter Numbering
> 2. For level 1 through level 10, choose a value for Number, using dropdown
> box
> 3. Choose Load/save > Save As
> Crash
> https://crashreport.libreoffice.org/stats/crash_details/3f5360b6-a5ad-45ba-
> 9481-d0cb1a7283e5
> 
> Tested with a version after commit for bug 140528:
> 
> Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
> Build ID: 6fb9f368c6824a8ff7bc5bc5cf66fc2df7d055b7
> CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL:
> win
> Locale: en-US (en_DK); UI: en-US
> Calc: CL

I can't reproduce it in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 0b072e279f5f775a4cd64d9b1275e5ab17d50f05
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 5 Xisco Faulí 2021-03-04 14:58:09 UTC
(In reply to Timur from comment #2)
> Somewhat changed and confirmed after testing fix in 7.2+ of
> https://bugs.documentfoundation.org/show_bug.cgi?id=140528.
> 
> Steps only with chapter.cfg attachment 170167 [details]:

Looks like a corner case if it's only reproducible with one config file...
Comment 6 sdc.blanco 2021-03-04 15:30:15 UTC
Created attachment 170213 [details]
a different chapter.cfg that will crash

> Looks like a corner case if it's only reproducible with one config file...
Here's another chapter.cfg file. 
With this one it is sufficient to do:
Tools > Chapter Numbering
Load/Save > Save as
Crash

Explanation of how it was produced.  
1. Started with no chapter.cfg in {user profile}/config directory
2. Started to create and save entries 
   (was also loading them sometimes -- still trying to figure out how 
    it actually works in terms of what is saved and loaded.) 
   (maybe have closed and restarted Chapter Numbering dialog once or twice)
   (but no crashes - good!).
3. When I saved what I think was the last of the 9 possibilities,
   then "Save as" crashed.
4. To be sure, when I re-started with the same .cfg file (attached), and then 
   "Save as" alone crashed.

(tested with version mentioned in comment 3)
Comment 7 sdc.blanco 2021-03-09 12:57:00 UTC
> saved what I think was the last of the 9 possibilities, then "Save as" crashed.
This was reproduced independently by another user, who has provided a backtrace in 
Attachment 170368 [details].
Comment 8 Timur 2021-03-09 13:19:13 UTC
This is crash + regression so should be fixed, regardless that it's not often that someone will save all settings to provoke crash.
Comment 9 Heiko Tietze 2021-03-09 14:53:14 UTC
*** Bug 140800 has been marked as a duplicate of this bug. ***
Comment 10 Noel Grandin 2021-03-09 17:20:32 UTC
(In reply to sdc.blanco from comment #7)
> Attachment 170368 [details].

Fix here
   https://gerrit.libreoffice.org/c/core/+/112233
but this only affects assert or debug builds, so might not fix all the issues here.
Comment 11 Commit Notification 2021-03-11 06:45:39 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/677a18c2e16c5c1ae6be8d30e1a967f41fbf67a0

tdf#140590 Crash in Save-As dialog in Tools>Chapter Numbering

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 12 Xisco Faulí 2021-03-11 20:56:28 UTC
@sdc.blanco@youmail.dk, @timur, since the fix only addresses assert builds, do you still reproducible the crash with a master build containing the fix ?
Comment 13 Commit Notification 2021-03-12 09:49:16 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#140590 Crash in Save-As dialog in Tools>Chapter Numbering

It will be available in 7.1.3.

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 14 Timur 2021-03-12 14:37:38 UTC
Crash still reproducible,  test in Windows per comment 2
Comment 15 Commit Notification 2021-03-18 11:31:31 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/36bc901426163aa38b551865d3dd57a3a3423910

tdf#140590 Writer crash in Tools>Chapter Numbering

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 16 Commit Notification 2021-03-23 11:30:42 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#140590 Writer crash in Tools>Chapter Numbering

It will be available in 7.1.3.

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 17 Xisco Faulí 2021-03-23 11:36:05 UTC
(In reply to Xisco Faulí from comment #12)
> @sdc.blanco@youmail.dk, @timur, since the fix only addresses assert builds,
> do you still reproducible the crash with a master build containing the fix ?

Hi,
Is this issue still reproducible for you ?
Comment 18 Timur 2021-03-23 12:14:58 UTC
I confirmed in Comment 14, I think it was Windows 7, of course with the fix.
But now testing again on another Windows 8, I don't repro.
I wouldn't consider this enough to reopen. 
Anyway, steps from Comment 2 are clear for anyone.
Comment 19 Xisco Faulí 2021-03-26 11:52:16 UTC
(In reply to Timur from comment #18)
> I confirmed in Comment 14, I think it was Windows 7, of course with the fix.
> But now testing again on another Windows 8, I don't repro.
> I wouldn't consider this enough to reopen. 
> Anyway, steps from Comment 2 are clear for anyone.

in Comment 14 your build didn't include 
https://git.libreoffice.org/core/commit/36bc901426163aa38b551865d3dd57a3a3423910, that's why I asked again
Comment 20 Commit Notification 2021-03-26 13:24:43 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

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

tdf#140590 Writer crash in Tools>Chapter Numbering

It will be available in 7.0.6.

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.