Bug Hunting Session
Bug 67009 - Other: soffice.bin does not report errors on STDERR
Summary: Other: soffice.bin does not report errors on STDERR
Status: RESOLVED DUPLICATE of bug 88326
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.4.6 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-17 18:44 UTC by Travis Mann
Modified: 2015-07-31 11:32 UTC (History)
0 users

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 Travis Mann 2013-07-17 18:44:56 UTC
Problem description: 
soffice.bin does not raise an error if it is passed an invalid input file.

Given the following command line:
soffice.bin -headless -convert-to pdf:writer_pdf_Export -outdir files/ I_do_not_exist.xls

LibreOffice will silently fail without providing an error.

Steps to reproduce:
1. Run the following command on the command line:
soffice.bin -headless -convert-to pdf:writer_pdf_Export -outdir files/ I_do_not_exist.xls

2. No errors or warnings are raised...

Current behavior:
soffice.bin silently fails with no indication that anything went wrong. No warning/error diagnostic is printed to STDOUT or STDERR, and the Windows %ERRORLEVEL% variable remains unchanged.

Expected behavior:
soffice.bin should raise a warning describing the issue (missing or inaccessible file) and exit with an error status.      
Operating System: Windows 7
Version: 4.0.4.2 release
Comment 1 Owen Genat (retired) 2013-07-19 07:33:31 UTC
Setting status to NEW and Platform to All as this lack of error reporting also occurs under GNU/Linux. I have left the version as-is although it possibly goes right back to the initial version of LO. Whether this is a bug or enhancement request I am less certain of. The related AskLO thread is:

http://ask.libreoffice.org/en/question/20321/sofficebin-on-windows-command-line/

An equivalent command under GNU/Linux is:

$ soffice --headless --convert-to pdf:writer_pdf_Export I_do_not_exist.xls

It is worth noting that this lack of error reporting can also occur for certain files that are not 'handled' by LO e.g., this multi-page TIFF file:

http://www.nightprogrammer.org/wp-uploads/2013/02/multipage_tif_example.tif

... causes LO Draw to throw an "Unknown graphic format" error (followed by a "General input/output" error). When attempting to convert to PDF using:

$ soffice --headless --convert-to pdf:writer_pdf_Export multipage_tif_example.tif

... no output (file or message) is produced.
Comment 2 QA Administrators 2015-04-01 14:41:43 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

   *Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later)
   https://www.libreoffice.org/download/

   *If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
 
   *If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

   *Update the version field
   *Reply via email (please reply directly on the bug tracker)
   *Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 

1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug 
3. Leave a comment with your results. 
4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 
4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-04-01
Comment 3 Owen Genat (retired) 2015-04-04 08:46:39 UTC
Problem appears to have been evident during v3.4-4.3 but may now be resolved under v4.4:

$ ls a.xls
ls: cannot access a.xls: No such file or directory
$ /opt/libreoffice3.3/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
$ /opt/libreoffice3.4/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
$ /opt/libreoffice3.5/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
$ /opt/libreoffice3.6/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
$ /opt/libreoffice4.0/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
$ /opt/libreoffice4.1/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
$ /opt/libreoffice4.2/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
$ /opt/libreoffice4.3/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
$ /opt/libreoffice4.4/program/soffice --headless --convert-to pdf:writer_pdf_Export a.xls
Error: source file could not be loaded

Under v3.3 a pop-up dialog is thrown stating "a.xls does not exist".
Under v4.4 the message indicated is written to the terminal. Version set to 3.4.6 release.
Comment 4 Maxim Monastirsky 2015-07-31 11:32:28 UTC

*** This bug has been marked as a duplicate of bug 88326 ***