Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Javascript error, memory leak and other assorted explosions #987

Closed
Mottie opened this Issue Apr 4, 2013 · 5 comments

Comments

Projects
None yet
4 participants

Mottie commented Apr 4, 2013

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.

Owner

rwaldron commented Apr 5, 2013

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

Mottie commented Apr 5, 2013

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

mauri commented Apr 5, 2013

It's happening on firefox too.

Owner

valueof commented Apr 8, 2013

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

valueof added a commit that referenced this issue Apr 8, 2013

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.
Owner

valueof commented Apr 8, 2013

This is fixed on master.

@valueof valueof closed this Apr 8, 2013

jugglinmike added a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment