Flipping Fills with via's changes the via's associate net

I am using PcbNew 5.1.9 on Arch Linux and noticed that some of the via’s within a filled zone change the Net they are associated with to something different when flipped and revert again when flipped back.

In the attached video I have via’s that are connected to GND change to a Net called SW when flipped.

Any idea as to why this is happening

1.5.9 ???
That KiCad version must be from the previous century.
I highly recommend and update.
Multiple improvements and bug fixes have been made in the last 20 years.

If you’re relating to V5.99:

Arrggh… Sorry… I flipped a few numbers around… its 5.1.9. I edited my post

Yes I suppose it is similar to that bug. However I can still edit the via’s and changed their Nets again unlike the referenced post.

This time I actually watched your video.
It’s moving a bit too fast and the information of what buttons you’re pushing etc is lacking.

It appears that it may be some bug.
Have you rand DRC afterward?
Have you done a zone refil with b afterwards?
You via’s seem to be connected to copper on only one side.
It’s also not clear how that “SW” zone is defined. Is it just the part you show, or is it a bigger zone and do you have keep-out area’s etc.

It may also help if you can post a (crippled) version of your project which only has this part in it. the rest is irrelevant and only distracts.

So far as I can see, you have two zones with the via joining them. Are the two nets connected on the schematic? The resulting netname is then a bit of a lottery.

It’s moving a bit too fast and the information of what buttons you’re pushing etc is lacking.

Sorry about the speed of the video. I was trying to keep it under the max upload of 4 Meg…
I am only selecting via the mouse then hitting “F” to flip.

Have you rand DRC afterward?

DRC gives me errors consistent with the bug. i.e. its not just a visual thing on screen but the Nets actually do change name

Have you done a zone refil with b afterwards?

A zone file does nothing.

You via’s seem to be connected to copper on only one side.

This part of the circuit is contained within a copper zone that encompasses the entire board (both side). This happens even when that portion of the circuit is within the encompassing gnd zones mentioned above.

It’s also not clear how that “SW” zone is defined. Is it just the part you show, or is it a bigger zone and do you have keep-out area’s etc.

SW is just a zone connected to the SW net. Its all within that part of the circuit. I dont have any keep out areas there as I don’t need them.

I will see If I can post a trimmed down version of my project

The two zones you are referring to are connected to the same net… GND. There is a top zone that connects the GND of the buck to the bottom copper layer which is also GND. You cant actually see that bottom layer here because I did this outside the bottom GND zone however even when it is withing a GND zone the same behavior is seen

If you are using 5.1.9, this behavior has nothing to do with the bug posted by JohnRob.

In 5.1, vias always take on the net of any pad they touch. If you change things around (zones, tracks) such that the vias touch a pad that they didn’t before, they can change nets to that pad.

In 5.99, there is a new feature that lets you disable this automatic net update for specific via(s), accessible in the Via Properties dialog. Vias placed using the via tool will start out with automatic updating off, and vias placed using the router will start out with automatic update on.

In 5.1, vias always take on the net of any pad they touch. If you change things around (zones, tracks) such that the vias touch a pad that they didn’t before, they can change nets to that pad.

That doesn’t explain whats happening here. The via’s are not touching any pads. If move the layout around and refill no via’s change net names. The minute I simply perform a flip of the layout I get changes in net names for the via’s

It looks like you have overlapping SW and GND zones. The logic to determine what nets free-standing vias should take on will consider any overlapping zones (it does not factor in zone priority).

The SW zone is only on one copper layer. No vias… The GND zone does not extend into or overlap the SW zone.


Here is a stripped down version of the project in case anyone is interested. This still has the same problem. DRC have been performed and no errors indicated.

rd_counter.zip (278.3 KB)

1 Like

Here is a trimmed down version of the project

This looks like a nice test case.
I had a look at your board, and I see just a normal layout with via’s connecting a GND plane to a GND plane on the other side. I see nothing that would explain this behavior.

Flipping the PCB also gives the same result here, and that is a good thing, because it means it’s reproducible.

After that, I did a few experiments.
First I narrowed down the SW net a bit to give the 2 GND pads at pins 14 & 15 a bit more room, and then none of the via’s got renamed while flipping.

After that I did a fresh reload, rotated the whole power supply section 45 degrees and flipped it again.
In this case different via’s (From the block of 6 on the left side) got renamed to a different net:

So apparently it is not specific to the SW net.

I suspect it is a real bug in KiCad and should be reported on gitlab.

2 Likes

Thank goodness you managed to reproduce it. For a moment I thought I was doing something silly. I will submit as a bug on gitlab

Thank you for taking the time to test it.

1 Like

This also affects KiCad V5.99.
I flipped the PCB (V5.99 apparently flips around the Y-axis) and refilled the zones witn b and the block of 4 via’s in SUPPLY_PROT net got changed to GND:

Application: KiCad PCB Editor

Version: 5.99.0-unknown-4dbeb15024~120~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.0.4
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux 5.4.0-70-generic x86_64, 64 bit, Little endian, wxGTK, mate, x11

Build Info:
	Date: Mar 23 2021 08:07:39
	wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.3.0
	Curl: 7.68.0
	ngspice: 31
	Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
	KICAD_SCRIPTING=ON
	KICAD_SCRIPTING_MODULES=ON
	KICAD_SCRIPTING_PYTHON3=ON
	KICAD_SCRIPTING_WXPYTHON=ON
	KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
	KICAD_SCRIPTING_ACTION_MENU=ON
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON
1 Like

One of you please do, repeatable bugs in the stable branch should get fixed

I have submitted it with the relevant attachments

I also tried to make an independent verification in a project built from scratch, but despite my efforts at rotating and flipping I could not manage to reproduce it in this other project.

I’ll add it here anyway in case anyone wants to experiment:

2021-03-26_adsf_flip_bug.zip (9.2 KB)