Pcbnew GAL crash: Unhandled exception class while routing

Bug #1472627 reported by Ben Kempke
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Unassigned

Bug Description

When routing certain nets, pcbnew crashes when in GAL mode showing the error 'Unhandled exception class: N5boost16exception_detail10clone_implINS0_19error_info_injectorISt12out_of_rangeEEEE what: Unable to find key in unordered_map.' when routing certain nets.

The attached board and screenshot can be used to reproduce this problem.

Application: kicad
Version: (2015-07-07 BZR 5906)-product release 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.19.0-21-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Stack Trace:

#0 0x00007ffff5b65267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1 0x00007ffff5b66eca in __GI_abort () at abort.c:89
#2 0x00007ffff5b5e03d in __assert_fail_base (fmt=0x7ffff5cc0028 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffea53c631 "m_originLayer >= 0",
    file=file@entry=0x7fffea53c5f0 "/home/user/repos/kicad.bzr/pcbnew/router/router_preview_item.cpp", line=line@entry=76,
    function=function@entry=0x7fffea53c7c0 <ROUTER_PREVIEW_ITEM::Update(PNS_ITEM const*)::__PRETTY_FUNCTION__> "void ROUTER_PREVIEW_ITEM::Update(const PNS_ITEM*)") at assert.c:92
#3 0x00007ffff5b5e0f2 in __GI___assert_fail (assertion=0x7fffea53c631 "m_originLayer >= 0", file=0x7fffea53c5f0 "/home/user/repos/kicad.bzr/pcbnew/router/router_preview_item.cpp", line=76,
    function=0x7fffea53c7c0 <ROUTER_PREVIEW_ITEM::Update(PNS_ITEM const*)::__PRETTY_FUNCTION__> "void ROUTER_PREVIEW_ITEM::Update(const PNS_ITEM*)") at assert.c:101
#4 0x00007fffea1da817 in ROUTER_PREVIEW_ITEM::Update (this=0xf509c0, aItem=0x19fc5b0) at /home/user/repos/kicad.bzr/pcbnew/router/router_preview_item.cpp:76
#5 0x00007fffea1da6e9 in ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM (this=0xf509c0, aItem=0x19fc5b0, aParent=0xf30ff0) at /home/user/repos/kicad.bzr/pcbnew/router/router_preview_item.cpp:56
#6 0x00007fffea1c54de in PNS_ROUTER::DisplayItem (this=0x26f5d40, aItem=0x19fc5b0, aColor=-1, aClearance=-1) at /home/user/repos/kicad.bzr/pcbnew/router/pns_router.cpp:664
#7 0x00007fffea1c6b1a in PNS_ROUTER::movePlacing (this=0x26f5d40, aP=..., aEndItem=0x0) at /home/user/repos/kicad.bzr/pcbnew/router/pns_router.cpp:832
#8 0x00007fffea1c5aa7 in PNS_ROUTER::Move (this=0x26f5d40, aP=..., endItem=0x0) at /home/user/repos/kicad.bzr/pcbnew/router/pns_router.cpp:716
#9 0x00007fffea198158 in ROUTER_TOOL::performRouting (this=0x26dfd00) at /home/user/repos/kicad.bzr/pcbnew/router/router_tool.cpp:517
#10 0x00007fffea198edf in ROUTER_TOOL::mainLoop (this=0x26dfd00, aMode=PNS_MODE_ROUTE_SINGLE) at /home/user/repos/kicad.bzr/pcbnew/router/router_tool.cpp:658
#11 0x00007fffea198932 in ROUTER_TOOL::RouteSingleTrace (this=0x26dfd00, aEvent=...) at /home/user/repos/kicad.bzr/pcbnew/router/router_tool.cpp:604
#12 0x00007fffea2d9b78 in DELEGATE<int, TOOL_EVENT const&>::operator() (this=0x18fe930, aA=...) at /home/user/repos/kicad.bzr/include/tool/delegate.h:58
#13 0x00007fffea2d6424 in COROUTINE<int, TOOL_EVENT const&>::callerStub (aData=26208560) at /home/user/repos/kicad.bzr/include/tool/coroutine.h:217
#14 0x00007fffea47981e in make_fcontext () from /usr/local/bin/_pcbnew.kiface
#15 0x0000000000000001 in ?? ()
#16 0x0000000000000000 in ?? ()

Tags: cern pns

Related branches

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

Is the crash systematic? Could you attach a stack trace?

Tom

Revision history for this message
Ben Kempke (bpkempke) wrote :

Yes, the crash is systematic. I've added the stack trace above.

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

@Ben, can you list or screenshot your router settings? Press E while having the routing tool selected.

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

Degrading importance a bit because it is not really a segfault, more like an assert.

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Ben where did you get this build from? Is it from the PPA?

I might be nessesary to use boost 1.54 to reproduce this, and if you built this yourself and skipped the kicad boost building this could be the root cause of this. 1.54 needs some patching.

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

The stack trace has an assert in different function than the screenshot...

T.

Revision history for this message
Ben Kempke (bpkempke) wrote :

The posted issue was built by me, but the issue persists after testing with the latest PPA. The error manifests in two different ways: either the program throws a SIGABRT and immediately kills the program or shows the error message then kills the program once dismissed. This may account for the differing stack trace vs. error message. Once I have some free time, I could look into fixing this error, but I figured I would report it since this has made routing particularly difficult with this board, and I know the stable release is coming out shortly. Attached is the screenshot of the crash on the latest PPA:

Application: pcbnew
Version: 0.201507042246+5884~23~ubuntu15.04.1-product release 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.19.0-21-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.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

Revision history for this message
Ben Kempke (bpkempke) wrote :

Also, my router settings.

Revision history for this message
Nick Østergaard (nickoe) wrote :

So far you are the only one being able to reproduce. Could you possibly try to upgrade boost to something above 1.54, maybe even 1.58?

You shall use the KICAD_SKIP_BOOST option to make it not build kicad's boost.

Revision history for this message
Ben Kempke (bpkempke) wrote :
Download full text (3.5 KiB)

Unfortunately, the issue remains with Boost 1.58. Nothing I'm doing seems atypical, and the issue has been replicated on two machines for me now. The project was configured with the normal flags plus the added KICAD_SKIP_BOOST option:

cmake -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_USE_DEBUG=ON -DKICAD_SKIP_BOOST=ON ../../

Application: pcbnew
Version: (2015-07-08 BZR 5908)-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.19.0-21-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.58.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

#0 0x00007ffff5b65267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1 0x00007ffff5b66eca in __GI_abort () at abort.c:89
#2 0x00007ffff5b5e03d in __assert_fail_base (fmt=0x7ffff5cc0028 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fffe989863d "m_originLayer >= 0",
    file=file@entry=0x7fffe98985f8 "/home/bpkempke/repos/kicad.bzr/pcbnew/router/router_preview_item.cpp", line=line@entry=76,
    function=function@entry=0x7fffe98987c0 <ROUTER_PREVIEW_ITEM::Update(PNS_ITEM const*)::__PRETTY_FUNCTION__> "void ROUTER_PREVIEW_ITEM::Update(const PNS_ITEM*)") at assert.c:92
#3 0x00007ffff5b5e0f2 in __GI___assert_fail (assertion=0x7fffe989863d "m_originLayer >= 0", file=0x7fffe98985f8 "/home/bpkempke/repos/kicad.bzr/pcbnew/router/router_preview_item.cpp", line=76,
    function=0x7fffe98987c0 <ROUTER_PREVIEW_ITEM::Update(PNS_ITEM const*)::__PRETTY_FUNCTION__> "void ROUTER_PREVIEW_ITEM::Update(const PNS_ITEM*)") at assert.c:101
#4 0x00007fffe95471fb in ROUTER_PREVIEW_ITEM::Update (this=0x17f2410, aItem=0x1000cd0) at /home/bpkempke/repos/kicad.bzr/pcbnew/router/router_preview_item.cpp:76
#5 0x00007fffe95470cd in ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM (this=0x17f2410, aItem=0x1000cd0, aParent=0xeefa90) at /home/bpkempke/repos/kicad.bzr/pcbnew/router/router_preview_item.cpp:56
#6 0x00007fffe953223c in PNS_ROUTER::DisplayItem (this=0x103a6d0, aItem=0x1000cd0, aColor=-1, aClearance=-1) at /home/bpkempke/repos/kicad.bzr/pcbnew/router/pns_router.cpp:664
#7 0x00007fffe9533878 in PNS_ROUTER::movePlacing (this=0x103a6d0, aP=..., aEndItem=0x0) at /home/bpkempke/repos/kicad.bzr/pcbnew/router/pns_router.cpp:832
#8 0x00007fffe9532805 in PNS_ROUTER::Move (this=0x103a6d0, aP=..., endItem=0x0) at /home/bpkempke/repos/kicad.bzr/pcbnew/router/pns_router.cpp:716
#9 0x00007fffe9505b2b in ROUTER_TOOL::performRouting (this=0x26f3c10) at /home/bpkempke/repos/kicad.bzr/pcbnew/router/router_tool.cpp:517
#10 0x00007fffe95068c8 in ROUTER_TOOL::mainLoop (this=0x26f3c10, aMode=PNS_MODE_ROUTE_SINGLE) at /home/bpkempke/repos/kicad.bzr/pcbnew/router/router_tool.cpp:658
#11 0x00007fffe9506306 in ROUTER_TOOL::RouteSingleTrace (this=0x26f3c10, aEvent=...) at /home/bpkempke/repos/kicad.bzr/pcbnew/router/router_tool.cpp:604
#12 0x00007fffe96447ac in DELEGATE<int, TOOL_EVENT const&>::operator() (thi...

Read more...

Revision history for this message
Nick Østergaard (nickoe) wrote :

Which exact nets should we route to make the error appear? I tried to route from the pad in your screenshot and connect it to the other pad it should be connected to. I also tried some others random nets.

Revision history for this message
Ben Kempke (bpkempke) wrote :

The most reliable way for me is to replicate the exact trace path as shown in the original screenshot, then attempt to move the cursor directly to the right under the shown via. Make sure to _not_ commit any of the traces, and just replicate the trace path through cursor movements. The angle which the original trace comes off the shown pad appears to affect whether the crash occurs or not, so the 270 degree angle appears to be necessary in this situation.

Revision history for this message
Ben Kempke (bpkempke) wrote :

Of note: I am also able to recreate the problem on the latest mac nightly (5871)

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.