Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Closed

Javascript error, memory leak and other assorted explosions #987

Mottie opened this issue Apr 4, 2013 · 5 comments

Comments

@Mottie
Copy link

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.

@rwaldron
Copy link
Member

rwaldron commented Apr 5, 2013

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

@Mottie
Copy link
Author

Mottie commented Apr 5, 2013

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

@mauri
Copy link

mauri commented Apr 5, 2013

It's happening on firefox too.

@valueof
Copy link
Member

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
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.
@valueof
Copy link
Member

valueof commented Apr 8, 2013

This is fixed on master.

@valueof valueof closed this as completed Apr 8, 2013
jugglinmike pushed a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
This should improve performance on Rhino and resolve EventEmitter
leaks.

Closes jshintGH-983.
Closes jshintGH-958.
Closes jshintGH-931.
Closes jshintGH-889.
Affects jshintGH-987.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants