RobotWebTools / roslibjs

The Standard ROS JavaScript Library
https://robotwebtools.github.io/roslibjs
Other
691 stars 382 forks source link

memory leak during travis CI run #241

Closed williamcroberts closed 7 years ago

williamcroberts commented 7 years ago

Memory leak reported in Travis CI test run: https://travis-ci.org/RobotWebTools/roslibjs/jobs/181901065

ROS callOnConnection (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. Trace at EventEmitter.logPossibleMemoryLeak (/home/travis/build/RobotWebTools/roslibjs/node_modules/eventemitter2/lib/eventemitter2.js:53:15) at EventEmitter.on (/home/travis/build/RobotWebTools/roslibjs/node_modules/eventemitter2/lib/eventemitter2.js:516:31) at Context.<anonymous> (/home/travis/build/RobotWebTools/roslibjs/test/ros.test.js:16:22) at callFn (/home/travis/build/RobotWebTools/roslibjs/node_modules/mocha/lib/runnable.js:326:21) at Test.Runnable.run (/home/travis/build/RobotWebTools/roslibjs/node_modules/mocha/lib/runnable.js:319:7) at Runner.runTest (/home/travis/build/RobotWebTools/roslibjs/node_modules/mocha/lib/runner.js:422:10) at /home/travis/build/RobotWebTools/roslibjs/node_modules/mocha/lib/runner.js:528:12 at next (/home/travis/build/RobotWebTools/roslibjs/node_modules/mocha/lib/runner.js:342:14) at /home/travis/build/RobotWebTools/roslibjs/node_modules/mocha/lib/runner.js:352:7 at next (/home/travis/build/RobotWebTools/roslibjs/node_modules/mocha/lib/runner.js:284:14) at Object._onImmediate (/home/travis/build/RobotWebTools/roslibjs/node_modules/mocha/lib/runner.js:320:5) at processImmediate [as _immediateCallback] (timers.js:363:15) ROSLib uses utf8 encoding by default.It would be more efficent to use ascii (if possible)

T045T commented 7 years ago

That warning is expected - the test is checking whether this exact behavior happens as expected (see the comment in ros.test.js.9)