[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: New layer selector to play with (git preview)



On Fri, 2011-08-26 at 05:52 -0700, Andrew Poelstra wrote:
> On Fri, Aug 26, 2011 at 06:28:09AM +0100, Peter Clifton wrote:
> > 
> > A few nits when I tested it. (And not just looked at the screenshots)..
> > 
> > 1. PCB crashes immediately on startup for me:
> > 
> > UPDATE COLORS
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00000000004d6883 in gtk_pcb_layer_selector_update_colors (ls=0x0,
> > callback=0x4ca630 <get_layer_color>)
> >     at hid/gtk/gtk-pcb-layer-selector.c:694
> > 694	  gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ls->list_store),
> > &iter);
> >
> 
> Cool. I have never seen this. I also don't get the "UPDATE COLORS"
> text on startup. How have you configured your colors?

Nothing special.. but I do have a colour scheme:

 ~/.pcb/preferences contains the line:

color-file = /home/pcjc2/.pcb/colors/foo

(Very imaginatively named ;).

I've attached the colour scheme file just in case you're curious.

> > 2. It should not be printing debug text like "UPDATE COLORS" to the
> > console ;)
> > 
> 
> Oops. But it seems to have helped here. ;)

It is approximately the right place.

This is a bandaid to fix the crash:

diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 001d2ca..d6d061c 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1033,6 +1033,8 @@ get_layer_color (gint layer)
 void
 ghid_layer_buttons_color_update (void)
 {
+  if (PCB == NULL)
+    return;
   printf ("UPDATE COLORS\n");
   gtk_pcb_layer_selector_update_colors
     (GTK_PCB_LAYER_SELECTOR (ghidgui->layer_selector), get_layer_color);


But perhaps there is a nicer way.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
black-color =	#000000
white-color =	#ffffff
background-color =	#000000
crosshair-color =	#ff0000
cross-color =	#cdcd00
via-color =	#8c8c8c
via-selected-color =	#00ffff
pin-color =	#999999
pin-selected-color =	#00ffff
pin-name-color =	#ff0000
element-color =	#e6e6e6
rat-color =	#b8860b
invisible-objects-color =	#4c4c4c
invisible-mark-color =	#666666
element-selected-color =	#00ffff
rat-selected-color =	#00ffff
connected-color =	#00ff00
off-limit-color =	#666666
grid-color =	#ffffff
layer-color-1 =	#cd3700
layer-color-2 =	#395ecc
layer-color-3 =	#cfcf00
layer-color-4 =	#8b2323
layer-color-5 =	#548b54
layer-color-6 =	#8b7355
layer-color-7 =	#00868b
layer-color-8 =	#228b22
layer-color-9 =	#8b2323
layer-color-10 =	#3a5fcd
layer-color-11 =	#104e8b
layer-color-12 =	#cd3700
layer-color-13 =	#548b54
layer-color-14 =	#8b7355
layer-color-15 =	#00868b
layer-color-16 =	#228b22
layer-selected-color-1 =	#00ffff
layer-selected-color-2 =	#00ffff
layer-selected-color-3 =	#00ffff
layer-selected-color-4 =	#00ffff
layer-selected-color-5 =	#00ffff
layer-selected-color-6 =	#00ffff
layer-selected-color-7 =	#00ffff
layer-selected-color-8 =	#00ffff
layer-selected-color-9 =	#00ffff
layer-selected-color-10 =	#00ffff
layer-selected-color-11 =	#00ffff
layer-selected-color-12 =	#00ffff
layer-selected-color-13 =	#00ffff
layer-selected-color-14 =	#00ffff
layer-selected-color-15 =	#00ffff
layer-selected-color-16 =	#00ffff
warn-color =	#ff8000
mask-color =	#009900
### PCB configuration file. ###
gui-compact-horizontal = 1
gui-compact-vertical = 0
gui-title-window = 1
use-command-window = 0
save-in-tmp = 0
grid-units = mil
history-size = 5
auto-pan-speed = 3
top-window-width = 1680
top-window-height = 1026
log-window-width = 1680
log-window-height = 1026
drc-window-width = 795
drc-window-height = 500
library-window-width = 917
library-window-height = 657
netlist-window-height = 577
keyref-window-width = 0
keyref-window-height = 0
text-scale = 296
backup-interval = 60
groups = 1,c:2:3:4:5:6,s:7:8
route-styles = Signal,1000,3600,2000,1000:Power,2500,6000,3500,1000:Fat,4000,6000,3500,1000:Skinny,600,2402,1181,600
library-newlib = 
color-file = /home/pcjc2/.pcb/colors/foo
layer-name-1 = top
layer-name-2 = ground
layer-name-3 = signal2
layer-name-4 = signal3
layer-name-5 = power
layer-name-6 = bottom
layer-name-7 = outline
layer-name-8 = spare

Attachment: signature.asc
Description: This is a digitally signed message part


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user