Bug report: OpenOffice Writer crash when pasting from clipboard into Zotero interface search

I submitted errors with the identifier: 486313242

Steps to replicate: 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.

Win XP, OOo 2.40, Zotero 1.0.4
  • I can't reproduce this. Is OpenOffice crashing or hanging? If it's crashing, your best bet is probably to generate a backtrace and report it to the OpenOffice folks. If it's just hanging, that's a separate issue, and might just be due to the search in Zotero taking a while. Does a quicksearch in the main Zotero pane take a while to complete? Also, does this happen if you copy text from another application (rather of OO) and paste that in?

    There are no Zotero errors in that error report.
  • edited June 1, 2008
    Hi Dan, I think this is an old bug that isn't due to the search but the plugin not liking pasting from openoffice. I reported it here

    and refered to it again here

    So it's definitely reproducible.
    To answer one of your questions: actually I can paste from Wordpad no problem into either the search or the suffix / prefix fields. It's only if I've copied from OO that it hangs and you have to kill it from the taksmanager.
    Windows XP, OpenOffice 2.4 Zotero 1.04
    I'll try it on Linux to see if I can reproduce it there too.
    Regards, Jon.
  • edited June 1, 2008
    OK tried to reproduce this on a linux box. Short story is that you can't copy and then paste from an oo document into the plugin at all, which avoids the not responding problem :)
    I could paste from Abiword into the plugin though.
    Regards, Jon.
  • Thanks, Jon—knew I'd seen this before, but couldn't find the thread.

    A couple more questions:

    1) Does this happen if you paste text from OpenOffice into the search field in the main Zotero pane rather than the Add Citation window?

    2) Does it happen if you paste text from OpenOffice into another app while the Add Citation window is open?

    The only thing I can think of here is that, when the Add Citation window is open, OpenOffice is blocked, and pasting text copied from OO triggers some interaction with OO, which crashes it.

    I don't really know much about how the clipboard service works on Windows, but I wouldn't think any additional interaction with OO would be necessary after the text was copied to the clipboard, since you can paste from apps that have already been closed...
  • Hi Dan,
    1) No, I can paste from OO into the search field in Zotero, so long as the Add Citation window isn't open. If it is, then OO hangs.

    2) Yes, tried to paste into Wordpad with the Add Citation window open and OO hanged.

  • tried to paste into Wordpad with the Add Citation window open and OO hanged
    OK. Can you see if this is reproducible with other modal windows in OO, such as in the Print window?
  • Hi Dan, not sure if I quite understood what you were after here. You can paste a number, for instance, into the Print window for number of pages. But this is only possible with the Add Citation window shut as otherwise you can't open the Print window at all.
  • not sure if I quite understood what you were after here
    The point is to see if you can paste text copied from OO when other modal (blocking) windows are open in OO. We've already determined that pasting from OO is necessary, that the application you paste to does not matter, and that this happens only when OO is blocked due to the Add Citation window. But it'd be helpful to know if this also happens when you try to paste from OO when another modal window (such as the Print window) is open. You can paste wherever you want, since the paste target doesn't make a difference—you just have to be pasting text copied from OO.
  • OK, no there doesn't seem to be any problem with pasting from OO with the Print window open
  • OK, for some reason I'm now able to reproduce this in both OpenOffice and Word. Here's what seems to be happening:

    Apps on Windows (or at least these two) appear to need to perform some operation when text copied from them is pasted, and until that action occurs, the target application hangs. I don't know why any such action would be necessary, since you can of course paste text copied from a program even if the program has been closed (and even paste text from those apps into the citation window just fine if they've been closed and reopened since the copy), but this appears to be some fluke of the clipboard system on Windows.

    You can reproduce the hang copying text from OO/Word into another application while the Zotero citation window is open—the other application will hang until you close the citation window, at which point the text will be pasted. So when you paste into the citation window itself (which belongs to Firefox), OO/Word can't perform its requisite action, which hangs Firefox, which means that OO/Word is permanently hung, because it can't continue until the citation window is closed. So it's a deadlock.

    You could try raising this on the OO forums and point to this thread in the hope that someone will see it who knows more about how the clipboard works on Windows, but there doesn't seem to be much we can do about this.

    One simple workaround is to copy text into an open Notepad window and then recopy it from there before copying into the citation window. You might also look for some program that converts rich text on the clipboard to plain text (like Plain Clip on OS X), since that might remove any link back to OO and solve the problem.
  • FYI, there's a bug report on this over at OOo, and some of the OOo devs have looked at it. The latest conclusion is that the problem is with Zotero; in particular an unreturned RPC call.
  • The latest conclusion is that the problem is with Zotero; in particular an unreturned RPC call.
    Well, the problem is still as I describe above, but we're going to try to switch to asynchronous HTTP calls from the plugins to avoid blocking the thread and allow Word and OpenOffice on Windows to complete the paste (for whatever reason they're implemented that way). This will probably require something like a "Waiting for Zotero..." dialog box in Word/OOo that closes automatically when the operation completes. Ticket created.
  • edited November 29, 2008
    Since the citation window covers up my document where I have entered my quotation with the page number I need to cite, I thought I would just copy the page number(s) before inserting the citation and then paste it in. (Yeah, I have lousy short-term memory).

    Well, each time I tried that FF, zotero and Word all froze. A quick search of the forum lead me here.

    So, what's the status on the ticket? (Either that or let me move the window....yeah, I know....)

    Edit: Ooops. Sorry. Windows XP; Word 2003; Plugin 1.0b3; FireFox 3.0.4; Zotero 1.07.r3834... anything else I forgot?
  • So, what's the status on the ticket? (Either that or let me move the window....yeah, I know....)
    This doesn't occur in the new Python plugins (for OpenOffice, NeoOffice, Mac Word 2008, and eventually Mac Word 2004). It's not fixed for Windows Word (VBA) users, but in the next Zotero releases you'll be able to switch to using a real (movable) window on Windows using the integration.realWindow hidden pref. The downside is that it may appear behind Word, but if your screen is big enough that shouldn't be too much of a problem.

    We still might be able to fix this for the VBA plugin.
  • We still might be able to fix this for the VBA plugin.
    Here's hoping!

    And thanks for the update.
  • I agree with Phil Gons here:

    Word keeps freezing on me because of this very reason.
  • Sab
    edited July 28, 2009
    Only thing to do is to try to remember not to paste into Zotero from Word.
    or paste into notepad and copy and then into Zotero - but that's a pain.

    Can we at least use Esc to close the frozen Word/Zotero hiccup at some point rather than having to close word altogether and hope autosave got that last sentence?
  • Dan,

    Is there any current progress on this for the VBA plugins yet?
  • edited August 22, 2009
    The ticket was just closed two days ago as part of a complete rewrite of Zotero's word processing integration. The fix should be available in the next beta release or two.
Sign In or Register to comment.