auto complete hangs firefox

Hi there, I was trying to change an authors first name and the whole computer hung, to the point where I had to hard power-off the computer (could still move the mouse but clicking wasn't doing anything and the keyboard was dead). So fired it up again and this time ran Firefox from the terminal. Luckily nothing quite so dramatic but trying to change a different authors name, Zotero got stuck.
Here is the last bit from the terminal:

zotero(3)(+0001217): Starting autocomplete search of type 'creator-0-firstName/-15639' with string 'Louis'

zotero(5)(+0000001): SELECT * FROM (SELECT DISTINCT CASE WHEN firstName='' OR firstName IS NULL THEN lastName ELSE lastName || ', ' || firstName END AS val, creatorID || '-' || CASE WHEN (firstName = '' OR firstName IS NULL) THEN 1 ELSE 2 END AS comment FROM creators NATURAL JOIN creatorData WHERE firstName LIKE ?1 AND fieldMode=?2 AND creatorID NOT IN (SELECT creatorID FROM itemCreators WHERE itemID=?3) UNION SELECT DISTINCT firstName AS val, creatorID || '-1' AS comment FROM creators NATURAL JOIN creatorData WHERE firstName LIKE ?1 AND fieldMode=?2 AND creatorID NOT IN (SELECT creatorID FROM itemCreators WHERE itemID=?3)) GROUP BY val ORDER BY val

zotero(5)(+0000000): Binding parameter 1 of type string: "Louis%"

zotero(5)(+0000000): Binding parameter 2 of type int: 0

zotero(5)(+0000000): Binding parameter 3 of type string: "15639"


Then it just stopped. Had to force quit firefox.

Zotero 2.0b7.r5014 Firefox 3.52 Ubuntu 9.04

regards, Jon.
  • Think this may be related.
    Error id 1587590909
    [JavaScript Error: "[Exception... "Component returned failure code: 0x80004004 (NS_ERROR_ABORT) [mozIStorageStatement.executeStep]" nsresult: "0x80004004 (NS_ERROR_ABORT)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: anonymous :: line 169" data: no]" {file: "chrome://zotero/content/bindings/itembox.xml" line: 1700}]

    had to restart Firefox
  • Yeah, this is annoying. In Firefox 3.5 we switched to asynchronous DB access for autocomplete to make it usable on very large libraries (i.e., without a two-minute wait), but the new method appears to be causing hangs. I've disabled asynchronous access in the latest dev build, and we'll keep it off until we've sorted this out.
  • Hi Dan, well that's mostly much better (using r5020). I did just crash Firefox by clicking on the drop-down list from the auto-complete in an authors name. But at least it failed gracefully and I could just restart Firefox and go on.
  • edited September 3, 2009
    Autocomplete is currently lighting quick for Author, but pretty slow for Publication and Place, which is weird 'cos there must be many less possible entries.
    (my Library has about 4000 items).

    Is the asynchronous DB access only for the Author field in the current version? (2.0b6.5)

    If you have to disable it in a beta release, will it come back soon?!
  • Right, so, komarde's post made me take a look at the execution plan of the query being used, and, well, this is now fixed. One of the tables involved was missing an index, so autocomplete was searching through all item data values instead of just those for the field being searched.

    If you're comfortable using sqlite3, you can fix this yourself right now:

    CREATE INDEX itemData_fieldID ON itemData(fieldID);
    This will work on 1.0 databases as well.

    Otherwise, wait for 2.0b7, which will include this fix. It won't be a problem if you've already run the command above.

    Apologies for not catching this sooner.
  • Upgraded to Firefox 4 and Zotero 2.1 yesterday (3/24/11), and I'm still getting Firefox hanging when updating an author field. Not so severe as described above, at least, but it still lasts for several minutes.
  • The issue above was definitely fixed. Start a new thread if you're still having trouble.
This discussion has been closed.