Date: Fri, 7 Mar 2008 19:02:09 GMT From: Gerard Seibert <gerard@seibercom.net> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/121473: gsnapshot crashes upon startup on FreeBSD-6.3 Message-ID: <200803071902.m27J297r099263@www.freebsd.org> Resent-Message-ID: <200803071910.m27JA7Zv035419@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 121473 >Category: ports >Synopsis: gsnapshot crashes upon startup on FreeBSD-6.3 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Mar 07 19:10:07 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Gerard Seibert >Release: FreeBSD-6.3 >Organization: >Environment: FreeBSD scorpio.seibercom.net 6.3-STABLE FreeBSD 6.3-STABLE #0: Sat Jan 19 22:26:50 EST 2008 gerard@scorpio.seibercom.net:/usr/obj/usr/src/sys/SCORPIO i386 >Description: 'graphics/gsnapshot' build OK; however, it crashes when started. This is the output from a 'gdb' session: Script started on Fri Mar 7 12:46:47 2008 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... (gdb) rruunn Starting program: /usr/local/bin/gsnapshot [New LWP 100124] [New Thread 0x8080000 (LWP 100124)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x8080000 (LWP 100124)] 0x08050dee in _L (label=LABEL_APPLY) at language.c:338 338 if (strcmp(lang, "de") == 0 || strcmp(lang, "de_DE") == 0) (gdb) bbtt ffuullll #0 0x08050dee in _L (label=LABEL_APPLY) at language.c:338 lang = 0x0 #1 0x0804c22e in construct_viewer (layout=0x80a2080, window=0x80bb000) at gsnapshot.c:243 button = (GtkWidget *) 0x80a20d0 hbox = (GtkWidget *) 0x80a20d0 vbox = (GtkWidget *) 0x80a2120 box = (GtkWidget *) 0x80a4050 #2 0x0804caaf in interface (window=0x80bb000) at gsnapshot.c:414 layout = (GtkWidget *) 0x80a2080 #3 0x0804cb68 in main (argc=1, argv=0xbfbfe9b0) at gsnapshot.c:452 window = (GtkWidget *) 0x80bb000 memory = {window = 0x80bb000, layout = 0xbfbfea6c, browser = 0xbfbfea74, viewer = 0x80a4050, image = 0x0, decorations = 0, hide = 1, delay = 0, mode = 0, print = 0x2807ab88, save = 0xbfbfe978} (gdb) qquuiitt The program is running. Exit anyway? (y or n) y Script done on Fri Mar 7 12:47:37 2008 >How-To-Repeat: Build and run the program. >Fix: Mel <fbsd.questions@rachie.is-a-geek.net> suggested the following: Well, that's kinda bogus coding on gsnapshot's part. Do a send-pr(1) and report that this port requires LANG to be set in the environment in order to run and/or apply the patch inlined below my sig. This is the suggested patch. (Also included as an attachment) --- language.c.orig 2007-07-15 14:05:23.000000000 -0800 +++ language.c 2008-03-07 09:19:50.000000000 -0900 @@ -335,6 +335,9 @@ { if (spoken == NULL) { char *lang = getenv("LANG"); + if(!lang) + return TranslationEnglish[label].locale; + if (strcmp(lang, "de") == 0 || strcmp(lang, "de_DE") == 0) spoken = TranslationGerman; else if (strcmp(lang, "es") == 0 || strcmp(lang, "es_ES") == 0) Patch attached with submission follows: --- language.c.orig 2007-07-15 14:05:23.000000000 -0800 +++ language.c 2008-03-07 09:19:50.000000000 -0900 @@ -335,6 +335,9 @@ { if (spoken == NULL) { char *lang = getenv("LANG"); + if(!lang) + return TranslationEnglish[label].locale; + if (strcmp(lang, "de") == 0 || strcmp(lang, "de_DE") == 0) spoken = TranslationGerman; else if (strcmp(lang, "es") == 0 || strcmp(lang, "es_ES") == 0) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803071902.m27J297r099263>