Daniel Wisehart wrote:
If I start adding line segments to the rat lines layer, and after adding a
segment or two but still in the middle of the command, I type a 'u', PCB core
dumps. The problem is that SearchObjectByLocation() is failing to find
anything.
Here is a patch that keeps PCB from core dumping, but I think that
SearchObjectByLocation() probably needs looking at.
Regards,
Daniel
The reason SearchObjectByLocation is failing is we need to search for
RATLINE_TYPE as well:
--- action.c 12 Apr 2006 22:51:02 -0000 1.81
+++ action.c 28 Apr 2006 23:32:04 -0000
@@ -5391,5 +5391,5 @@
LineTypePtr ptr2;
/* this search is guranteed to succeed */
- SearchObjectByLocation (LINE_TYPE, &ptr1, &ptrtmp,
+ SearchObjectByLocation (LINE_TYPE | RATLINE_TYPE, &ptr1,
&ptrtmp,
&ptr3,
Crosshair.AttachedLine.Point1.X,
Crosshair.AttachedLine.Point1.Y, 0);
This almost fixes it. I can add a bunch of ratline segments. I hit 'u'
and each time I do that, it undoes the last segment. This works all the
way up until I just have the initial point. One more 'u' and I segfault
again. I think the problem there is I should not be in this section of
code (Crosshair.AttachedLine.State == STATE_THIRD) anymore. So, I'll
keep looking.
-Dan