Bug 145584 - Writer crashes on exporting as PDF with its Range in PDF Options set to 'Selection'
Summary: Writer crashes on exporting as PDF with its Range in PDF Options set to 'Sele...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: highest critical
Assignee: Julien Nabet
URL:
Whiteboard: target:7.3.0 target:7.2.3
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2021-11-08 06:28 UTC by himajin100000
Modified: 2021-11-14 19:46 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (10.46 KB, text/plain)
2021-11-09 18:40 UTC, Julien Nabet
Details
Valgrind trace (39.22 KB, text/x-log)
2021-11-09 20:50 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description himajin100000 2021-11-08 06:28:15 UTC
Description:
see steps to reproduce

Steps to Reproduce:
1. Start Writer
2. [File]->[Export As]->[Export As PDF]
3. in the [PDF Options] dialog, select [General] Tab. 
4. You will find [Range] section. Choose 'Selection' radio button
5. Click [Export] button to close the dialog.

Actual Results:
crash

Expected Results:
no crash 


Reproducible: Always


User Profile Reset: No



Additional Info:
reproducible with

Version: 7.3.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 742b8befecbcfc0cfab87cfcd87c83b7d8ef32ab
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL

non-reproducible with 

Version: 7.2.3.1 (x64) / LibreOffice Community
Build ID: 1d5dee817bde88d78dbcc0d00f88492568e131d5
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL


---
this line may be related. 
https://opengrok.libreoffice.org/xref/core/vcl/win/gdi/salprn.cxx?r=a2adb7fa&mo=44004&fi=1105#1105
Comment 1 Xisco Faulí 2021-11-08 09:21:14 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=20ddabc88b6b45ea3efcc44ede5244ea526b09c4

author	Michael Stahl <michael.stahl@allotropia.de>	2021-11-04 18:50:42 +0100
committer	Michael Stahl <michael.stahl@allotropia.de>	2021-11-04 21:07:30 +0100
commit	20ddabc88b6b45ea3efcc44ede5244ea526b09c4 (patch)
tree	2193c9d5e0e63394b4161c82afe5dc22363d17e9
parent	b439832fc36a05e4423f480f7a312428f2449cc6 (diff)
tdf#144989 sw: disable idle jobs during printing or PDF export

Bisected with: bibisect-linux64-7.3

Adding Cc: to Michael Stahl
Comment 2 Xisco Faulí 2021-11-08 09:21:57 UTC
Increasing importance since the commit has been backported to libreoffice-7-2 and libreoffice-7-2-3 branches
Comment 3 Julien Nabet 2021-11-09 18:40:11 UTC
Created attachment 176170 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today I could reproduce this.
Comment 4 Julien Nabet 2021-11-09 20:50:24 UTC
Created attachment 176173 [details]
Valgrind trace
Comment 5 Julien Nabet 2021-11-09 20:52:10 UTC
Remark: I got a crash not directly after clicking "Export" button but after having  chosen a location + file name and validated it.
Comment 6 Julien Nabet 2021-11-10 22:02:00 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/125014
Comment 7 Commit Notification 2021-11-11 15:46:18 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/196ac5f5435dfba5bb93e1728c38eb7fa847876d

tdf#145584: fix crash on exporting as PDF with Selection rRange

It will be available in 7.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 8 Julien Nabet 2021-11-11 16:07:50 UTC
Patches waiting for review here:
- 7.2 : https://gerrit.libreoffice.org/c/core/+/124975
- 7.2.3 : https://gerrit.libreoffice.org/c/core/+/124976
Comment 9 Commit Notification 2021-11-11 17:23:31 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#145584: fix crash on exporting as PDF with Selection rRange

It will be available in 7.2.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 10 Commit Notification 2021-11-12 08:02:54 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-2-3":

https://git.libreoffice.org/core/commit/3bc5a4c89e54138f6eebecddf93d55f1b052c42a

tdf#145584: fix crash on exporting as PDF with Selection rRange

It will be available in 7.2.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 11 Commit Notification 2021-11-12 11:00:21 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#145584: sw_uiwriter3: Add unittest

It will be available in 7.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.