Bug 139039 - PDF export: Error message if filepath is URL coded / crash when saving as DOCX
Summary: PDF export: Error message if filepath is URL coded / crash when saving as DOCX
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:7.2.0 target:7.1.2 target:7.0.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2020-12-18 15:46 UTC by thomas.schneider
Modified: 2021-03-02 20:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
ZIP file with directory containing URL coded characters (13.21 KB, application/x-zip-compressed)
2020-12-18 23:15 UTC, thomas.schneider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thomas.schneider 2020-12-18 15:46:54 UTC
An error message occurs on trying to export to PDF if the export path is URL coded, i.e. if it contains "%"(percent) characters:

Error message dialog (german):
"Fehler beim Speichern des Dokumentes ...document name...:
Allgemeiner Fehler.
Allgemeiner Ein-/Ausgabefehler."

In english probably it may be:
"Error on saving document ...document name...:
General error.
General I/O error."

Tested Versions:
- V.6.3.3
- V.6.4.6
- V.7.0.1

Version 5.4.7 works correctly!
Comment 1 Roman Kuznetsov 2020-12-18 19:52:07 UTC
Can you just save any simple ODT file to path with that URL coded characters?
Comment 2 thomas.schneider 2020-12-18 23:15:58 UTC
Created attachment 168313 [details]
ZIP file with directory containing URL coded characters

screenshot with resulting error message on trying to export the ODF file in the directory as PDF to this directory.
Comment 3 thomas.schneider 2020-12-18 23:18:12 UTC
- simply create a directory with some URL coded characters
- create an ODF file insed this directory
- try to export this ODF file as PDF to this directory
--> will result in the described error message

see attachment.
Comment 4 thomas.schneider 2020-12-18 23:26:55 UTC
...and sorry, I've forgotten:
tried with Windows 10
Comment 5 QA Administrators 2020-12-19 03:49:43 UTC Comment hidden (obsolete)
Comment 6 Aron Budea 2021-02-14 23:40:44 UTC
Confirmed in LO 7.1.0.3 and 6.1.0.3 / Windows.
Fine in 6.0.0.3
Comment 7 Aron Budea 2021-02-15 02:03:59 UTC
Bibisected to the following commit using repo bibisect-win32-6.1. Adding CC: to Miklos Vajna.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=5259ab8104cfba60c40748ed0cd59d93df038c5b
author		Miklos Vajna <vmiklos@collabora.co.uk>	2018-01-08 15:53:58 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-01-09 09:08:44 +0100

sfx2 store: create temp files next to local files
Comment 8 Aron Budea 2021-02-15 02:44:57 UTC
What's even worse, saving to eg. DOCX format crashes LO.
Crash report:
https://crashreport.libreoffice.org/stats/crash_details/76c14b52-3243-49b0-8ba5-5c4f09e513ae
Comment 9 Miklos Vajna 2021-02-23 08:06:58 UTC
https://git.libreoffice.org/core/+/aaf7fe0326b3be088a5440525363317fb3d0f158%5E%21 fixes this on master, sorry that I forgot to mention the bug number in the commit message.
Comment 10 Commit Notification 2021-02-23 11:26:22 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#139039 sfx2 store: fix export to PDF when dir name is URL-encoded

It will be available in 7.1.2.

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 Xisco Faulí 2021-03-01 16:22:59 UTC
Verified in

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: a889bca4a1912da1e402181d8acd6ef7683e2f53
CPU threads: 16; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-US
Calc: threaded

@Miklos, thanks for fixing this issue!!

The crash exporting to .DOCX is also fixed!!
Comment 12 Commit Notification 2021-03-01 19:54:28 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/55a6b24e0809246ec5700dcd76856df9d8348e36

tdf#139039 sfx2 store: fix export to PDF when dir name is URL-encoded

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.
Comment 13 Commit Notification 2021-03-02 18:30:32 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-0-5":

https://git.libreoffice.org/core/commit/55b7490decf9a22e609a4bcad717e20664da278c

tdf#139039 sfx2 store: fix export to PDF when dir name is URL-encoded

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