Differential pair: infinite loop in makeGapVector

Bug #1702485 reported by Jean-Samuel Reynaud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

There is an infinite loop in differential pair routing.
How to reproduce this:

Start the differential pair routing from a square PAD (width == height, not from a rectangular). In this case there is the following flow:
- diagFanDistance become "0" at pcbnew/router/pns_diff_pair.c:468
- dir become a zero length vector at pcbnew/router/pns_diff_pair.c:504
- makeGapVector try to increase the size of a zero len vector (pcbnew/router/pns_diff_pair.c:506 then pcbnew/router/pns_diff_pair.c:417).

This result on an infinite loop...

It occur also when you start from a rectangular and you try to join a square pad... But more difficult to reproduce.

Not sure... but probably commit 0a55d8e0533929ca66036be51dd90bdbefe50f1b introduce this error...

Application: pcbnew
Version: no-vcs-found-1724f90~58~ubuntu16.04.1, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-81-generic x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.58.0
Curl: 7.47.0
KiCad - Compiler: GCC 5.4.0 with C++ ABI 1009
        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

Tags: pns
Revision history for this message
Jean-Samuel Reynaud (js-reynaud) wrote :

Attached patch propose a solution to fix this bug.

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

Dear JS,

Committed, thanks for fixing the bug!

Tom

Changed in kicad:
status: New → Fix Committed
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 885a4c1bc597fefd29e39634d7f342901b3d3958
https://git.launchpad.net/kicad/patch/?id=885a4c1bc597fefd29e39634d7f342901b3d3958

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.