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

Fix crash on error when using stream #52

Merged
merged 1 commit into from
Mar 12, 2020
Merged

Conversation

kriscarle
Copy link
Contributor

The output stream was not closed after emitting the error. This was causing the main Node thread to crash with a segmentation fault, maybe when then spawn is cleaned up while still being attached to the open stream. This should fix #46 too

Happening for me on Node v10 and v12, possibly older versions are okay?

From the docs

The stream is not closed when the 'error' event is emitted unless the autoDestroy option was set to true when creating the stream.

After 'error', no further events other than 'close' should be emitted (including 'error' events).

https://nodejs.org/api/stream.html#stream_event_error

output stream was not closed after emitting the error
@wavded wavded merged commit 35947f1 into wavded:master Mar 12, 2020
@wavded
Copy link
Owner

wavded commented Mar 12, 2020

Thanks @kriscarle !

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

Successfully merging this pull request may close these issues.

Uncaught errors when opening a bad file
2 participants