glib hash table assertion failures: need help in debuging



Hi all,

I have a GHashTable related question.

I am writing a volume monitor for GIO.

I have a code like this:

186	void pup_conv_mgr_close_all_convs(PupConvMgr *cmgr, PupConvCloseFlags flags)
187	{
188		GHashTableIter iter;
189		PupConv *oneconv;
190		g_hash_table_iter_init(&iter, cmgr->self_convs);
191		while(g_hash_table_iter_next(&iter, NULL, (gpointer *)&oneconv))
192		{
193			pup_conv_close(oneconv, flags | PUP_CONV_NOREMOVE);
194			if (flags&  PUP_CONV_FREE)
195				g_hash_table_iter_remove(&iter);
196		}
197		g_hash_table_iter_init(&iter, cmgr->other_convs);
198		while(g_hash_table_iter_next(&iter, NULL, (gpointer *)&oneconv))
199		{
200			pup_conv_close(oneconv, flags | PUP_CONV_NOREMOVE);
201			if (flags&  PUP_CONV_FREE)
202				g_hash_table_iter_remove(&iter);
203		}
204	}

Exactly at line 198 I get a warning like:

(pup-volume-monitor:4276): GLib-CRITICAL **: g_hash_table_iter_next: assertion `ri->version == ri->hash_table->version' failed

Although nothing worse happens, but I am curious to know why I get this.

Thanks in advance.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]