From owner-freebsd-gnome@FreeBSD.ORG Tue Apr 9 14:50:01 2013 Return-Path: Delivered-To: gnome@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9CFFF25E for ; Tue, 9 Apr 2013 14:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8FF46F2D for ; Tue, 9 Apr 2013 14:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r39Eo1xX077262 for ; Tue, 9 Apr 2013 14:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r39Eo1E7077227; Tue, 9 Apr 2013 14:50:01 GMT (envelope-from gnats) Date: Tue, 9 Apr 2013 14:50:01 GMT Message-Id: <201304091450.r39Eo1E7077227@freefall.freebsd.org> To: gnome@FreeBSD.org From: AN Subject: Re: ports/177462: graphics/dia: dia-0.97.2,1 fails to start X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: AN List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 14:50:01 -0000 The following reply was made to PR ports/177462; it has been noted by GNATS. From: AN To: Golyashov Sergey Cc: bug-followup@freebsd.org Subject: Re: ports/177462: graphics/dia: dia-0.97.2,1 fails to start Date: Tue, 9 Apr 2013 10:20:05 -0400 (EDT) Hi Golyashov: Thank you for your reply. I am not a developer, would you please give me exact instructions for how to apply patch. Can i copy it to the files directory in /usr/ports/grahics/dia? What should i name the file? Thanks in advance. On Tue, 9 Apr 2013, Golyashov Sergey wrote: > > Backtrace from [work dia]/objects/custom/shape_typeinfo.c:shape_typeinfo_load -> g_fopen -> fopen > > /usr/src/lib/libc/stdio/fopen.c: > <<<=== > (gdb) n > 99 } > (gdb) l > 94 * fseek and ftell.) > 95 */ > 96 if (oflags & O_APPEND) > 97 (void)_sseek(fp, (fpos_t)0, SEEK_END); > 98 return (fp); > 99 } > (gdb) print fp > $17 = (FILE *) 0x807eb0740 > (gdb) n > shape_typeinfo_load (info=0x80a3ead00) at shape_typeinfo.c:200 > 200 if (!f) > (gdb) print f > $18 = (FILE *) 0x7eb0740 > ===>>> > > fopen return (FILE *) 0x807eb0740 but g_fopen return (FILE *) 0x7eb0740 > > So after call fread: > > Program received signal SIGSEGV, Segmentation fault. > __fread (buf=0x7fffffffce20, size=512, count=1, fp=0x7eb0740) at /usr/src/lib/libc/stdio/fread.c:95 > 95 ORIENT(fp, -1); > > This patch solves problem for me: > > --- objects/custom/shape_typeinfo.c.orig 2013-04-09 01:48:15.838095782 +1100 > +++ objects/custom/shape_typeinfo.c 2013-04-09 16:21:37.840874850 +1100 > @@ -196,7 +195,7 @@ > saxHandler.warning = _warning; > once = TRUE; > } > - f = g_fopen (info->filename, "rb"); > + f = fopen (info->filename, "rb"); > if (!f) > return FALSE; > while ((n = fread (buffer, 1, BLOCKSIZE, f)) > 0) { >