Apache OpenOffice (AOO) Bugzilla – Issue 90220
OOo deadlocks when attempting to paste into Zotero interface
Last modified: 2013-08-07 14:43:11 UTC
I have some documents in my Zotero bibliographic database. When I click on the 'insert citation' button in OOo Writer, and right click in the search box and select 'paste' from the context-menu, OOo crashes and must be closed via Windows Task Manager.
Further information needed to replicate problem properly (needs Zotero installed; Zotero is a citation manager and is an extension for Firefox): Create a new Writer document and type something (anything; e.g. fgfgfgdg). Select part or all of what you typed and copy to clipboard via your preferred method (mine being Ctrl + C). Now click the 'add citation' button on the OOo Writer toolbar and chose a citation style (it really doesn't matter which). Now, in the search bar in the newly-present dialogue, right click and select paste. With a bit of luck, OpenOffice should now have crashed and require termination.
Reassigned to SBA.
I reported this issue at the Zotero forum and they provide some insight: http://forums.zotero.org/discussion/3064/bug-report-openoffice-writer-crash-when-pasting-from-clipboard-into-zotero-interface-search/#Item_11
*** Issue 91179 has been marked as a duplicate of this issue. ***
MRU->OS: please have a look where in Writer this might be located. Currently in OO 3.0 there's a Basic runtime error when trying to use zotero (issue 91520). But in OO 2.4.1 i could confirm this.
There's no crash but a deadlock. In the main thread SfxMacroLoader::dispatch() aquires the SolarMutex before calling the macros. In a second thread the TransferableHelper::getTransferData waits to get the same Mutex. ->mba: Can we do anything to fix it?
The SolarMutex alone can't create a deadlock. So the problem is that the thread owning the mutex is blocked somewhere. This seems to be the bug we need to fix. Can you see where the thread containing the macro execution is hanging?
Created attachment 55050 [details] stack of two threads: Main thread starts macro execution and another thread tries to paste
The thread looks as if the Python UNO Bridge stops the thread it is called in and waits until another thread is ready. This is a complete disaster. Fixing this could be done by - releasing the SolarMutex before calling the Python macro - eliminating the thread change in PyUNO The first will greatly enhance the chance for a crash and the second one is something I can't judge as I don't know the background. I hope Jörg Budischewsky is still lurking and so I cc him.
Hi, imho the issue should be assigned to the zotero implementer (or marked as invalid) . Just downloaded the extension from http://www.zotero.org/documentation/openoffice_integration there are just 15 lines of python code, the relevant three lines are h1=httplib.HTTPConnection("127.0.0.1:50001") h1.request("POST","",q,headers) response=h1.getresponse() , so the extension does a RPC call to some server, the RPC Call does not return for whatever reason and thus blocks the office. Bye, Joerg
Thanks for the help, Jörg! I will try to get in touch with them, someone from the bibliography project seems to be very interested in the Zotero OOo support.
The problem will be fixed in Zotero. Here's the reply of Dan Stillman from Zotero: We're going to try to switch to async HTTP calls to avoid blocking the thread. This will probably require adding something like a non-modal "Waiting for Zotero..." dialog box that closes automatically when the async request completes. Ticket created: https://www.zotero.org/trac/ticket/1069 So I think that we can close the issue for OOo.
closing