Launchpad has imported 10 comments from the remote bug at https://bugs.documentfoundation.org/show_bug.cgi?id=117731.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2018-05-21T20:25:17+00:00 Richard Elkins wrote: Description: Command-line: libreoffice --headless --convert-to odt:writer8 myfile.txt The returned status code ($?) is zero. So far, so good. But, when I try to use the ODT file (E.g. copy it), it doesn't exist yet. Yes, I tried `sync; sync; sync` but it did not help. If I add a `sleep 1` immediately after checking the status code, then this seems to allow enough time for some libreoffice subprocess (?) to finish. Before version 6, I did not need the sleep step. Maybe, this is some sort of optimization? If so, please provide an option to indicate that libreoffice should hold up the process until the desired output is available. I am using libreoffice 1:6.0.3-0ubuntu1 on Xubuntu 18.04. `libreoffice --help` shows: LibreOffice 6.0.3.2 00m0(Build:2) Steps to Reproduce: Linux batch script, starting with an existing text file called "myfile.txt": libreoffice --headless --convert-to odt:writer8 myfile.txt RC=$? if [ $RC -ne 0 ]; then echo '*** libreoffice conversion failed for myfile.txt' exit 86 fi cp myfile.odt somewhere-else.odt Actual Results: cp: cannot stat 'myfile.odt': No such file or directory Expected Results: Copy completes as normal because myfile.odt is available. Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/0 ------------------------------------------------------------------------ On 2018-06-16T11:54:31+00:00 JBF wrote: Not reproducible for me under Ubuntu 16.04 x86-64 with LibreOffice 6.0.4 from Ubuntu PPA. The script completes as expected. To be sure, does it works for you if you try only the command libreoffice --headless --convert-to odt:writer8 myfile.txt in a terminal ? Do you have some non standard settings for you file system? Status set to NEEDINFO, please set it back to UNCONFIRMED once requested informations are provided. Best regards. JBF Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/1 ------------------------------------------------------------------------ On 2018-06-16T14:07:41+00:00 Richard Elkins wrote: Like you, when I ran LibreOffice under Xubuntu 16.04 and 17.10, there was no timing issue. This only has appeared for me in 18.04. In a terminal window (I've done this before), `libreoffice --headless --convert-to odt:writer8 myfile.txt; ls *.odt` result: ls: cannot access '*.odt': No such file or directory My LibreOffice packages installed: ii libreoffice 1:6.0.3-0ubuntu1 amd64 office productivity suite (metapackage) ii libreoffice-avmedia-backend-gstreamer 1:6.0.3-0ubuntu1 amd64 GStreamer backend for LibreOffice ii libreoffice-base 1:6.0.3-0ubuntu1 amd64 office productivity suite -- database ii libreoffice-base-core 1:6.0.3-0ubuntu1 amd64 office productivity suite -- shared library ii libreoffice-base-drivers 1:6.0.3-0ubuntu1 amd64 Database connectivity drivers for LibreOffice ii libreoffice-calc 1:6.0.3-0ubuntu1 amd64 office productivity suite -- spreadsheet ii libreoffice-common 1:6.0.3-0ubuntu1 all office productivity suite -- arch-independent files ii libreoffice-core 1:6.0.3-0ubuntu1 amd64 office productivity suite -- arch-dependent files ii libreoffice-draw 1:6.0.3-0ubuntu1 amd64 office productivity suite -- drawing ii libreoffice-gnome 1:6.0.3-0ubuntu1 amd64 office productivity suite -- GNOME integration ii libreoffice-gtk 1:6.0.3-0ubuntu1 all transitional package for LibreOffice gtk2 backend ii libreoffice-gtk2 1:6.0.3-0ubuntu1 amd64 office productivity suite -- GTK+ 2 integration ii libreoffice-gtk3 1:6.0.3-0ubuntu1 amd64 office productivity suite -- GTK+ 3 integration ii libreoffice-help-en-us 1:6.0.3-0ubuntu1 all office productivity suite -- English_american help ii libreoffice-impress 1:6.0.3-0ubuntu1 amd64 office productivity suite -- presentation ii libreoffice-java-common 1:6.0.3-0ubuntu1 all office productivity suite -- arch-independent Java support files ii libreoffice-librelogo 1:6.0.3-0ubuntu1 all Logo-like progamming language for LibreOffice ii libreoffice-math 1:6.0.3-0ubuntu1 amd64 office productivity suite -- equation editor ii libreoffice-nlpsolver 0.9+LibO6.0.3-0ubuntu1 all "Solver for Nonlinear Programming" extension for LibreOffice ii libreoffice-ogltrans 1:6.0.3-0ubuntu1 amd64 LibreOffice Impress extension for slide transitions using OpenGL ii libreoffice-report-builder 1:6.0.3-0ubuntu1 all LibreOffice component for building database reports ii libreoffice-report-builder-bin 1:6.0.3-0ubuntu1 amd64 LibreOffice component for building database reports -- libraries ii libreoffice-script-provider-bsh 1:6.0.3-0ubuntu1 all BeanShell script support provider for LibreOffice scripting framework ii libreoffice-script-provider-js 1:6.0.3-0ubuntu1 all JavaScript script support provider for LibreOffice scripting framework ii libreoffice-script-provider-python 1:6.0.3-0ubuntu1 all Python script support provider for LibreOffice scripting framework ii libreoffice-sdbc-hsqldb 1:6.0.3-0ubuntu1 amd64 HSQLDB SDBC driver for LibreOffice ii libreoffice-sdbc-postgresql 1:6.0.3-0ubuntu1 amd64 PostgreSQL SDBC driver for LibreOffice ii libreoffice-style-elementary 1:6.0.3-0ubuntu1 all office productivity suite -- Elementary symbol style ii libreoffice-style-galaxy 1:6.0.3-0ubuntu1 all office productivity suite -- Galaxy (Default) symbol style ii libreoffice-style-tango 1:6.0.3-0ubuntu1 all office productivity suite -- Tango symbol style ii libreoffice-wiki-publisher 1.2.0+LibO6.0.3-0ubuntu1 all LibreOffice extension for working with MediaWiki articles ii libreoffice-writer 1:6.0.3-0ubuntu1 amd64 office productivity suite -- word processor Just now, I reproduced this anomaly. My script is as follows: ### Create somehow a file called myfile.txt rm myfile.odt somewhere-else.odt libreoffice --headless --convert-to odt:writer8 myfile.txt RC=$? if [ $RC -ne 0 ]; then echo '*** libreoffice conversion failed for myfile.txt' exit 86 fi #sleep 3 cp myfile.odt somewhere-else.odt As is, it consistently produces the reported anomaly. When I uncomment the sleep step, all is well. This might be an interface issue with newer version dependencies of LibreOffice. Its hard to tell. How would I investigate without knowing a lot of LibreOffice internals? I am open to suggestion and further investigation. I am a multi-level developer in case you want me to try something unusual. Suggestion: have someone try my test script under any flavor of Ubuntu 18.04. If you cannot reproduce this report, then just close it as unreproducable. Please note: This report should be not a high priority as my 3-second delay consistently works for me i.e. I am not stuck. Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/2 ------------------------------------------------------------------------ On 2018-06-16T14:10:49+00:00 Richard Elkins wrote: `libreoffice --version`: LibreOffice 6.0.3.2 00m0(Build:2) Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/3 ------------------------------------------------------------------------ On 2018-06-16T14:30:54+00:00 Richard Elkins wrote: You might be tempted to think that Ubuntu or my hardware is running a little slow. If you insert a `sync; sync; sync` right after the libreoffice step which flushes buffers, that does not help consistently. Something got spawned by or because of libreoffice. It finishes long after libreoffice exits. Bad idea, in my opinion. When libreoffice exits, that ODT file should be immediately available. Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/4 ------------------------------------------------------------------------ On 2018-06-16T18:06:02+00:00 JBF wrote: You should report this behavior against Ubuntu 18.04 on https://bugs.launchpad.net/ Best regards. JBF Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/5 ------------------------------------------------------------------------ On 2019-01-11T15:21:58+00:00 Qa-admin-q wrote: Dear Bug Submitter, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INSUFFICIENTDATA due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-NeedInfo-Ping-20190111 Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/10 ------------------------------------------------------------------------ On 2019-01-11T18:17:20+00:00 Richard Elkins wrote: Opened on Launchpad as #1777285 against libreoffice (Ubuntu). Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/11 ------------------------------------------------------------------------ On 2019-06-23T17:26:06+00:00 Richard Elkins wrote: Moved to bugs.launchpad.net and confirmed: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285 Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/12 ------------------------------------------------------------------------ On 2019-06-24T20:55:51+00:00 Richard Elkins wrote: The source code indicates that soffice.bin is the one starting a background process that does not finish before soffice.bin exits. See: https://github.com/LibreOffice/core/blob/master/shell/source/unix/exec/shellexec.cxx Go to line 218: OString cmd = #ifdef LINUX // avoid blocking (call it in background) "( " + aBuffer.makeStringAndClear() + " ) &"; #else aBuffer.makeStringAndClear(); #endif FILE *pLaunch = popen(cmd.getStr(), "w"); if ( pLaunch != nullptr ) { if ( 0 == pclose( pLaunch ) ) return; It would be interesting to understand why execution is in background *only* for Linux. In my opinion, it is undesirable for command line execution in any O/S. Other opinions? It is possible for me to be perfectly content with the artificial `sleep N` in my shell script. Reply at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1777285/comments/15 ** Changed in: df-libreoffice Status: Unknown => Confirmed ** Changed in: df-libreoffice Importance: Unknown => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1777285 Title: Batch libreoffice --convert-to offers no way to wait for document completion To manage notifications about this bug go to: https://bugs.launchpad.net/df-libreoffice/+bug/1777285/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs