-
Notifications
You must be signed in to change notification settings - Fork 37
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
TypeError: Cannot read property 'on' of undefined #17
Comments
If I understand correctly, you are using the onchange package and it is using tree-kill? I don't yet have enough information to figure out what went wrong. The error |
I hope it will help you Node version: 7.5.0 I added some debug and added a test to not call ps.stdout.on if ps.stdout is null and that's it:
toggle full log entire log
is never called |
What happens if you switch back to Node version 6? |
Same bug with v6.9.5 |
Huh. This is on Linux? |
Mac OS 10.12.3 |
So i try to fix the issue. I thinks it's a too many process problem for the buildProcessTree part, if i add a setTimeout for each spawn call, no more stdout null bug. But the other problem is :
So in onClose, i change:
to:
And everything works. Why do you check the return code of the process ? |
I met the same issue as u @ohardy , your solution saved me! |
The return code of
By changing the != to == you're bailing out of the recursion prematurely. However the more I study this code, the more I'm not sure it is right. I think the forEach loop and the callback If anyone thinks of a better way to do the recursive process killing I'm all ears. I don't have spare cycles to investigate. (And don't have a Mac.) @ickma is yours Mac OSX too? |
In my case, i removed the option {stdio: 'inherit'} from the call spawn(command, args, options) and works. |
In my case, I have proctools installed on my macOS at, /usr/local/bin.
|
Use the default pgrep, available since os x mountain lion. proctools' pgrep does not implement `-P` correctly, returns unrelated processes, breaks tree-kill's assumption, and may cause a large number of pgrep processes. Reported in pkrumins#17 (comment) Update golang/vscode-go#90 (comment)
I use onchange package which crash in tree-kill.
Stack trace:
The text was updated successfully, but these errors were encountered: