Pcbnew segfaults when attempting to route differential pair with inconsistent naming

Bug #1428245 reported by Jeppe Johansen
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Tomasz Wlostowski

Bug Description

Trying to route a differential pair with incorrect net names will make pcbnew crash immediately.

Naming a net "A+" and trying to route it as a differential pair or do length matching will make it crash.

Tags: cern gal pcbnew pns

Related branches

Revision history for this message
Blair Bonnett (bcb) wrote :

Can confirm on r5473. The attached PCB displays this behaviour. If you try to diff-pair route GND, then it pops up a dialog box telling you it isn't a differential pair. But if you click on USBD+, for which their is no corresponding USBD-, you get a segfault:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffea8517d4 in PNS_DIFF_PAIR_PLACER::findDpPrimitivePair (this=this@entry=0x1f23b00, aP=..., aItem=aItem@entry=0x20c4800, aPair=...)
    at /home/blair/sources/kicad/product/pcbnew/router/pns_diff_pair_placer.cpp:494
494 refNet = netP;

(gdb) bt

#0 0x00007fffea8517d4 in PNS_DIFF_PAIR_PLACER::findDpPrimitivePair (this=this@entry=0x1f23b00, aP=..., aItem=aItem@entry=0x20c4800, aPair=...)
    at /home/blair/sources/kicad/product/pcbnew/router/pns_diff_pair_placer.cpp:494

#1 0x00007fffea85348a in PNS_DIFF_PAIR_PLACER::Start (this=0x1f23b00, aP=..., aStartItem=0x20c4800) at /home/blair/sources/kicad/product/pcbnew/router/pns_diff_pair_placer.cpp:573

#2 0x00007fffea83daca in PNS_ROUTER::StartRouting (this=0x1db2a60, aP=..., aStartItem=0x20c4800, aLayer=aLayer@entry=0) at /home/blair/sources/kicad/product/pcbnew/router/pns_router.cpp:528

#3 0x00007fffea82fd94 in ROUTER_TOOL::prepareInteractive (this=this@entry=0x2c66c70) at /home/blair/sources/kicad/product/pcbnew/router/router_tool.cpp:453

#4 0x00007fffea83365c in ROUTER_TOOL::performRouting (this=this@entry=0x2c66c70) at /home/blair/sources/kicad/product/pcbnew/router/router_tool.cpp:494

#5 0x00007fffea83481f in ROUTER_TOOL::mainLoop (this=this@entry=0x2c66c70, aMode=aMode@entry=PNS_MODE_ROUTE_DIFF_PAIR) at /home/blair/sources/kicad/product/pcbnew/router/router_tool.cpp:645

#6 0x00007fffea834e48 in ROUTER_TOOL::RouteDiffPair (this=0x2c66c70, aEvent=...) at /home/blair/sources/kicad/product/pcbnew/router/router_tool.cpp:601

#7 0x00007fffea977bc1 in operator() (aA=..., this=0x20c4890) at /home/blair/sources/kicad/product/include/tool/delegate.h:58

#8 COROUTINE<int, TOOL_EVENT const&>::callerStub (aData=34359440) at /home/blair/sources/kicad/product/include/tool/coroutine.h:214
#9 0x00007fffe8008731 in make_fcontext () from /usr/lib/libboost_context.so.1.57.0
#10 0x0000000000000000 in ?? ()

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

Application: pcbnew
Version: (2015-03-04 BZR 5473)-product Debug build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.9.2,wx containers,compatible with 2.8)
Platform: Linux 3.18.6-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON
         KICAD_USE_WEBKIT=ON

Changed in kicad:
importance: Undecided → High
status: New → Confirmed
tags: added: cern gal pcbnew
Revision history for this message
Nick Østergaard (nickoe) wrote :

Segfaults should be critical.

tags: added: pns
Changed in kicad:
importance: High → Critical
Revision history for this message
Nick Østergaard (nickoe) wrote :

I can also confirm this issue. I get the same backtrace. Note that you have to try to trace form the one with the "+" for example. I had a "c+" and a "c" pin, and it will detect fine that "c" is not a diff pair.

Changed in kicad:
assignee: nobody → Tomasz Wlostowski (twlostow)
Changed in kicad:
status: Confirmed → Fix Committed
Jon Neal (reportingsjr)
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.