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

[possible EventEmitter memory leak detected] #39

Open
kawashimaken opened this issue Aug 19, 2016 · 1 comment
Open

[possible EventEmitter memory leak detected] #39

kawashimaken opened this issue Aug 19, 2016 · 1 comment

Comments

@kawashimaken
Copy link

kawashimaken commented Aug 19, 2016

I am new to this library and Raspberry Pi, I might miss some important detail in this issue report.

I just copied the official servo example from the following link: https://cylonjs.com/documentation/examples/raspi/js/servo/
(I also did all the necessary related setup and configurations)

The problem I encountered is that
I can confirm the servo is moving as supposed, and log is shown as well, however after several lines, an error message is shown as follows(and the servo keep on moving as it should be):


2016-08-19T14:04:44.687Z : [Robot 1] - Starting connections.
2016-08-19T14:04:44.783Z : [Robot 1] - Starting connection 'raspi' on port /dev/ttyACM0.
2016-08-19T14:04:44.799Z : [Robot 1] - Starting devices.
2016-08-19T14:04:44.802Z : [Robot 1] - Starting device 'servo' on pin 11.
2016-08-19T14:04:44.803Z : [Robot 1] - Working.
Current Angle: 70
Current Angle: 110
Current Angle: 150
Current Angle: 110
Current Angle: 70
Current Angle: 30
Current Angle: 70
Current Angle: 110
Current Angle: 150
Current Angle: 110
(node) warning: possible EventEmitter memory leak detected. 11 pwmWrite listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
at PwmPin.addListener (events.js:239:17)
at Raspi._pwmWrite (/home/pi/kawashimaken/mynodeiot/node_modules/cylon-raspi/lib/raspi.js:258:7)
at Raspi.servoWrite (/home/pi/kawashimaken/mynodeiot/node_modules/cylon-raspi/lib/raspi.js:292:8)
at Servo.angle (/home/pi/kawashimaken/mynodeiot/node_modules/cylon-gpio/lib/servo.js:102:19)
at null._repeat (/home/pi/kawashimaken/mynodeiot/servo.js:24:16)
at wrapper as _onTimeout
at Timer.listOnTimeout (timers.js:92:15)
Current Angle: 70
Current Angle: 30
Current Angle: 70
Current Angle: 110
Current Angle: 150
Current Angle: 110


Is it the problem related to node.js version? (By the way, I have tried node.js 4.x and 6.x, the problem are the same, OS is also updated to raspbian jessie)Only node.js 0.10.x is supported? It will be appreciated if anyone can share some wisdom.

Thank you in advance!

@ericterpstra
Copy link

I'm having this issue as well.

However, after stopping and starting the script a few times, the servo stops moving. The console output is exactly the same, and it looks like it should be running fine, but the servo does not move. After rebooting, I can run the script and the servo moves again.

I'm using a Pi 2 B+ with the latest Jessie as of 9/17/16 (fresh install)

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

2 participants