unoconv / unoserver

MIT License
592 stars 81 forks source link

Not all export filters seem to be able to handle private:stream #117

Open jerbob92 opened 6 months ago

jerbob92 commented 6 months ago

Hi there!

When executing the following command:

unoconvert --output-filter "DocBook File" --convert-to xml - - < infile.rtf

To convert an RTF file to a DocBook XML File, and sending the output to stdout (really specific, I know), the following error occurs:

uno.com.sun.star.uno.RuntimeException: illegal object given! at /home/buildozer/aports/community/libreoffice/src/libreoffice-7.6.3.1/stoc/source/corereflection/crefl.cxx:320

And the LibreOffice process seems to crash.

When outputting to a file path:

unoconvert --output-filter "DocBook File" --convert-to xml - outfile.xml < infile.rtf

Everything seems to work fine!

When looking at the code the only difference seems to be the usage of OutputStream in the first command.

Any idea what might be going on here? Thanks in advance!

regebro commented 5 months ago

Yeah, you are right, I get the same error. That's amazingly annoying. The only way I can see to fix that is to use temporary files in the server part, which is doable, but really shouldn't be needed.

jerbob92 commented 5 months ago

That's how we have solved it now indeed. Would the next step be reporting an issue with LibreOffice? Or does this issue originate in the uno/unoserver package?

regebro commented 5 months ago

It's Libreoffice, and getting bugs fixed there takes time, they definitely need more people helping actually fix bugs, which I unfortunately don't have the time or language experience to do.

jerbob92 commented 5 months ago

Same for me, I don't see myself diving into the LibreOffice codebase right now.

I have reported the issue here: https://bugs.documentfoundation.org/show_bug.cgi?id=161416