shama / navelgazer

:tangerine::crystal_ball: A super fast, light weight, simple file watcher and platform layer for gaze.
MIT License
21 stars 1 forks source link

Assertion failed: (handle->flags & UV_CLOSING), function uv__finish_close, file ../deps/uv/src/unix/core.c, line 171. #7

Open shama opened 9 years ago

shama commented 9 years ago

When running https://github.com/shama/gaze/blob/master/test/safewrite_test.js test on gaze.

am11 commented 9 years ago

Hi, sorry for not obtaining the full context here before posting this comment. :)

.. but it seems like a close cousin to a double free()ing issue.

Actually we were having the similar issue with node-sass, which we fixed by not de-allocating certain input string. See https://github.com/sass/node-sass/pull/589#issuecomment-68799726 (and the diff in the PR).

To be precise, the uv_closing was throwing the assertion exception after our sass context was getting disposed and just before mocha was initiating the next test.

If you are free()ing the memory (C) like we are, just comment each free line one by one and see when it fix the problem.

If you are deleteing the memory (C++), then the reference tracking kicks in and it will take care of most of issues, but then it is more like it hides the details and the error is exposed up until libuv tries to fires the closing event. Again, you can try uncommenting the delete statements to see if it narrows down the problem.

On a slightly separate note, test with latest stable version of node-sass 0.10.35, if you are not already.

HTH.

shama commented 9 years ago

Interesting, thanks for the tip. I think this might actually be fixed now but I have yet to confirm.