Bug 88326 - headless --convert-to should not fail silently if invalid filtername
Summary: headless --convert-to should not fail silently if invalid filtername
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.5.0 target:4.4.1
Keywords:
: 67009 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-12 14:16 UTC by Laurent Godard
Modified: 2015-07-31 11:32 UTC (History)
3 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 Laurent Godard 2015-01-12 14:16:48 UTC
converting a sourcefile unsing convert-to in headless mode

if command fails (due to invalid filtername)
- the return code is still 0 
- the message converting sourcefile --> sourcefile.<filterName> using <no filtername indicated>
- a copy of source file renamed to sourcefile.<filterName>

working eg.

$soffice --headless --convert-to pdf ./myFile.txt
convert /path/to/file/myFile.txt -> /path/to/file/myFile.pdf using writer_pdf_Export

$echo $?
0

NON working eg.

$soffice --headless --convert-to aDummyFilterName ./myFile.txt
convert /path/to/file/myFile.txt -> /path/to/file/myFile.aDummyFilterName using 

$echo $?
0

==> the return of the non working example should not be 0

==> any code pointer welcomed
Comment 1 Miklos Vajna 2015-01-12 14:29:55 UTC
Code pointer: the conversion is done by the storeToURL() call in desktop/source/app/dispatchwatcher.cxx.
Comment 2 Miklos Vajna 2015-01-12 14:30:32 UTC
Oh, and please check master, 9a35c05ac58ac2d3e6d76bf21e3cce9d407e7997 improves headless conversion error reporting, but perhaps it does not solve your problem out of the box.
Comment 3 Laurent Godard 2015-01-12 15:25:37 UTC
thanks for answer
master from this morning (so with the indicated commit), same problem

i think the problem is that no exception is thrown when non existing filter (wild guess though)
Comment 4 Laurent Godard 2015-01-13 10:13:34 UTC
same problem if specified source file does not exist
fails silently
return 0
Comment 5 Robinson Tryon (qubit) 2015-01-14 17:57:30 UTC
(In reply to Laurent Godard from comment #0)
> 
> $soffice --headless --convert-to pdf ./myFile.txt
> convert /path/to/file/myFile.txt -> /path/to/file/myFile.pdf using
> writer_pdf_Export
> 
> $echo $?
> 0

CONFIRMED with LO 4.4.0.2 + Ubuntu 14.04

Status -> NEW
Comment 6 Commit Notification 2015-01-19 14:08:55 UTC
Laurent Godard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=de900ebdd4fec0fb06d56583ae22b2adc3608a65

convert-to : display error messages in console fdo#88326

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2015-01-20 16:15:48 UTC
Laurent Godard committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1989572b219966bf0ba8fd6809adca19c22d3057&h=libreoffice-4-4

convert-to : display error messages in console fdo#88326

It will be available in 4.4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Maxim Monastirsky 2015-07-31 11:32:28 UTC
*** Bug 67009 has been marked as a duplicate of this bug. ***