Hide Forgot
Description of problem: Converting a doc file with an embedded excel worksheet object to html is crashing the listener (see attached file). This is most probably not from unoconv, but from pyuno. Version-Release number of selected component (if applicable): - unoconv-0.4-4.fc15.noarch - libreoffice-pyuno-3.3.2.2-7.fc15.i686 - all other libreoffice components are at version 3.3.2.2-7.fc15.i686 How reproducible: Always Steps to Reproduce: 1. save attached document 2. run "unoconv -l &" (this step is not mandatory) 3. run "unoconv -f html ./Definition\ document_orig.doc" Actual results: The conversion is crashing the listener. The output: unoconv: UnoException during conversion in <class 'uno.com.sun.star.lang.DisposedException'>: URP_Bridge : disposed (tid=3) Unexpected connection closure Traceback (most recent call last): File "./unoconv", line 802, in <module> main() File "./unoconv", line 781, in main convertor.convert(inputfn) File "./unoconv", line 691, in convert error("ERROR: The provided document cannot be converted to the desired format. (code: %s)" % e.ErrCode) File "/usr/lib/python2.7/site-packages/uno.py", line 318, in _uno_struct__getattr__ return __builtin__.getattr(self.__dict__["value"],name) AttributeError: ErrCode /usr/bin/soffice: line 163: 24299 Segmentation fault "$sd_prog/$sd_binary" "$@" Expected results: The document should be saved as a html file with the embedded excel saved as an image. Additional info: If I open the file in LibreOffice, double click the excel sheet and save the document, the resulting file is successfully converted to html by unoconv. If I open the file in LibreOffice and export it as html, the export is successful. So, the issue here probably is somewhere in the pyuno library. The unoconv script is dying at this line: document.storeToURL(outputurl, tuple(outputprops) )
Created attachment 501817 [details] example doc file that crashed unoconv
Actually, it seems to be from headless stuff. If I run the following command, it will work: libreoffice -unnaccept=all -invisible -nocrashreport -nodefault -nologo -nofirststartwizard -norestore -convert-to html:'HTML (StarWriter)' Definition\ document.doc But it will crash if I append -headless parameter: libreoffice -headless -unnaccept=all -invisible -nocrashreport -nodefault -nologo -nofirststartwizard -norestore -convert-to html:'HTML (StarWriter)' Definition\ document.doc 'HTML (StarWriter)' Definition\ document.doc convert /media/share/Documentation/cfalcas/q/import_docs/Definition document.doc -> /media/share/Documentation/cfalcas/q/import_docs/Definition document.html using HTML (StarWriter) /usr/lib/libreoffice/program/soffice: line 163: 14874 Segmentation fault "$sd_prog/$sd_binary" "$@"
This is an interesting problem that should be reported to LibreOffice (if this is still the case). Also retesting with the latest Github release is very appreciated ! Seems to be related to 748269 too.
I've also opened 42912 on libreoffice. I've made a new test with the latest unoconv and the same thing is happening. It seems, from a post on the bug from libreoffice, that this is fixed in the 3.5 version. Unfortunately I can't test it yet, as fedora and my home ubuntu have version 3.4.
It's easy to test it with 3.5, download the 3.5 RC3 RPM packages and install them. They should install next to your existing Fedora 3.4 installation. Then you can instruct unoconv (the latest release from Github) to use it by defining: UNO_PATH="/opt/libreoffice3.5" e.g. UNO_PATH="/opt/libreoffice3.5" ./unoconv -f html file.doc
The manual commands with --headless parameter is working now. But I couldn't make the unoconv to work: UNO_PATH=/opt/libreoffice3.5/ ./tools/unoconv -f html file.doc terminate called after throwing an instance of 'com::sun::star::registry::InvalidRegistryException' Aborted Also, it seems to require a java package now. I hope this is because I installed everything and that some other module wants java. Since both errors looked to be the same, I presume the issue is fixed with the 3.5 version
This looks very similar to bug 748269 that has more details, especially note AttributeError: ErrCode
*** This bug has been marked as a duplicate of bug 748269 ***
@cristi: Unfortunately there is something wrong with the LibO 3.5 releases, which will cause some disruption among unoconv users. It will only be fixed for 3.5.1 :-/ More information here: https://bugs.freedesktop.org/show_bug.cgi?id=45696 The solution is to remove 2 files from the LibO installation to get a working python UNO binding :-(
@eike: @caolan: We cannot be sure that the bug has the same cause as due to a bug in the exception-handling most exceptions will fail with the same backtrace. So it's best to ask if the latest Subversion version fixes the problem, or have them fix the exception-handling bug instead. I guess it would be best that Fedora patches the exception-handling bug in their unoconv package to avoid more of these bogus reports.