Strange behavior with unused component

D2 is not in the schematic, but is connected at one end

Here’s a strange layout error. I made some changes to the schematic, generated a new netlist, and brought it into PCBnew, which already had a layout. I didn’t use “Delete unused footprints” because I have some fiducial marks that aren’t in the netlist.
I didn’t notice that D2 was no longer in the schematic but still on the board.

I deleted all tracks and ran FreeRoute. FreeRoute connected Vcc to one end of D2, and left the other end unconnected. That’s weird. No idea why it was connected to Vcc.

Worse, this passes DRC with no errors. That seems wrong. I checked the netlist file, and D2 is not mentioned. But here’s the rat’s nest:

Here’s the rat’s nest.

Checking the Vcc net in the netlist, there’s no D1:

(net (code 58) (name /Vcc)
  (node (ref T1) (pin 9))
  (node (ref T1) (pin 10))
  (node (ref T1) (pin 8))
  (node (ref R2) (pin 2))
  (node (ref C11) (pin 1))
  (node (ref M2) (pin 1))
  (node (ref T1) (pin 7))
  (node (ref C8) (pin 1))
  (node (ref L1) (pin 2))
  (node (ref C9) (pin 2))
  (node (ref M5) (pin 1))
  (node (ref M4) (pin 1))
  (node (ref U5) (pin 2))
  (node (ref C4) (pin 1))
  (node (ref R12) (pin 2))
  (node (ref U7) (pin 4))
  (node (ref U7) (pin 6))
  (node (ref U6) (pin 4))
  (node (ref U6) (pin 6))
  (node (ref W2) (pin 1))
  (node (ref U8) (pin 2)))

Somehow, some old connection to D1 survived loading a new netlist in PCBnew. Running “Rebuild board connectivity” doesn’t help. “Delete unconnected tracks” doesn’t help. That’s very strange.


A bit of a hack, but you can put in some mounting holes on the schematic and assign them the fiducial designator/footprint.

I think Vcc is like a global label so FreeRoute may be picking up on that even though it isn’t in the schematic.

FreeRoute isn’t the problem. PCBNew shows that connection to Vcc in the rat’s nest before FreeRoute has been run.

More tomorrow.

If i have stuff on the board that is not in the schematic i lock these footprints.
Locked footprints are not removed when using the delete unused footprints option of the netlist import. This enables me to always use this feature. (Ok to be honest i use the update pcb from schematic option in the develpment/nightly version. But it behaves in the same way as the delete unused footprints option.)

Yes, there are workarounds. The concern here is that there’s a connection on the board that isn’t in the netlist. That looks like a KiCAD bug. Anyone else seen anything like this?

All the files are on Github, so this should be reproducible by others.

Application: kicad
Version: 4.0.7-e1-6374~58~ubuntu16.04.1 release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.4.0,wx containers,compatible with 2.8)
Platform: Linux 4.4.0-87-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.58.0
Curl version: libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3