Comment 6 for bug 420546

Revision history for this message
Kevin DeKorte (kdekorte-gmail) wrote :

I believe the reporter of this issue has the environment variable

export G_DEBUG=fatal_warnings

set. However, what is happening is that gnome-mplayer is shutting down and trying to gracefully shutdown the threadpool for retrieving metadata. But gtk is not handling a empty/flushed pool correctly and issuing the error.

I put in a workaround to not call this function when running under the control of gecko-mediaplayer

Index: src/gui.c
===================================================================
--- src/gui.c (revision 1526)
+++ src/gui.c (working copy)
@@ -1374,16 +1374,21 @@
     }

     mplayer_shutdown();
- g_thread_pool_stop_unused_threads();
- while (gtk_events_pending() || thread != NULL
- || g_thread_pool_unprocessed(retrieve_metadata_pool)) {
- gtk_main_iteration();
- }
- g_thread_pool_free(retrieve_metadata_pool, TRUE, TRUE);

- if (control_id != 0)
+ if (control_id == 0) {
+ g_thread_pool_stop_unused_threads();
+ while (gtk_events_pending() || thread != NULL
+ || g_thread_pool_unprocessed(retrieve_metadata_pool)) {
+ gtk_main_iteration();
+ }
+ g_thread_pool_free(retrieve_metadata_pool, TRUE, TRUE);
+ } else {
+ while (gtk_events_pending() || thread != NULL) {
+ gtk_main_iteration();
+ }
         dbus_cancel();
-
+ }
+
     dbus_unhook();