From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 28 13:40:06 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F15ED106568F for ; Thu, 28 Aug 2008 13:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C90478FC2A for ; Thu, 28 Aug 2008 13:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7SDe5i5093515 for ; Thu, 28 Aug 2008 13:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7SDe5gU093514; Thu, 28 Aug 2008 13:40:05 GMT (envelope-from gnats) Resent-Date: Thu, 28 Aug 2008 13:40:05 GMT Resent-Message-Id: <200808281340.m7SDe5gU093514@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henrik Friedrichsen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5458106564A for ; Thu, 28 Aug 2008 13:35:12 +0000 (UTC) (envelope-from hrkfrd@googlemail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.189]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF518FC08 for ; Thu, 28 Aug 2008 13:35:11 +0000 (UTC) (envelope-from hrkfrd@googlemail.com) Received: by gv-out-0910.google.com with SMTP id n8so17925gve.39 for ; Thu, 28 Aug 2008 06:35:10 -0700 (PDT) Received: by 10.66.239.16 with SMTP id m16mr3400386ugh.9.1219930509966; Thu, 28 Aug 2008 06:35:09 -0700 (PDT) Received: from megawr.ath.cx ( [87.122.79.186]) by mx.google.com with ESMTPS id y6sm546672uge.8.2008.08.28.06.35.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Aug 2008 06:35:08 -0700 (PDT) Received: from megawr.ath.cx (localhost [127.0.0.1]) by megawr.ath.cx (8.14.2/8.14.2) with ESMTP id m7SDZi5T041582 for ; Thu, 28 Aug 2008 15:35:44 +0200 (CEST) (envelope-from henrik@megawr.ath.cx) Received: (from henrik@localhost) by megawr.ath.cx (8.14.2/8.14.2/Submit) id m7SDZiWs041581; Thu, 28 Aug 2008 15:35:44 +0200 (CEST) (envelope-from henrik) Message-Id: <200808281335.m7SDZiWs041581@megawr.ath.cx> Date: Thu, 28 Aug 2008 15:35:44 +0200 (CEST) From: Henrik Friedrichsen To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/126917: epdfview crashes when opening the print dialog X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Henrik Friedrichsen List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2008 13:40:06 -0000 >Number: 126917 >Category: ports >Synopsis: epdfview crashes when opening the print dialog >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 28 13:40:05 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Henrik Friedrichsen >Release: FreeBSD 7.0-STABLE i386 >Organization: >Environment: System: FreeBSD dsp.megawr.ath.cx 7.0-STABLE FreeBSD 7.0-STABLE #0: Sun Aug 24 21:14:38 CEST 2008 root@dsp.megawr.ath.cx:/usr/src/sys/i386/compile/KRAFTWERK i386 >Description: epdfview has a known affecting the current version in the ports tree that makes it segfault when opening the print dialog. This problem has been fixed in svn. The patch attached includes that fix in the current port build. More information: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477200 >How-To-Repeat: Open a PDF file with epdfview and try to print. >Fix: Apply the patch attached on the port. --- epdfview.patch begins here --- diff -Naur ./files/patch-PrintPtr.cxx ../epdfview/files/patch-PrintPtr.cxx --- ./files/patch-PrintPtr.cxx 1970-01-01 01:00:00.000000000 +0100 +++ ../epdfview/files/patch-PrintPtr.cxx 2008-08-28 15:28:32.000000000 +0200 @@ -0,0 +1,103 @@ +diff -Naur ./src/PrintPter.cxx ../epdfview-0.1.6/src/PrintPter.cxx +--- ./src/PrintPter.cxx 2008-08-28 15:27:16.000000000 +0200 ++++ ../epdfview-0.1.6/src/PrintPter.cxx 2008-08-28 15:27:32.000000000 +0200 +@@ -230,20 +230,27 @@ + ppdFindOption (printerPPD, "PageSize"); + view.clearPageSizeList (); + int pageSizeToSelect = 0; +- ppd_choice_t *pageSizeChoice = pageSizeOption->choices; +- for ( int currentSize = 0 ; +- currentSize < pageSizeOption->num_choices ; +- ++currentSize, ++pageSizeChoice ) ++ if ( 0 != pageSizeOption ) + { +- const gchar *sizeName = pageSizeChoice->text; +- const gchar *sizeValue = pageSizeChoice->choice; +- +- view.addPageSize (_(sizeName), sizeValue); +- if ( pageSizeChoice->marked ) ++ ppd_choice_t *pageSizeChoice = pageSizeOption->choices; ++ for ( int currentSize = 0 ; ++ currentSize < pageSizeOption->num_choices ; ++ ++currentSize, ++pageSizeChoice ) + { +- pageSizeToSelect = currentSize; ++ const gchar *sizeName = pageSizeChoice->text; ++ const gchar *sizeValue = pageSizeChoice->choice; ++ ++ view.addPageSize (_(sizeName), sizeValue); ++ if ( pageSizeChoice->marked ) ++ { ++ pageSizeToSelect = currentSize; ++ } + } + } ++ else ++ { ++ view.addPageSize (_("A4"), "A4"); ++ } + view.selectPageSize (pageSizeToSelect); + + // Get the resolutions. +@@ -251,29 +258,36 @@ + ppdFindOption (printerPPD, "Resolution"); + view.clearResolutionList (); + int resolutionToSelect = 0; +- ppd_choice_t *resolutionChoice = resolutionOption->choices; +- for ( int currentRes = 0 ; +- currentRes < resolutionOption->num_choices ; +- ++currentRes, ++resolutionChoice ) ++ if ( 0 != resolutionOption ) + { +- const gchar *resName = resolutionChoice->text; +- const gchar *resValue = resolutionChoice->choice; +- +- view.addResolution (_(resName), resValue); +- if ( resolutionChoice->marked ) ++ ppd_choice_t *resolutionChoice = resolutionOption->choices; ++ for ( int currentRes = 0 ; ++ currentRes < resolutionOption->num_choices ; ++ ++currentRes, ++resolutionChoice ) + { +- resolutionToSelect = currentRes; ++ const gchar *resName = resolutionChoice->text; ++ const gchar *resValue = resolutionChoice->choice; ++ ++ view.addResolution (_(resName), resValue); ++ if ( resolutionChoice->marked ) ++ { ++ resolutionToSelect = currentRes; ++ } + } + } ++ else ++ { ++ view.addResolution (_("300 DPI"), "300x300dpi"); ++ } + view.selectResolution (resolutionToSelect); + + // Get the color models. + ppd_option_t *colorModelOption = + ppdFindOption (printerPPD, "ColorModel"); + view.clearColorModelList (); ++ int colorModelToSelect = 0; + if ( NULL != colorModelOption ) + { +- int colorModelToSelect = 0; + ppd_choice_t *colorModelChoice = colorModelOption->choices; + for ( int currentColor = 0 ; + currentColor < colorModelOption->num_choices ; +@@ -288,12 +302,12 @@ + colorModelToSelect = currentColor; + } + } +- view.selectColorModel (colorModelToSelect); + } + else + { + view.addColorModel (_("Grayscale"), "Gray"); + } ++ view.selectColorModel (colorModelToSelect); + ppdClose (printerPPD); + } + } --- epdfview.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: