Skip to content

Too much time spent in unload handler error #34

Closed

Description

@kevinsawicki
[0625/121418:INFO:CONSOLE(1)] "Uncaught Error: Too much time spent in unload handler.", source: v8/DateExtension (1)

Is there a way to get more details about this error? It seems serious.

Activity

  1. zcbenz commented on Jun 26, 2013

    @zcbenz
    Contributor

    This exception is mainly implemented in Chromium by trapping the Date.getTime call in unload handler:
    https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/v8/DateExtension.cpp&q=Too%20much%20time%20spent%20in%20unload%20handler&sq=package:chromium&type=cs&l=43

    In the case of Atom, Date.getTime is mainly called by jQuery to create event objects, and this exception happens when clearing DOM in the unload handler:
    https://github.com/github/atom/blob/master/src/app/window.coffee#L102

    The Too much time spent in unload handler error is thrown because jQuery has created more than 1000 event objects (which calls Date.getTime), and it's mainly generated by jQuery.cleanData.

    You can do a try/catch in unload handler and print the stack trace to catch it.

    Simply do not clean DOM in unload handler would fix this, preventing this exception to occur requires patching Chromium.

  2. probablycorey commented on Jul 8, 2013

    @probablycorey

    This is mainly a result of the package config panel. There are ~6 events
    created for each package view. This results in a slow shutdown. I tried to
    do some clever things by overriding clearData in the config panel's
    shutdown, but I think the real solution is to redo how we are displaying
    packages and handling package events.

    On Tue, Jun 25, 2013 at 7:50 PM, Cheng Zhao [email protected]:

    This exception is mainly implemented in Chromium by trapping the
    Date.getTime call in unload handler:

    https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/v8/DateExtension.cpp&q=Too%20much%20time%20spent%20in%20unload%20handler&sq=package:chromium&type=cs&l=43

    In the case of Atom, Date.getTime is mainly called by jQuery to create
    event objects, and this exception happens when clearing DOM in the unloadhandler:
    https://github.com/github/atom/blob/master/src/app/window.coffee#L102

    The Too much time spent in unload handler error is thrown because jQuery
    has created more 1000 event objects (which calls Date.getTime), and it's
    mainly generated by jQuery.cleanData.

    You can do a try/catch in unload handler and print the stack trace to
    catch it.

    Simply do not clean DOM in unload handler would fix this, preventing this
    exception to occur requires patching Chromium.

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-20024321
    .

  3. zcbenz commented on Aug 13, 2013

    @zcbenz
    Contributor

    This exception is now disabled: electron/libchromiumcontent@d241605.

  4. added 2 commits that reference this issue on May 9, 2017
  5. added a commit that references this issue on Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions