Script Error with Zotero 2.0

Hey all,

Ever since I've upgraded to Zotero 2.0 (a couple of weeks ago... just getting around to posting it), I've been experiencing an annoying error. When I start Firefox, it will take a long time to load, freeze up for a bit, and then display the following error:

"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Script: chrome://zotero/content/xpcom/translate.js:244"

My button options are "Stop Script" or "Continue". I have to "Stop Script" for Firefox to become responsive. By the way, I'm loading about:blank when Firefox loads, so it's not an interaction with some webpage.

I'm using Firefox 3.6 on a Windows XP Professional machine. I never received any similar error before Zotero 2.0.
«1
  • Is this a network drive or a local drive?

    Have you modified any translators?

    Have you checked your disk for errors?

    If local/no/yes, provide a Debug ID for the startup using the "Enable after restart" option.
  • I have exactly the same problem. NO modifications of translators, no disk errors, local drive. Same version of Firefox and Zotero. The bug has also been reported on Mozilla (google the warning message).
  • The answer is local/no/yes.

    I'm having a bit of difficulty capturing the error with the Debugger. (When I turn on the Debugger, check "Enable after restart" and then restart Firefox, I'm not getting the error.)

    I'll keep trying to capture the bug with the Debugger.
  • I've gotten the same error message. Firefox startup was very slow before I got it (heavy CPU use). When I clicked "Continue" it proceeded normally, however.
  • Do you get it repeatedly, or only before you hit Continue the first time?

    Translator installation (which happens on new installs and upgrades) appears to be fairly slow on Windows, which could cause this message to appear (though that should really be only on slower computers). We'll see if we can speed that up, but the message shouldn't appear on subsequent restarts.
  • Same issue for me- same computer setup. I had never gotten an error with Zotero before the upgrade, and the script error comes up every day, often while I have only one tab, and no other programs running. I turned off the new synchronization feature, as that hung up immediately with my large library. Still, the script error.
  • edited March 15, 2010
    Unless the message says "Script: chrome://zotero/content/xpcom/translate.js:244", it has nothing to do with this thread and you should start a new one.

    If it does say "translate.js:244", answer my question above.
  • As I said same issue. If it was a different error message, I wouldn't have posted here, I found the page by searching for the error number.
    "Script: chrome://zotero/content/xpcom/translate.js:244"
    Windows XP pro svc pack 3, Firefox 3.6
    Using local drive, did not modify translators or anything else in Zotero after upgrading except the sync function I mentioned. I thought that was the problem.
    Checked disk for errors, none found.
    This error came up 6 or 8 times after the upgrade, every time I started Firefox over the last week. Tried clicking continue, and browser still hung up. Had to resort to stopping the script. Did not happen yesterday or today.
  • stefanlil: No need to be indignant—many people don't differentiate between script errors on different lines, and you gave no indication that it was happening during Firefox startup. (What does "while I have only one tab" mean if you're referring to Firefox startup?)

    As I said above:
    If local/no/yes, provide a Debug ID for the startup using the "Enable after restart" option.
  • Same problem here, same config. as others who reported. I've been receiving the message since I installed the new version but didn't really think there was a problem until I noticed that the "add an entry" icon that usually appears when I'm looking at references in library or google books databases wasn't appearing in the address line of firefox, so I came here to research the error message, thinking they might be related. Given that no one else is mentioning this problem in this message thread, they may not be. I ran the debug as you suggested and got following ID code: D1355999978. I ran it and got only 4 lines reported, checked "report to Zotero," got the ID number above, then went back to clear out the output cache and saw that it now had 30 lines reported. Hopefully that's not an issue?

    This is the first time I've reported anything to y'all, do I need to do anything else?

    gracias,
    Laura
  • If you click Stop Script to the translate.js:244 message, translators quite likely wouldn't work.

    http://www.zotero.org/support/kb/unresponsive_script_warning

    Don't click Stop Script.
  • I have been having this problem as well. The Debug ID is D1813409470

    The problem took a couple of re-starts to get to work properly so there may be allot of unhelpful stuff towards the beginning.
  • Same problem. XP Pro up-to-date, Firefox 3.6.3, Zotero 2. Boot up is fragile and VERY slow. Then the following warning appears.

    "Warning: Unresponsive script. A script on this page may be busy, or it may have stopped responding. You can stop the script now or you can continue to see if the script will complete.

    Script: chrome//zotero/content/xpcom/translate.js:244"

    It never completes. All activities eventually grind to a halt.

    QUESTION: Is there no "Remove" program? I would like to remove this program from my computer.
  • edited April 8, 2010
    It never completes. All activities eventually grind to a halt.
    Click Continue a few times. It will complete, and it won't reappear, at least until the next upgrade. This seems to be related to very slow disk access from Firefox on Windows.

    You can also just adjust the pref.
    QUESTION: Is there no "Remove" program? I would like to remove this program from my computer.
    http://www.zotero.org/support/kb/uninstalling
  • Dan et al,

    "Continue" has never cleared it. In my case it just reappeared.

    I had gone to Firefox "Add-ons" but forgot we had to also click "Extensions" to reach the remove function. Not a very logical UI.

    All memory leakage issues, if that's what it is, appear to be gone when I removed Zotero Ver. 2. I can deal with that. Thanks.
  • As Dan pointed out, you also had the option of setting a longer script timeout, or of disabling the warning altogether. But if uninstalling has resolved things for you, that's great.
  • It is really a nuisance - Firefox needs MUCH more time to start if Zotero is enabled (Win XP, Firefox 3.6.0-3.6.3, it came roughly with Zotero 2.0, give or take one version step).

    Disabling the error message would not solve the slow start. If I hadn't put extremely much work into getting much of literature into Zotero I would throw it away.

    I have the impression that the problem is worst if there is no internet connection when I start Zotero. Does Zotero 'phone home' or access some other web site in the background if autosync is disabled? Slow response of that web site would explain the troubles.
  • Disabling the error message would not solve the slow start.
    Have you tested that? (Note that the first startup of Firefox after enabling/disabling an extension will be slower.)

    On my Mac, normal (i.e., not-post-upgrade) Zotero initialization during startup takes under 4/10 of a second and caching translators (which happens the first time you load a web page, including a browser home page) takes about 1/10 of a second.

    On Windows running via Parallels (which should be considerably slower than running Windows directly), initialization takes 1-2 seconds and translator caching takes under 2/10 of a second.

    If you send in a Debug ID generated with the "Enable after startup" option, I can review your timings. (Note that these timings would only be valid with the unresponsive script warning disabled.) But if they're considerably slower, you likely either have a very slow computer or something else is taking up disk/CPU time.

    These times don't count opening the Zotero pane, the speed of which will depend on how big your library is. I've explained that elsewhere, where I also explain that, on Windows, the best thing to do is to simply leave at least one Firefox window open. (Firefox is almost never closed completely on Macs, so this is a non-issue there.)
  • Maybe this is helpful for the developers, here are the slow items from the zotero debug window (opening Firefox after system reboot and waiting for the harddisk activity to cease, network cable plugged off; if there is a large difference, times with network plugged in in parentheses). With the times reported here, there was no 'Script may be busy' error.

    (+0001611): Integration HTTP server going offline
    (+0018999): Cached 284 translators in 8269 ms
    (+0048136): Purged data tables in 0 ms (+0017367 with network on)
    (+0087629): Getting Zotero sync password (+0011039 with network on)
    (+0005297): Registering observer for [collection,search,share,group,bucket] in notifier with hash dm' (+0002617 with network on)

    These times vary a lot, but the slow items are usually the same.

    The time for 'Purged data tables' is probably incorrect, maybe the time since the first start of Firefox; after waiting a while, closing&reopening Firefox (when it is much faster) it gave +0309371 milliseconds, another restart an hour later gave +0000000!

    Configuration: Win XP, Intel Core2Duo, 2 GB RAM no Tray/prefetch service for Firefox quickstart.. Zotero: 505 items in database, autosync off, webdav server for attachments (usually 1 PDF/item)
    Firefox first startup time is never below 32 s with Zotero (if it is unusually fast and there is no error message), sometimes much slower, constant 20 sec without Zotero
  • Again, we're not talking about opening the Zotero pane on this thread, so the last three lines don't matter. And times from the first Firefox startup after a system reboot aren't particularly relevant, either, since that's dealing with uncached disk reads, which are mostly just a function of your system disk speed. Most people these days (at least on Macs) have system uptimes measured in weeks or months.

    The times that would be important are the initialization and translator caching times for a normal (warm) Firefox startup. If we're talking 20 seconds for just starting Firefox, then this isn't going to be a helpful discussion, since a regular Firefox startup should take no more than a few seconds, and Zotero should contribute to a fraction of that.
  • Windows XP is by far not as stable as Mac OS, and I guess that many users switch off their Windows notebooks over night (I do that even with my Mac; why should I leave it on over night? It boots very quickly, and I would have to type the password anyway).

    So these times are for cold start, and that's also when the error message appears. I have never seen that error when restarting Firefox. The error message typically comes if I start the notebook to quickly access a web page, and that's also when I experience some very long Firefox startup times.

    I agree that hard disk speed seems to play a role, the difference between Firefox startup with Zotero enabled and disabled seems to be especially large if there is still disk activity after system boot.
  • I do that even with my Mac; why should I leave it on over night?
    Because it uses only a few watts in sleep mode, it wakes up instantly with saved state, and you don't need to wait for the OS to boot, for all your programs and documents to reload, and for the disk cache to repopulate? Honestly, I don't know anybody who shuts down their Mac regularly (or who has done so regularly in many years), and Macs seem pretty clearly designed to be used with sleep mode.

    There may be things we can do to optimize startup—for example, loading only the JSON header from translators at startup and loading the full code only when needed the target regexp passes on a page—and we're always looking to speed things up, but it doesn't make much sense to me to spend all that much development time optimizing for a somewhat antiquated computer usage model.* As I explained on that other thread about pane opening speed, we've optimized Zotero for how many people use Firefox these days, which is to always have at least one window open. And you're saying that you don't get the script warning on Firefox restarts either.

    * An exception is institutional setups where a log out and log in is required, though it's vaguely possible that the disk cache could still help in such cases.
  • for example, loading only the JSON header from translators at startup and loading the full code only when needed the target regexp passes on a page
    Actually, looking at the code, we already do this. Only the few translators that are run on every page are loaded in full at startup.
  • For what it's worth, on a cold boot on a recent MacBook Pro, I'm getting Zotero initialization in 1.3 seconds and translator caching in 1 second.
  • It is no issue with Mac OS, I agree; cold start of Firefox with Zotero is reasonably fast on my Mac. It is *much* slower on Windows XP, even with comparable hardware (maybe related to the more efficient file system of unix-type systems?)
    P.S. Dan, thank you for looking into this and not ignoring it, even though it may be somewhat annoying for you!
  • It is *much* slower on Windows XP, even with comparable hardware (maybe related to the more efficient file system of unix-type systems?)
    Yeah, I'm not sure why this is. I test Windows through Parallels and have generally assumed that performance issues have been due to the compatibility layer. If disk access under Windows XP is just much, much slower, I'm not sure how much we're going to be able to do about that. But if we can find particular access patterns that cause Windows XP to be so much slower, we'll do our best to change them.
  • A tiny bit of progress: Antivirus software(Antivir.de) and the firewall are not making it slower - I tried with firewall off and disabled Antivir checking on read.
    Besides finding the slow items in Zotero debug (see above), is there anything else I can do to identify what makes it slow?
  • Provide a Debug ID for the startup rather than individual timings.
  • You can also try the 2.0 branch dev XPI, which uses a slightly modified startup sequence that may affect this—though it may just push the problem to another line.
  • Debug ID (with Zotero 2.0) is D686137964. This was a cold start of Firefox after all post-login disk activity had died out, thus a comparably fast one (35 sec), not causing the error message to appear.

    2.0 branch dev 2.0.3r6015:
    The error message "A script on this page may be busy, or it may have stopped responding..." seems to be gone. I did two cold starts of Firefox immediately after login — a situation where the error message was likely to appear with 2.0 — no error message so far, even though Firefox startup time was well above 1 minute.
    For a cold start after all disk activity was over, I did not find a noticeable speed improvement with 2.0.3r6015; seems I have to live with Windows being a slow system.
Sign In or Register to comment.