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


On 29/06/2015 15:47, Piet van Oostrum wrote:
It is not completely clear if you are calling from a remote Python program, or from inside LO.
Assuming that it is remote, yes, there are problems with listeners in this situation. It can easily 
deadlock. I have posted a similar situation on this list some months ago, where I did a paragraph 
enumeration in a listener callback and it also deadlocked. See 
lists.freedesktop.org/archives/libreoffice/2015-April/067601.html

Basically the conclusion was the LO does too much locking here, but that it could not be avoided 
because of severe problems if it wouldn't lock.

It's remote - a test running as an external process.

The Python side of the deadlock is http://pastebin.com/qPkyVTkk
(this is a different run - the corresponding soffice.bin trace is http://pastebin.com/g4F8zcUi )

The two things that seem to be happening are:

In thread 1, the main Python thread has got the Text property for the text document being worked on, and PyUNO_new_UNCHECKED() is called to make a Python object for the result, which calls createInstanceWithArguments()

Meanwhile, in thread 2, the windowActivated() callback bas been received, and pyuno::PyUNO_new_UNCHECKED() is called to make a Python object for the argument, which calls createInstanceWithArguments()


If this sequence doesn't work, I'm not sure what if anything the Python side can do better here.

Regards
Matthew Francis

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.