From: Darren S. <li...@yo...> - 2008-06-17 15:36:30
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1213710439 -3600 # Node ID 92ad7eeb66f5df7e56ae843fdacc3aa8d4f9f557 # Parent 2c71f44bc1523c9cf41833cd1624b4efb908837a Lock when updating the console window to avoid a race & possible GTK crash. The race involves a text buffer iterator within GTK, used when reflowing the text view content, being exposed to possible invalidation. diff -r 92ad7eeb66f5df7e56ae843fdacc3aa8d4f9f557 -r 2c71f44bc1523c9cf41833cd1624b4efb908837a ChangeLog --- a/ChangeLog Tue Jun 17 14:47:19 2008 +0100 +++ b/ChangeLog Tue Jun 17 14:44:28 2008 +0100 @@ -1,4 +1,6 @@ 0.5.904: 2008/??/?? 0.5.904: 2008/??/?? + * Add a lock to avoid a race which can cause GTK crashes when + updating the console log window. 0.5.903: 2008/06/12 * Apply auto-detection of DVD and VCD images to files & directories diff -r 92ad7eeb66f5df7e56ae843fdacc3aa8d4f9f557 -r 2c71f44bc1523c9cf41833cd1624b4efb908837a src/log_window.c --- a/src/log_window.c Tue Jun 17 14:47:19 2008 +0100 +++ b/src/log_window.c Tue Jun 17 14:44:28 2008 +0100 @@ -215,12 +215,14 @@ static void log_console_text_internal (c GtkTextBuffer *buffer = gtk_text_view_get_buffer (console); GtkTextIter end; + gdk_threads_enter (); gtk_text_buffer_get_end_iter (buffer, &end); if (err) gtk_text_buffer_insert_with_tags_by_name (buffer, &end, line, -1, "error", NULL); else gtk_text_buffer_insert (buffer, &end, line, -1); log_clip (buffer); + gdk_threads_leave (); } void log_console_text (const char *line, int err) |