Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Javascript error, memory leak and other assorted explosions #987

Closed
Mottie opened this Issue · 5 comments

4 participants

@Mottie

If I enter the following snippet of code at JSHint.org (yes, I know there is a missing ) in the if statement line, that's part of the problem):

$('input')
    .bind('custom', function(){
        if (!$('input').is(":visible") { return false; }
    })
    .bind('custom2', function(){
        // test
    });

I see the following error:

Uncaught TypeError: Cannot read property 'value' of undefined jshint.js:2108

If I continue to click the Lint button, I see these errors:

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. events:106
console.trace() events:110
EventEmitter.addListener events:110
api.on jshint.js:3348
api.on jshint.js:3347
exports.register style.js:70
state.tokens.prev.state.tokens.curr.state.tokens.next jshint.js:3355
itself jshint.js:3354
opts xoxo.js:183

Then as I continue to click, the initial error repeats... and all this while nothing visible happens on the main page.

Oddly, if I remove the second .bind() function, JSHint begins to work as expected.

@rwaldron
Owner

Probably important to mention that you see this error in your developer tools console...

@Mottie

Sorry, yes, all of the above errors are seen in the Chrome developer tools console.

@mauri

It's happening on firefox too.

@valueof
Owner

To fix the EventEmitter bug we just need to upgrade to the latest browserify. I'm working on that.

@valueof valueof referenced this issue from a commit
@valueof valueof Upgrade Browserify to 2.12.0
This should improve performance on Rhino and resolve EventEmitter
leaks.

Closes GH-983.
Closes GH-958.
Closes GH-931.
Closes GH-889.
Affects GH-987.
f2843c5
@valueof
Owner

This is fixed on master.

@valueof valueof closed this
@jugglinmike jugglinmike referenced this issue from a commit in jugglinmike/jshint
@valueof valueof Upgrade Browserify to 2.12.0
This should improve performance on Rhino and resolve EventEmitter
leaks.

Closes GH-983.
Closes GH-958.
Closes GH-931.
Closes GH-889.
Affects GH-987.
d54e023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.