On Fri, Aug 05, 2011 at 07:28:34PM +0200, Kai-Martin Knaak wrote: > Kai-Martin Knaak wrote: > > > Unfortunately, current git head of PCB enters an infinite loop if > > the attribute is set correctly. The attached patch fixes this bug. > > Now, DRC does indeed ignore the layers marked by the attribute. > > ( I triple checked ;-) > > Well, it was working for a smallish pet project. Unfortunately, it still > fails in a similar way for my real project (the large one). > > As a workaround, I tried to temporarily remove all tracks from the layers > I don't want to apply the DRC check to. But this breaks connectivity and > DRC gets swamped by false positives. > > Looks like I am running out of options... > > Maybe, PCB::skip-drc can be made to work, after all. I was able to narrow > down the code path for the entry into the endless loop. It is a continue > statement in LookupLOConnectionsToPVList() in the middle of find.c . See > below. The offending lines are marked with an exclamation mark at the start > of > the line. Anyone got an idea, what might be the correct way to skip here? > > /------------from pcb/src/find.c------------------------------------ > static bool > LookupLOConnectionsToPVList (bool AndRats) > { > Cardinal layer; > struct pv_info info; > > /* loop over all PVs currently on list */ > while (PVList.Location < PVList.Number) > { > /* get pointer to data */ > info.pv = *(PVLIST_ENTRY (PVList.Location)); > EXPAND_BOUNDS (&info.pv); > > /* check pads */ > if (setjmp (info.env) == 0) > r_search (PCB->Data->pad_tree, (BoxType *) & info.pv, NULL, > LOCtoPVpad_callback, &info); > else > return true; > > /* now all lines, arcs and polygons of the several layers */ > for (layer = 0; layer < max_copper_layer; layer++) > { > ! if (LAYER_PTR (layer)->no_drc) > ! continue; > info.layer = layer; > > ...
Hmm, at a glance this looks okay. Can you change the loop to dump some debug code before each continue, like, say, if (LAYER_PTR (layer)->no_drc) { fprintf (stderr, "Skip layer %d, max %d, (PVL.L %d, PVL.N %d) continuing...\n", layer, max_copper_layer, PVList.Location, PVList.Number); continue; } Then above and below the for loop add puts ("enter FOR"); ... puts ("exit FOR"); and similar for the while() loop. That should tell you a bit more about how this loop is happening. -- Andrew Poelstra Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net Web: http://www.wpsoftware.net/andrew/ _______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user