This certainly looks like a bug/glitch in pcbnew.
KiCAD 5.0.2 on Ubuntu 18.04 (same behaviour with KC 5.0.2 on Ubuntu 14.04).
This is a “minimal demo” project that exhibits the behaviour:
test-xx.tgz (4.4 KB)
In the attached project, look at the grid of GND vias on the right. I connect them with 0.8mm tracks (matching the diameter of the vias). I draw one track from top-left to bottom-left, then a track from bottom-left to bottom-right… and so on until completing the “perimeter rectangle”. Then I draw one at the center (to completely cover the area with copper).
[[ side note: I know I could do this with filled zones; but there are cases where drawing the traces may be much easier, and easier to get the area to precisely match the edges of the vias ]]
Then I go to the bottom layer and do exactly the same. I come back to the top layer, and some of the tracks disappeared. In this case, the four outer traces (the “outer rectangle” disappears). If I draw again the four traces that disappeared, then those same four traces on the bottom layer disappear.
In the attached project, the top layer was the last I re-drew, so it is the bottom layer that is missing some traces (traces that were there, that is).
An additional detail/clue: at first I thought it happened only in multilayers (in any case, with 4-layers). I started this project with two-layers, and the behaviour was not present; then, I go to Layers Setup
and configure four layers, then the odd behaviour appeared. The thing is: now, if I turn it back to a two-layer board, the odd behaviour remains!
Is there any valid rationale for this behaviour that I’m missing? Or is it indeed a bug/glitch?
BTW, the attached project is a “minimal demo” I created; the odd behaviour happens also in a “real” board I’m working on.
Thanks