Pcbnew: zero-length tracks are created while dragging tracks with the push & shove router, & cause DRC errors

Bug #1803485 reported by Gabriel Staples
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Application: kicad
Version: 6.0.0-rc1-unknown-a5c892d~84~ubuntu14.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Platform: Linux 4.4.0-112-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.54.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.35.0
    Compiler: GCC 4.8.4 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

----------------------------

Under certain circumstances, while dragging tracks with the D key, using the push & shove router, it creates zero-length tracks. This seems to be a bug. These zero-length tracks can now cause DRC violations. See the screenshot. Here you can see the two red arrows pointing to the DRC violations. The white arrow is one that I added to show where I clicked to get the "clarify selection" box to pop up. Notice that one of the options at this location is a track of length 0.000 mm, which is the offending track causing both of the DRC violations it looks like.

Bug 1: zero-length tracks should be deleted instead of left to exist, when dragging tracks around with the push and shove router?

Bug 2: zero-length tracks shouldn't be allowed to create DRC errors?

If the devs need my exact pcb files I can email them, but don't want to share them publicly.

Revision history for this message
Gabriel Staples (ercaguy) wrote :
Revision history for this message
Gabriel Staples (ercaguy) wrote :

Note that this bug may be related to this one as well (same project & file): https://bugs.launchpad.net/kicad/+bug/1803298

Revision history for this message
Gabriel Staples (ercaguy) wrote :

Deleting that zero-length, invisible track segment fixed the DRC error, but it's a bug that it existed in the first place.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Can someone explain to me why the router would need to create zero length tracks? This doesn't make much sense to me. Has this always been the case or is it a bug that has been recently introduced?

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

@Gabriel, can you post the board that shows this weird dragging behaviour? IIRC, post-drag optimization should remove all collinear of 0-length segments. Maybe there's been a regression?

Tom

Revision history for this message
Gabriel Staples (ercaguy) wrote :

@Tomasz, I don't want to share the files publicly, so I have emailed them to you and @Wayne directly.

Revision history for this message
Franck78 (fbourdonnec) wrote :

Hello,

"the any -drag optimization should remove all collinear"

Yes. But is completely failing at merging two perfectly aligned segments (5.0.1 and quite sure 6.x)
#1789009, video1

And creates weirdo segments, so why not also zero length ?

#1789009, video 3 & 4

Revision history for this message
Gabriel Staples (ercaguy) wrote :

Link to Franck78's bug report: https://bugs.launchpad.net/kicad/+bug/1789009

Revision history for this message
Gabriel Staples (ercaguy) wrote :

I just received some boards back from a manufacturer. This is a bigger bug than I thought: I have an entire track not routed, even though the board passes the DRC check just fine and it is in the schematic.

**In other words: there is a DRC bug related to this that makes DRC pass with unrouted tracks.**

I noticed after deleting some tracks and re-routing them (which is what this bug is all about) that the rats-nest didn't reappear (bug--but I forgot to mention this one) and didn't seem to work quite right. I couldn't figure it out, but ultimately got the board re-routed anyway. When I did the DRC check it had some errors and showed some unrouted tracks, so I fixed them and then it passed. Since it found some unrouted ones I figured DRC was working properly. I thought it was good, yet it's currently passing with an unrouted track. That's a pretty big deal to me as I need to be able to trust the software before I send out a board for manufacturing, so let's see if we can figure this one out.

Revision history for this message
Seth Hillbrand (sethh) wrote :

@gabriel, can you post the broken board file and schematic? Or, if confidential, can you email them to me?

Revision history for this message
Gabriel Staples (ercaguy) wrote :

Seth, I've just emailed them to you. I've also CCed @Wayne and @Tomasz. Here's an image showing the net highlighted with no track between the two pads.

Revision history for this message
Gabriel Staples (ercaguy) wrote :

And here's an image showing no DRC errors, even though there definitely is a missing track.

Revision history for this message
Gabriel Staples (ercaguy) wrote :

I haven't tried duplicating the DRC passing bug but it went something like this:

1) Build up everything in KiCad 5, routing the entire board.
2) Start using the nightly build.
3) Delete all tracks and re-route the entire board. (everything was fine--no bugs found).
4) Realize I used a track size that was too small and try to force it to update to a bigger size (bugs start appearing--that's what this bug report is all about).
5) Manually delete tracks that I can't push and shove around due to bugs, then re-route them. More bugs! Rats nest doesn't seem to work right and is really glitchy. It doesn't seem to show for most of the tracks I've deleted.
6) Complete routing, and fix all DRC erros.
7) Send off to manufacturer.
8) Receive boards, solder one up, and discover there's an entire missing track, even though DRC is passing.
9) Email files to you.

When I get some more time I'll see if I can start a simple board from scratch and recreate this bug to make a video, but I don't know how practical that will be to get it duplicated just right. Meanwhile, maybe you'll be able to spot the problem in the files and know what to do. Thanks for the help! Much appreciated.

Revision history for this message
Seth Hillbrand (sethh) wrote :

Hi Gabriel- I opened your files with both 5.0.1-dev and 5.1-dev and in both, I see the unconnected line both in the pcb ratsnest and in the DRC unconnected tab.

I don't think that this is related to the zero-length line, so if you still see the board as showing no unconnected elements, can you open a new ticket for the issue?

Revision history for this message
Gabriel Staples (ercaguy) wrote :

@Seth, I just checked again too.

In this version it works fine. The ratsnest line is shown and the DRC fails with one missing connection:

Application: kicad
Version: 5.0.0-fee4fd1~66~ubuntu14.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Platform: Linux 4.4.0-112-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.54.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.35.0
    Compiler: GCC 4.8.4 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

---------------

In this version, however, it still fails. The ratsnest line is NOT shown, and the DRC passes with no errors.

Application: kicad
Version: 6.0.0-rc1-unknown-a5c892d~84~ubuntu14.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Platform: Linux 4.4.0-112-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.54.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.35.0
    Compiler: GCC 4.8.4 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

-----------

I'll open a new issue.

Revision history for this message
Gabriel Staples (ercaguy) wrote :
Revision history for this message
Gabriel Staples (ercaguy) wrote :

lp:1804691 is fixed. I still think the zero-length track thing may be due to the same bug. Essentially that bug was keeping the nets from updating, so perhaps this would somehow keep the zero-length tracks from getting cleaned up? See the link to 1804691 just above to see an image of the difftool result between the buggy and fixed source code, to get your bearings. I'm not familiar with this code base at all so I can't speak to it.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Has the router zero length track bug been fixed yet?

Revision history for this message
Gabriel Staples (ercaguy) wrote :

I haven't had a chance to do any routing since I identified the bug, so I can't be sure. Like I said though, I suspect it was due to the same bug causing lp:1804691, which is fixed. If anyone can make a reasonable determination through code analysis that fixing that bug might also fix this one by preventing the possible creation of zero-length tracks, then I think we can close this one until proven otherwise if it pops up again.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

If anyone can confirm this has been fixed by commit that fixed lp:1804691, please set the status of this bug report to fix committed.

Revision history for this message
Seth Hillbrand (sethh) wrote :

I would be very surprised if that were the case. The ratsnest update doesn't interact with PNS. But I also have not been able to reproduce the original issue.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I'm changing the status of this bug report to fix committed since it appears that it can no longer be confirmed. If it shows up again, please feel free to change the status back to new.

Changed in kicad:
status: New → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.