Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawn LibreOffice in a separate thread/process to avoid crashing the whole thing #7

Open
alexmorozov opened this issue Aug 14, 2016 · 5 comments

Comments

@alexmorozov
Copy link

Hey guys, thanks for the great library. We use it in the templated_docs Django package, and some bright guy offered us to spawn LO in a separate process to avoid misterious crashes. Here's the PR, looks pretty simple. But I thought this whole thing is better off living in pylokit itself so that others can benefit from this update as well.

What do you guys think about changing the exit() way to a multiprocess one? If you feel this goes in line with your vision, let me know, I'll create the PR against the latest pylokit version. Or, fell free to make the change yourselves :).

@xrmx
Copy link
Owner

xrmx commented Aug 14, 2016

I'm not sure i want the library to use multiprocessing by default, but i can add a code example for sure. I'll try to cook a patch in the next few days. BTW asked some more info in your bugreport to understand the issue better. Nice to find out some users of the lib :)

@alexmorozov
Copy link
Author

Riccardo, thanks for a quick response!
I see, your reasoning is quite understandable. But the problem is that until LOKit becomes more stable, perhaps we could have the separate_process=False kwarg or something to work around this without having to implement this functionality in every piece of software which uses your lib in a continiously running enviroment.

@xrmx
Copy link
Owner

xrmx commented Sep 4, 2016

I've tried to debug libreoffice crashes i see here with pylokit but hadn't much success:
https://lists.freedesktop.org/archives/libreoffice/2016-August/075039.html

@pcdinh
Copy link

pcdinh commented Nov 12, 2016

Hi, I found that pylokit can crash easily with a corrupted/badly damaged file when trying to convert a .docx file to PDF. Here is mine: https://ufile.io/27814

@xrmx
Copy link
Owner

xrmx commented Nov 12, 2016

@pcdinh please don't hijack issues, pylokit is a very thin layer around libreofficekit so issues with documents are very likely an upstream libreoffice issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants