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


Matthew J. Francis wrote:

Hi,

I'm intermittently experiencing the attached deadlock in some Python code.

As far as I can tell, the deadlock appears to be between a call to an 
XTopWindowListener in thread 1 (the listener, also in Python code, 
doesn't yet do anything more than print "I am here" on a callback) and 
the main thread which is attempting to enumerate the paragraphs of a 
text document in thread 2.

Could anyone with more experience in UNO and locking matters help me to 
understand what's going on here? If what I'm trying to do is essentially 
not going to work, there is the alternative of busy-waiting for windows 
to appear, but I'd like to avoid that if possible.

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.
-- 
Piet van Oostrum <piet@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]


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.