From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Mar 4 08:40:10 2011 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 EB3A71065670 for ; Fri, 4 Mar 2011 08:40:10 +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 AE00B8FC0C for ; Fri, 4 Mar 2011 08:40:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p248eAxS029029 for ; Fri, 4 Mar 2011 08:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p248eA14029028; Fri, 4 Mar 2011 08:40:10 GMT (envelope-from gnats) Resent-Date: Fri, 4 Mar 2011 08:40:10 GMT Resent-Message-Id: <201103040840.p248eA14029028@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, Tom Russo Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C542106566B for ; Fri, 4 Mar 2011 08:30:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 4FC438FC0C for ; Fri, 4 Mar 2011 08:30:58 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p248UvOO036536 for ; Fri, 4 Mar 2011 08:30:57 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p248Uv6s036534; Fri, 4 Mar 2011 08:30:57 GMT (envelope-from nobody) Message-Id: <201103040830.p248Uv6s036534@red.freebsd.org> Date: Fri, 4 Mar 2011 08:30:57 GMT From: Tom Russo To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/155255: comms/xnecview crashes with Gdk-CRITICAL error X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2011 08:40:11 -0000 >Number: 155255 >Category: ports >Synopsis: comms/xnecview crashes with Gdk-CRITICAL error >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 04 08:40:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Tom Russo >Release: FreeBSD 7.4-PRERELEASE >Organization: >Environment: FreeBSD bogodyn.org 7.4-PRERELEASE FreeBSD 7.4-PRERELEASE #0: Sat Jan 1 21:48:22 MST 2011 russo@bogodyn.org:/users2/obj/usr/src/sys/BOGODYN i386 >Description: Some time ago xnecview, which I used to use regularly on this system, after some upgrade or other started crashing with the error: (xnecview:77768): Gdk-CRITICAL **: IA__gdk_window_set_back_pixmap: assertion `pixmap == NULL || gdk_drawable_get_depth (window) == gdk_drawable_get_depth (pixmap)' failed This is repeatable on any NEC output, including old NEC output I had lying around from the days when I used xnecview regularly. >How-To-Repeat: Run xnecview on any valid NEC input file, such as ----CUT----- CM EXAMPLE 3. VERTICAL HALF WAVELENGTH ANTENNA OVER GROUND CM EXTENDED THIN WIRE KERNEL USED CM 1. PERFECT GROUND CM with phased vertical some distance away CE PATTERN CALCULATIONS GW 0 9 0.0 0.0 2.0 0.0 0.0 7.0 0.00051 GW 1 9 2.5 0.0 2.0 2.5 0.0 7.0 0.00051 GE 0 EX 0 0 5 0 1.0 0.0 0.0 0.0 EX 0 1 5 0 -1.0 1.e-16 0.0 0.0 GN 2 0 0 0 13.0 .002 0.0 0.0 FR 0 1 0 0 30.0 0.0 0.0 0.0 EN -----CUT------ The program will put up a blank window, and will crash if any interaction is attempted. >Fix: The attached patch fixes the issue. It is taken from a Debian bug fix I found in their bug tracker, dated 2008: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=484725 This patch completely fixes the issue I have observed, and all my old NEC files (including the one in the "How To Repeat" section above) are viewable after the patch. Patch attached with submission follows: commit 02352e102c1913dc232500c7fd80b3947a8593ea Author: Diego Ongaro Date: Sun Jun 29 00:30:09 2008 +0100 remove depth diff --git a/xwin.c b/xwin.c index 31d3cf2..4011c16 100644 --- xwin.c +++ xwin.c @@ -39,7 +39,6 @@ GtkLabel *msgwidget; /* label widget in top right corner, used for several m int fontheight; GdkPixmap *gbackg2=NULL; /* for window2, we draw into this pixmap */ GdkColormap *gcm; -int depth; int redraw=1; /* flag which signifies need for redrawing of struct/gain plot */ int dragging=0; /* flag to indicate that user is dragging the struct/gain plot */ @@ -360,7 +359,7 @@ gint resize_event(GtkWidget *w,GdkEventConfigure *ev,gpointer dummy) winsizex=ev->width; winsizey=ev->height; gdk_pixmap_unref(gbackg); - gbackg=gdk_pixmap_new(w->window,winsizex,winsizey,depth); + gbackg=gdk_pixmap_new(w->window,winsizex,winsizey,gdk_drawable_get_depth(w->window)); calcproj(); redraw=1; #if 0 @@ -876,7 +875,7 @@ gint resize_event2(GtkWidget *w,GdkEventConfigure *ev,gpointer dummy) win2sizex=ev->width; win2sizey=ev->height; gdk_pixmap_unref(gbackg2); - gbackg2=gdk_pixmap_new(w->window,win2sizex,win2sizey,depth); + gbackg2=gdk_pixmap_new(w->window,win2sizex,win2sizey,gdk_drawable_get_depth(w->window)); redraw2=1; return TRUE; @@ -1035,10 +1034,12 @@ void cmd_setZ0(GtkEntry *w) void getcolor(char *name,GdkColor *xc) { +#if 0 if (depth==1) { /* on 1bpp displays, choose black for everything except the background */ if (strcmp(name,C_BG)) name="black"; else name="white"; } +#endif gdk_color_parse(name,xc); if (!gdk_colormap_alloc_color(gcm,xc,TRUE,FALSE)) { /* if allocation failed, use black */ @@ -1210,7 +1211,9 @@ void maininitX(int really) { GdkVisual *vi; vi = gdk_visual_get_best(); +#if 0 depth=vi->depth; +#endif gcm=gdk_colormap_new(vi,FALSE); } @@ -1386,7 +1389,7 @@ void maininitX(int really) winsizex=toprow->requisition.width; calcproj(); } - gbackg=gdk_pixmap_new(w->window,winsizex,winsizey,depth); + gbackg=gdk_pixmap_new(w->window,winsizex,winsizey,gdk_drawable_get_depth(w->window)); upd_msg(); @@ -1482,7 +1485,7 @@ void maininitX(int really) ggc2 = gdk_gc_new(w->window); - gbackg2=gdk_pixmap_new(w->window,win2sizex,win2sizey,depth); + gbackg2=gdk_pixmap_new(w->window,win2sizex,win2sizey,gdk_drawable_get_depth(w->window)); gtk_signal_connect( GTK_OBJECT(w), "expose_event", GTK_SIGNAL_FUNC(expose_event2), NULL); >Release-Note: >Audit-Trail: >Unformatted: