rpms/cheese/devel cheese-countdown-crasher.patch, NONE, 1.1 cheese.spec, 1.77, 1.78

Bastien Nocera hadess at fedoraproject.org
Wed Mar 24 11:40:07 UTC 2010


Author: hadess

Update of /cvs/pkgs/rpms/cheese/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv11004

Modified Files:
	cheese.spec 
Added Files:
	cheese-countdown-crasher.patch 
Log Message:
* Wed Mar 24 2010 Bastien Nocera <bnocera at redhat.com> 2.29.92-4
- Fix possible crasher when countdown reaches zero


cheese-countdown-crasher.patch:
 libcheese/cheese-countdown.c |    3 ---
 src/cheese.c                 |   11 ++++++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

--- NEW FILE cheese-countdown-crasher.patch ---
>From beee2792720f5a55820b9ce8df94d985c6d139d0 Mon Sep 17 00:00:00 2001
From: Filippo Argiolas <filippo.argiolas at gmail.com>
Date: Wed, 24 Mar 2010 08:52:13 +0100
Subject: [PATCH] countdown: move rsvg_init and rsvg_term into main

Initialize rsvg at startup and clean it up at exit.
rsvg_term is particularly subtle as it calls xmlCleanupParser()
triggering nasty crashes (e.g. with PulseAudio) with multithread
applications.
See http://0pointer.de/blog/projects/beware-of-rsvg-term.html for more
info.
Rsvg loading seems to work even without these functions so I'm not sure
it's worth to keep them.

https://bugzilla.gnome.org/show_bug.cgi?id=592100
---
 libcheese/cheese-countdown.c |    3 ---
 src/cheese.c                 |   10 ++++++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/libcheese/cheese-countdown.c b/libcheese/cheese-countdown.c
index b2782e2..d849594 100644
--- a/libcheese/cheese-countdown.c
+++ b/libcheese/cheese-countdown.c
@@ -504,8 +504,6 @@ create_surface_from_svg (GtkWidget *widget, gchar *pcFilename)
 
   CheeseCountdownPrivate *priv = CHEESE_COUNTDOWN_GET_PRIVATE (widget);
 
-  rsvg_init ();
-
   /* load svg-file from disk */
   pSvgHandle = rsvg_handle_new_from_file (pcFilename, &pError);
   if (!pSvgHandle)
@@ -546,7 +544,6 @@ create_surface_from_svg (GtkWidget *widget, gchar *pcFilename)
 
   /* clean up */
   rsvg_handle_free (pSvgHandle);
-  rsvg_term ();
   cairo_destroy (pContext);
 
   return pSurface;
diff --git a/src/cheese.c b/src/cheese.c
index 5e1c952..f143ecf 100644
--- a/src/cheese.c
+++ b/src/cheese.c
@@ -110,6 +110,10 @@ main (int argc, char **argv)
   g_thread_init (NULL);
   gdk_threads_init ();
 
+  /* initialize rsvg */
+  /* needed to load the camera icon for the countdown widget */
+  rsvg_init ();
+
   g_set_application_name (_("Cheese"));
 
   context = g_option_context_new (N_("- Take photos and videos with your webcam, with fun graphical effects"));
@@ -159,5 +163,11 @@ main (int argc, char **argv)
   gtk_main ();
   gdk_threads_leave ();
 
+  /* cleanup rsvg */
+  /* Note: this function is bad with multithread applications as it
+   * calls xmlCleanupParser() and should be only called right before
+   * exit */
+  rsvg_term ();
+
   return 0;
 }
-- 
1.6.6.1

Index: cheese.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cheese/devel/cheese.spec,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -p -r1.77 -r1.78
--- cheese.spec	19 Mar 2010 19:50:11 -0000	1.77
+++ cheese.spec	24 Mar 2010 11:40:07 -0000	1.78
@@ -1,6 +1,6 @@
 Name:           cheese
 Version:        2.29.92
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Application for taking pictures and movies from a webcam
 
 Group:          Amusements/Graphics
@@ -12,6 +12,8 @@ Source0:        http://download.gnome.or
 Patch0:         no-webcam.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=613287
 Patch1:         cheese-effects-i18n.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=592100
+Patch2:         cheese-countdown-crasher.patch
 
 BuildRequires: gtk2-devel >= 2.19.1
 BuildRequires: dbus-devel
@@ -67,6 +69,7 @@ for writing applications that require a 
 %setup -q
 %patch0 -p1 -b .no-webcam
 %patch1 -p1 -b .effects-i18n
+%patch2 -p1 -b .countdown-crasher
 
 %build
 %configure --disable-static
@@ -170,6 +173,9 @@ fi
 %{_libdir}/pkgconfig/cheese-gtk.pc
 
 %changelog
+* Wed Mar 24 2010 Bastien Nocera <bnocera at redhat.com> 2.29.92-4
+- Fix possible crasher when countdown reaches zero
+
 * Fri Mar 19 2010 Matthias Clasen <mclasen at redhat.com> 2.29.92-3
 - Fix text rendering issues on the effects tab
 



More information about the scm-commits mailing list