GNOME Bugzilla – Bug 672404
[mpegtsbase] eos event handling error
Last modified: 2012-04-12 14:01:08 UTC
Created attachment 210095 [details] [review] proposed patch The module will report a "CRITICAL **: g_hash_table_foreach: assertion `version == hash_table->version' failed" error on the EOS event.
+ Trace 229915
Thread 6 (Thread 0x7fffebfff700 (LWP 8824))
A quick analysis shows that this is caused by removing elements of the program hash table while iterating over it, which is not allowed.
That seems like the wrong approach (getting a list of the keys for removing entries in a hash table).
g_hash_table_remove_all() or g_hash_table_foreach_remove() seem more appropriate.
I am not getting a list of keys, I'm getting a list of values. Anyway, my initial approach was towards g_hash_table_foreach_remove() however I had to mess with quite a bit of code to do it, so I opted for this somewhat clean approach. Feel free to make an alternative fix.
This patch is no longer relevant after commit 881350f34cac858be52ce5b59e71ed7069bcb17a.