From 437060f2e6dec45f6071e2a7958023b6aa76fad5 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 23 Oct 2015 11:46:06 +0200 Subject: [PATCH] Update to 3.18.1 --- .gitignore | 1 + 0001-Check-for-failed-rendering-jobs.patch | 133 --------------------- evince.spec | 9 +- sources | 2 +- 4 files changed, 7 insertions(+), 138 deletions(-) delete mode 100644 0001-Check-for-failed-rendering-jobs.patch diff --git a/.gitignore b/.gitignore index 7e84a44..40e4f96 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ evince-3.0.0.tar.bz2 /evince-3.17.4.tar.xz /evince-3.17.92.tar.xz /evince-3.18.0.tar.xz +/evince-3.18.1.tar.xz diff --git a/0001-Check-for-failed-rendering-jobs.patch b/0001-Check-for-failed-rendering-jobs.patch deleted file mode 100644 index c53502b..0000000 --- a/0001-Check-for-failed-rendering-jobs.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 61a6656bba99454d7e4ad3e9b8c4a4f7cabf68c3 Mon Sep 17 00:00:00 2001 -From: Marek Kasik -Date: Wed, 11 Feb 2015 12:13:40 +0100 -Subject: [PATCH] Check for failed rendering jobs - -Check whether creating of thumbnails for sidebar, thumbnails for recent view -or rendering of document itself failed to avoid crashes. - -https://bugzilla.gnome.org/show_bug.cgi?id=744049 ---- - libdocument/ev-document.c | 8 +++++--- - libview/ev-jobs.c | 26 +++++++++++++++++++++++++- - libview/ev-pixbuf-cache.c | 6 ++++++ - shell/ev-recent-view.c | 3 ++- - shell/ev-sidebar-thumbnails.c | 5 +++++ - 5 files changed, 43 insertions(+), 5 deletions(-) - -diff --git a/libdocument/ev-document.c b/libdocument/ev-document.c -index 6c2f1b9..6af0ad7 100644 ---- a/libdocument/ev-document.c -+++ b/libdocument/ev-document.c -@@ -724,11 +724,13 @@ _ev_document_get_thumbnail (EvDocument *document, - EvRenderContext *rc) - { - cairo_surface_t *surface; -- GdkPixbuf *pixbuf; -+ GdkPixbuf *pixbuf = NULL; - - surface = ev_document_render (document, rc); -- pixbuf = ev_document_misc_pixbuf_from_surface (surface); -- cairo_surface_destroy (surface); -+ if (surface != NULL) { -+ pixbuf = ev_document_misc_pixbuf_from_surface (surface); -+ cairo_surface_destroy (surface); -+ } - - return pixbuf; - } -diff --git a/libview/ev-jobs.c b/libview/ev-jobs.c -index e118855..3bbe7b0 100644 ---- a/libview/ev-jobs.c -+++ b/libview/ev-jobs.c -@@ -636,6 +636,21 @@ ev_job_render_run (EvJob *job) - g_object_unref (ev_page); - - job_render->surface = ev_document_render (job->document, rc); -+ -+ if (job_render->surface == NULL) { -+ ev_document_fc_mutex_unlock (); -+ ev_document_doc_mutex_unlock (); -+ g_object_unref (rc); -+ -+ ev_job_failed (job, -+ EV_DOCUMENT_ERROR, -+ EV_DOCUMENT_ERROR_INVALID, -+ _("Failed to render page %d"), -+ job_render->page); -+ -+ return FALSE; -+ } -+ - /* If job was cancelled during the page rendering, - * we return now, so that the thread is finished ASAP - */ -@@ -868,7 +883,16 @@ ev_job_thumbnail_run (EvJob *job) - g_object_unref (pixbuf); - } - -- ev_job_succeeded (job); -+ if ((job_thumb->format == EV_JOB_THUMBNAIL_PIXBUF && pixbuf == NULL) || -+ job_thumb->thumbnail_surface == NULL) { -+ ev_job_failed (job, -+ EV_DOCUMENT_ERROR, -+ EV_DOCUMENT_ERROR_INVALID, -+ _("Failed to create thumbnail for page %d"), -+ job_thumb->page); -+ } else { -+ ev_job_succeeded (job); -+ } - - return FALSE; - } -diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c -index f308c9c..c7ae47a 100644 ---- a/libview/ev-pixbuf-cache.c -+++ b/libview/ev-pixbuf-cache.c -@@ -337,6 +337,12 @@ job_finished_cb (EvJob *job, - - job_info = find_job_cache (pixbuf_cache, job_render->page); - -+ if (ev_job_is_failed (job)) { -+ job_info->job = NULL; -+ g_object_unref (job); -+ return; -+ } -+ - copy_job_to_job_info (job_render, job_info, pixbuf_cache); - g_signal_emit (pixbuf_cache, signals[JOB_FINISHED], 0, job_info->region); - } -diff --git a/shell/ev-recent-view.c b/shell/ev-recent-view.c -index fb0004c..97f2f8e 100644 ---- a/shell/ev-recent-view.c -+++ b/shell/ev-recent-view.c -@@ -350,7 +350,8 @@ static void - thumbnail_job_completed_callback (EvJobThumbnail *job, - GetDocumentInfoAsyncData *data) - { -- if (g_cancellable_is_cancelled (data->cancellable)) { -+ if (g_cancellable_is_cancelled (data->cancellable) || -+ ev_job_is_failed (EV_JOB (job))) { - get_document_info_async_data_free (data); - return; - } -diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c -index 49045f3..4186994 100644 ---- a/shell/ev-sidebar-thumbnails.c -+++ b/shell/ev-sidebar-thumbnails.c -@@ -936,7 +936,12 @@ thumbnail_job_completed_callback (EvJobThumbnail *job, - cairo_surface_t *surface; - #ifdef HAVE_HIDPI_SUPPORT - gint device_scale; -+#endif -+ -+ if (ev_job_is_failed (EV_JOB (job))) -+ return; - -+#ifdef HAVE_HIDPI_SUPPORT - device_scale = gtk_widget_get_scale_factor (widget); - cairo_surface_set_device_scale (job->thumbnail_surface, device_scale, device_scale); - #endif --- -2.1.0 - diff --git a/evince.spec b/evince.spec index d1f462a..6019c14 100644 --- a/evince.spec +++ b/evince.spec @@ -4,15 +4,14 @@ %global gxps_version 0.2.1 Name: evince -Version: 3.18.0 -Release: 2%{?dist} +Version: 3.18.1 +Release: 1%{?dist} Summary: Document viewer License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse Group: Applications/Publishing URL: https://wiki.gnome.org/Apps/Evince Source0: http://download.gnome.org/sources/%{name}/3.18/%{name}-%{version}.tar.xz -Patch0: 0001-Check-for-failed-rendering-jobs.patch Patch1: evince-3.17.2-check-to-avoid-crash.patch BuildRequires: pkgconfig(adwaita-icon-theme) @@ -122,7 +121,6 @@ This package contains the evince web browser plugin. %prep %setup -q -%patch0 -p1 -b .render-fail %patch1 -p1 -b .check-to-avoid-crash %build @@ -265,6 +263,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||: %{_libdir}/mozilla/plugins/libevbrowserplugin.so %changelog +* Fri Oct 23 2015 Kalev Lember - 3.18.1-1 +- Update to 3.18.1 + * Fri Oct 9 2015 Marek Kasik - 3.18.0-2 - Recommend evince-djvu in evince-libs not in evince diff --git a/sources b/sources index ca64b05..8897b32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9f857c73be31ad053bc3b6e4ac10c428 evince-3.18.0.tar.xz +388a813d7d30f1f778f7993efd7f3a40 evince-3.18.1.tar.xz