fatal assertion failure in PNS router

Bug #1453628 reported by Chris Pavlina
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Tomasz Wlostowski

Bug Description

This assertion failure in PNS_NODE::followLine caused a crash when I backed a trace over itself in "walk around" mode. Doesn't appear to be directly reproducible, though.

bzr-5649

Application: kicad
Version: (after 2015-may-01 BZR unknown)-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 4.0.1-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.58.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

~ % coredumpctl gdb
           PID: 5200 (kicad)
           UID: 1000 (cmp)
           GID: 1000 (cmp)
        Signal: 6 (ABRT)
     Timestamp: Sun 2015-05-10 20:21:33 EDT (11s ago)
  Command Line: /opt/kicad/bin/kicad
    Executable: /opt/kicad/bin/kicad
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (cmp)
       Boot ID: e095f4b5f240408c86bfedc7abb48336
    Machine ID: f11eafa91b284132aa328da2c8850845
      Hostname: cmp-desktop
      Coredump: /var/lib/systemd/coredump/core.kicad.1000.e095f4b5f240408c86bfedc7abb48336.5200.1431303693000000.lz4
       Message: Process 5200 (kicad) of user 1000 dumped core.

GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/kicad/bin/kicad...done.
[New LWP 5200]
[New LWP 5329]
[New LWP 5218]
[New LWP 5328]
[New LWP 5330]
[New LWP 24521]
[New LWP 5324]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/opt/kicad/bin/kicad'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007efd0bd1c4b7 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007efd0bd1c4b7 in raise () from /usr/lib/libc.so.6
#1 0x00007efd0bd1d88a in abort () from /usr/lib/libc.so.6
#2 0x00007efd0bd1541d in __assert_fail_base () from /usr/lib/libc.so.6
#3 0x00007efd0bd154d2 in __assert_fail () from /usr/lib/libc.so.6
#4 0x00007efcfe21f89b in PNS_NODE::followLine (this=0x2f7a420, aCurrent=0x30e96e0, aScanDirection=false, aPos=@0x2ddcc00: 8192, aLimit=16384, aCorners=0x2d9cbe0, aSegments=0x2dbcbf0, aGuardHit=@0x2ddcc07: false) at /home/cmp/git/kicad/pcbnew/router/pns_node.cpp:753
#5 0x00007efcfe21fb36 in PNS_NODE::AssembleLine (this=0x2f7a420, aSeg=0x30e96e0, aOriginSegmentIndex=0x0) at /home/cmp/git/kicad/pcbnew/router/pns_node.cpp:796
#6 0x00007efcfe212708 in PNS_LINE_PLACER::removeLoops (this=0x3996470, aNode=0x2f7a420, aLatest=0x2ddcea0) at /home/cmp/git/kicad/pcbnew/router/pns_line_placer.cpp:952
#7 0x00007efcfe2120c4 in PNS_LINE_PLACER::Move (this=0x3996470, aP=..., aEndItem=0x4489d40) at /home/cmp/git/kicad/pcbnew/router/pns_line_placer.cpp:861
#8 0x00007efcfe1e109b in PNS_ROUTER::movePlacing (this=0x4f1a410, aP=..., aEndItem=0x4489d40) at /home/cmp/git/kicad/pcbnew/router/pns_router.cpp:736
#9 0x00007efcfe1e031d in PNS_ROUTER::Move (this=0x4f1a410, aP=..., endItem=0x4489d40) at /home/cmp/git/kicad/pcbnew/router/pns_router.cpp:629
#10 0x00007efcfe1d6894 in ROUTER_TOOL::performRouting (this=0x20ee650) at /home/cmp/git/kicad/pcbnew/router/router_tool.cpp:524
#11 0x00007efcfe1d74fd in ROUTER_TOOL::mainLoop (this=0x20ee650, aMode=PNS_MODE_ROUTE_SINGLE) at /home/cmp/git/kicad/pcbnew/router/router_tool.cpp:659
#12 0x00007efcfe1d6ff7 in ROUTER_TOOL::RouteSingleTrace (this=0x20ee650, aEvent=...) at /home/cmp/git/kicad/pcbnew/router/router_tool.cpp:609
#13 0x00007efcfe2fbb1c in DELEGATE<int, TOOL_EVENT const&>::operator() (this=0x4b7dcc0, aA=...) at /home/cmp/git/kicad/include/tool/delegate.h:58
#14 0x00007efcfe2f8872 in COROUTINE<int, TOOL_EVENT const&>::callerStub (aData=79158464) at /home/cmp/git/kicad/include/tool/coroutine.h:217
#15 0x00007efd0dfd5651 in make_fcontext () from /usr/lib/libboost_context.so.1.58.0
#16 0x0000000000000000 in ?? ()
(gdb) f 4
#4 0x00007efcfe21f89b in PNS_NODE::followLine (this=0x2f7a420, aCurrent=0x30e96e0, aScanDirection=false, aPos=@0x2ddcc00: 8192, aLimit=16384, aCorners=0x2d9cbe0, aSegments=0x2dbcbf0, aGuardHit=@0x2ddcc07: false) at /home/cmp/git/kicad/pcbnew/router/pns_node.cpp:753
753 assert( jt );
(gdb) p jt
$1 = (const PNS_JOINT *) 0x0
(gdb)

Changed in kicad:
assignee: nobody → Tomasz Wlostowski (twlostow)
tags: added: assert
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :
Download full text (4.0 KiB)

And another:

           PID: 31050 (kicad)
           UID: 1000 (cmp)
           GID: 1000 (cmp)
        Signal: 6 (ABRT)
     Timestamp: Sun 2015-06-21 14:47:11 EDT (21s ago)
  Command Line: /opt/kicad/bin/kicad
    Executable: /opt/kicad/bin/kicad
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (cmp)
       Boot ID: 9e83831b8eee440a9214850379b8f2d2
    Machine ID: f11eafa91b284132aa328da2c8850845
      Hostname: cmp-desktop
      Coredump: /var/lib/systemd/coredump/core.kicad.1000.9e83831b8eee440a9214850379b8f2d2.31050.1434912431000000.lz4
       Message: Process 31050 (kicad) of user 1000 dumped core.

GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/kicad/bin/kicad...done.
[New LWP 31050]
[New LWP 31103]
[New LWP 407]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/opt/kicad/bin/kicad'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007fc896d34528 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007fc896d34528 in raise () from /usr/lib/libc.so.6
#1 0x00007fc896d3593a in abort () from /usr/lib/libc.so.6
#2 0x00007fc896d2d3a7 in __assert_fail_base () from /usr/lib/libc.so.6
#3 0x00007fc896d2d452 in __assert_fail () from /usr/lib/libc.so.6
#4 0x00007fc85b382d4b in PNS_NODE::followLine (this=0xc030f90, aCurrent=0x495c500, aScanDirection=false, aPos=@0x4004074: 8192, aLimit=16384, aCorners=0x40240a0, aSegments=0x4004090, aGuardHit=@0x400407b: false) at /home/cmp/git/kicad/pcbnew/router/pns_node.cpp:753
#5 0x00007fc85b38308c in PNS_NODE::AssembleLine (this=0xc030f90, aSeg=0x495c500, aOriginSegmentIndex=0x0) at /home/cmp/git/kicad/pcbnew/router/pns_node.cpp:796
#6 0x00007fc85b3712f8 in PNS_LINE_PLACER::removeLoops (this=0x9dd88e0, aNode=0xc030f90, aLatest=0x4044568) at /home/cmp/git/kicad/pcbnew/router/pns_line_placer.cpp:963
#7 0x00007fc85b3711e7 in PNS_LINE_PLACER::Move (this=0x9dd88e0, aP=..., aEndItem=0x9d6afd0) at /home/cmp/git/kicad/pcbnew/router/pns_line_placer.cpp:872
#8 0x00007fc85b330e6a in PNS_ROUTER::movePlacing (this=0x7b4a010, aP=..., aEndItem=0x9d6afd0) at /home/cmp/git/kicad/pcbnew/router/pns_router.cpp:739
#9 0x00007fc85b330de9 in PNS_ROUTER::Move (this=0x7b4a010, aP=..., endItem=0x9d6afd0) at /home/cmp/g...

Read more...

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

Fixed in rev 5977

Changed in kicad:
status: New → 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.