Assert in _kqsub_free seems to be too strict
After debugging GIMP/GTK crash in file selector (see gimp#4048 (closed) and gtk#2245 (closed)) i found that root cause seems to be glib. According to my debug it is crashing in
_kqsub_free (kqueue_sub *sub)
{
g_assert (sub->deps == NULL);
g_assert (sub->fd == -1);
which is actually NULL and -1 if directory is unmounted (see original bug description).
If i am commenting out these asserts - GTK stops crashing. I am not sure if it is correct to leave them commented out so filling this bug. Crash dumps could be found in the referenced bugs.