Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


Hi,

I'm trying to render slides from a PowerPoint presentation using a
GraphicExportFilter, from a python script. However I'm experimenting crashes
at various levels. My investigations have led me to the internals of LO
hence the posting to the Dev list. I first tried the Users list, but was
advised to try here instead -- sorry if you read it twice.

I'm using LibreOffice 4.0.4 from CentOS repositories.

You can download the script from  here
<https://drive.google.com/file/d/0By-h0KPo01P2TF9XMGVTQmY0QU0/edit?usp=sharing> 
, and the test presentation from  here
<https://drive.google.com/file/d/0By-h0KPo01P2WGJJWnFzdy1CQXM/edit?usp=sharing> 
.

Here is the outline of my python script:



And the server invocation:


As such, the script segfaults when calling exporter.setSourceDocument().
With a little bit of debugging, I could track it down to a global
pImplSVData pointer being unitialized when instantiating a SolarMutexGuard.
This is easily worked around by wrapping a call to InitVCL() in a small
python module.

*First question:* is the segfault normal, and is my workaround relevant? I'm
wondering if running in non interactive mode has something to do with the
unitialized Application/VCL stuff.

Even with the workaround, I get an IllegalArgumentException in
setSourceDocument(). With more debugging, it appears the culprits are the
following lines in UnoGraphicsExporter.cxx:


Strangely, the function correctly identifies the page object as a XDrawPage
(mxPage != NULL). However the SvxDrawPage assumption, which I don't
understand, does not hold (mpUnoPage == NULL), so the break statement is
triggered.

Hence *second question*: am I correctly passing the page object around? I
have tried passing the XShapes interface instead, without more luck.

Many thanks in advance.
The fact that I had to dig into the runtime with a debugger makes me think
that I have missed something obvious. But what is it?

Thomas



--
View this message in context: 
http://nabble.documentfoundation.org/Cannot-use-GraphicExportFilter-from-external-python-script-crash-tp4107539.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.