Bug 82188 - convert-to stopped working in latest version on Ubuntu 14:04
Summary: convert-to stopped working in latest version on Ubuntu 14:04
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-05 12:14 UTC by Ted Wennmark
Modified: 2014-08-07 12:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file for commands above. (11.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-08-05 12:14 UTC, Ted Wennmark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Wennmark 2014-08-05 12:14:26 UTC
Created attachment 104067 [details]
Test file for commands above.

I have been running automated scripts converting ods files to csv files for some time (6 months) and just after summer the command stopped working. I am upgrading Ubuntu regarly and most likely one of these upgrades broke the convert-to functionality.

My command that was working in the past was:
/opt/MySQL-LEADS$ libreoffice --convert-to csv Test.ods 

Running this command now silently 'works' but does not produce any output nor any error code ....
/opt/MySQL-LEADS$ libreoffice --convert-to csv --outdir /tmp  /tmp/Test.ods 
/opt/MySQL-LEADS$ ls -lrt /tmp/Test.*
-rw-rw-r-- 1 ted ted 12224 aug  5 14:00 /tmp/Test.ods
ted@ted-PORTEGE-Z30-A:/opt/MySQL-LEADS$ echo $?
0

Also tried to convert to txt but without any luck.
/opt/MySQL-LEADS$ libreoffice --convert-to txt:Text --outdir /tmp  /tmp/Test.ods 
ted@ted-PORTEGE-Z30-A:/opt/MySQL-LEADS$ ls -rlt /tmp/Test.*
-rw-rw-r-- 1 ted ted 12224 aug  5 14:00 /tmp/Test.ods
ted@ted-PORTEGE-Z30-A:/opt/MySQL-LEADS$ echo $?
0

Running --view command works fine!

Versions of OS and Libreoffice:
ted@ted-PORTEGE-Z30-A:/opt/MySQL-LEADS$ uname -a
Linux ted-PORTEGE-Z30-A 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

ted@ted-PORTEGE-Z30-A:/opt/MySQL-LEADS$ libreoffice --version
LibreOffice 4.2.4.2 420m0(Build:2)
Comment 1 Jean-Baptiste Faure 2014-08-05 16:34:19 UTC
It works for me if I use the -env:UserInstallation= option like this

MY_CONF=file:///home/<user>/.config/libreoffice/42/
/opt/libreoffice4.2/program/soffice -env:UserInstallation=${MY_CONF} --headless --convert-to csv Test.ods

Works for 4.3 too.

Does it work for you ?

Set status to NEEDINFO. Please set it back to UNCONFIRMED once you have provided requested informations.

Best regards. JBF
Comment 2 Maxim Monastirsky 2014-08-05 20:31:31 UTC
Works for me with 4.2.6.2/4.3.0.4 under Fedora 20 (without any workaround).
Comment 3 Ted Wennmark 2014-08-06 05:56:34 UTC
No change when adding -env option, same result as before, ran commands as seen bellow with same testfile.

ls -lrt Test.*
-rw-rw-r-- 1 ted ted 12224 aug  5 14:00 Test.ods

soffice -env:UserInstallation=/home/ted/.config/libreoffice/4 --convert-to csv Test.ods 

ted@ted-PORTEGE-Z30-A:/tmp$ echo $?
0

ls -lrt Test.*
-rw-rw-r-- 1 ted ted 12224 aug  5 14:00 Test.od
Comment 4 Maxim Monastirsky 2014-08-06 06:16:21 UTC
I'm able to reproduce this if both:

1. Experimental mode is turned on (in Tools->Options...->LibreOffice->Advanced),
2. and I did export LIBO_USE_ORCUS=YES

@Ted: Could you check this? Maybe you have exported LIBO_USE_ORCUS somewhere?
Comment 5 Ted Wennmark 2014-08-06 06:23:20 UTC
I am running libreoffice out of the box, no special settings done by me.
"Enable Experimental Features" is not enabled.

env | grep -i LIBO -> returns empty result.
Comment 6 Ted Wennmark 2014-08-07 08:36:48 UTC
Is there any way to add more dedugging to see what is happening?
I was looking at "help" options but nothing like --verbose or --debug available.

Thanks,
Ted
Comment 7 Maxim Monastirsky 2014-08-07 08:51:59 UTC
(In reply to comment #6)
> Is there any way to add more dedugging to see what is happening?
Would be interesting to see the output of strace. Try running:
$ strace -e trace=open -o strace.log /usr/lib/libreoffice/program/soffice.bin --headless --convert-to csv Test.ods
and attach strace.log to this bug.

BTW 4.2.4 is not the latest version, which is 4.2.6. You could try to upgrade using a PPA.
Comment 8 Ted Wennmark 2014-08-07 10:30:56 UTC
Now it works again!
I have not changed anything on my environment, only ran normal dayily Ubuntu update this moring and all is fine again, guess there was some bug they have now fixed.

soffice --headless --convert-to csv Test.ods 
convert /tmp/Test.ods -> /tmp/Test.csv using Text - txt - csv (StarCalc)

ted@ted-PORTEGE-Z30-A:/tmp$ ls -lrt Test.*
-rw-rw-r-- 1 ted ted 12224 aug  7 12:17 Test.ods
-rw-rw-r-- 1 ted ted    16 aug  7 12:23 Test.csv

I checked version of soffice and it's still LibreOffice 4.2.4.2 420m0(Build:2)

Thanks,
Ted