Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Assertion error when using zlib #6997

Closed
mafintosh opened this issue Jan 30, 2014 · 4 comments
Closed

Assertion error when using zlib #6997

mafintosh opened this issue Jan 30, 2014 · 4 comments
Labels

Comments

@mafintosh
Copy link
Member

When I unzip a stream using zlib.createGunzip() it will sometimes fail with:

node: ../src/node_zlib.cc:86: void node::ZCtx::Close(): Assertion `!write_in_progress_ && "write in progress"' failed.

I am using v.10.25. It seems to happen more if the stream is large.
Any ideas what could be causing this?

@indutny
Copy link
Member

indutny commented Jan 30, 2014

Hi!

Could you please paste a reproducible test case?

@indutny
Copy link
Member

indutny commented Jan 30, 2014

(Looks like it is receiving data after end event)

@trevnorris trevnorris added the zlib label Feb 5, 2014
@mafintosh
Copy link
Member Author

It turns out this happens when calling .close on the unzip stream directly after calling .write.

var unzip = zlib.createGunzip();
unzip.write(some_gzipped_buffer);
unzip.close(); // will crash with the above assert

indutny referenced this issue Feb 18, 2014
zlib should not crash in `close()` if the write is still in progress.

fix #7101
@indutny
Copy link
Member

indutny commented Feb 18, 2014

Fixed by 829a9b8

@indutny indutny closed this as completed Feb 18, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants