-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(indev branch) Voice stopPlaying() seems to crash #98
Comments
Popping this here just as an idea: Since the issue here is with Windows not understanding term signals and crashing, what about checking if (this.streamProc) {
this.streamProc.stdin.end();
if (process.platform === 'win32') {
let spawn = require('child_process').spawn;
spawn("taskkill", ["/pid", this.streamProc.pid, '/f', '/t']);
} else {
this.streamProc.kill();
}
} I also changed This is totally untested and just an idea. I have no clue if there are any repercussions of doing it this way, though I wouldn't think there are since it's essentially the Windows way of doing |
discord.js currently has a bug that crashes `next` and similar commands (see discordjs/discord.js#98). This is a temporary workaround.
Actually, the same issue occurs on an Ubuntu virtual machine when I tested
|
I'm getting a slightly different stacktrace:
But otherwise the same behaviour, |
I believe that this is actually the same error, but on different node
|
So on the indev branch, when I try to do voiceConnection.stopPlaying() it crashes with a
Error: write EPIPE
on my computer - Windows 10 x64, node.js v0.12.9. However this only happens with the new 'fix' that was implemented in the indev branch to kill the ffmpeg/avconv processes when they were done. But this 'fix' only broke my ability to use the stopPlaying(). Upon commenting out this line it fixes the issue, but as you know it can leave ffmpeg running as a child process.I'm still trying to find a fix for it, I'll keep this posted if I do find one.
I suspect it may be because of theJust commenting out that line still crashes it, I have to comment out the whole block to allow it to run normally. That's not good asSIGINT
being sent that is not handled properly on Windows?ffmpeg.exe
does keep running in the background.The line(s) causing it in the new indev update is here - https://github.com/hydrabolt/discord.js/blob/indev/lib/Voice/VoiceConnection.js#L94-L98
The full error stack I encountered is below:
Update: It also happens when I run it on an Ubuntu VM
The text was updated successfully, but these errors were encountered: