I don't have a fix be heres a partial diagnosis.
Here's a stacktrace.
Program received signal SIGSEGV, Segmentation fault.
0x0809a40a in WritePCBRatData (FP=0x85dca18) at file.c:639
639 fprintf (FP, "Rat[%i %i %i %i %i %i ",
(gdb) where
#0 0x0809a40a in WritePCBRatData (FP=0x85dca18) at file.c:639
#1 0x0809b38c in WritePCB (FP=0x85dca18) at file.c:859
#2 0x0809b436 in WritePCBFile (Filename=0x856b3f0 "bug.pcb-") at file.c:881
#3 0x0809b8a1 in Backup () at file.c:1057
#4 0x0809b699 in backup_cb (data={lval = 0, ptr = 0x0}) at file.c:1000
#5 0x080f825a in ghid_timer (timer=0x8350948) at hid/gtk/gtkhid-main.c:1252
#6 0x7797ea16 in ?? () from /usr/lib/libglib-2.0.so.0
#7 0x08350948 in ?? ()
#8 0x08495910 in ?? ()
#9 0x7fd95e58 in ?? ()
#10 0x77b667f2 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#11 0x08495910 in ?? ()
#12 0x00000000 in ?? ()
The RatN value isn't valid.
(gdb) print PCB->Data->RatN
$9 = 4294967292
The RatN value is decremented at.
src/buffer.c:268
r_delete_entry (Source->rat_tree, &Rat->BoundingBox);
*Rat = Source->Rat[--Source->RatN];
r_substitute (Source->rat_tree, &Source->Rat[Source->RatN].BoundingBox,
&Rat->BoundingBox);
Which is called by MoveObjectToRemoveUndoList in.
src/action.c:1502
if (type == ELEMENT_TYPE)
{
RubberbandTypePtr ptr;
int i;
Crosshair.AttachedObject.RubberbandN = 0;
LookupRatLines (type, ptr1, ptr2, ptr3);
ptr = Crosshair.AttachedObject.Rubberband;
for (i = 0; i < Crosshair.AttachedObject.RubberbandN; i++)
{
if (PCB->RatOn)
EraseRat ((RatTypePtr) ptr->Line);
MoveObjectToRemoveUndoList (RATLINE_TYPE,
ptr->Line, ptr->Line,
ptr->Line);
ptr++;
}
}
The RubberbandN value isn't the same as RatN, so there seems to be some
mismatch in the logic between LookupRatLines and
MoveObjectToRemoveUndoList.
(gdb) print Crosshair.AttachedObject.RubberbandN
$7 = 33
(gdb) print PCB->Data->RatN
$8 = 29
Robert
On Tue, Sep 09, 2008 at 12:36:57PM +0200, Stephan Boettcher wrote:
>
> Moin,
>
> PCB (CVS, September 3, GTK) segfaulted on me:
>
> http://www.ieap.uni-kiel.de/et/people/stephan/IrasPreamps-BUG.pcb
>
> - load IrasPreamps.pcb
>
> - delete the ground plane and the two connectors
>
> - save layout
>
> -> Segfault
>
> Maybe the rats data structure got corrupted?
>
> This is PCB, an interactive
> printed circuit board editor
> version 1.99x
>
> Compiled on Sep 3 2008 at 10:09:47
>
> Cheers, Stephan
>
>
>
> _______________________________________________
> geda-dev mailing list
> [email protected]
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev