pcbnew crashes in DRC

Bug #1459720 reported by henrik
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Tomasz Wlostowski

Bug Description

Running DRC on attached board file crashes pcbnew. DRC works if U28 footprint is modified to be like U27.

Application: kicad
Version: (2015-05-22 BZR 5678)-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-15-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

#0 0x00007fffe97b2055 in std::list<boost::polygon::point_data<int>, std::allocator<boost::polygon::point_data<int> > >::begin (this=0x0)
    at /usr/include/c++/4.9/bits/stl_list.h:772
#1 0x00007fffe97a9aa6 in boost::polygon::polygon_arbitrary_formation<int>::active_tail_arbitrary::pushPoint (this=0x31726c0, point=...)
    at kicad.bzr/boost_root/include/boost/polygon/detail/polygon_arbitrary_formation.hpp:1068
#2 0x00007fffe97a908f in boost::polygon::polygon_arbitrary_formation<int>::processPoint_<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > >, std::vector<std::pair<boost::polygon::scanline_base<int>::vertex_half_edge, boost::polygon::polygon_arbitrary_formation<int>::active_tail_arbitrary*>, std::allocator<std::pair<boost::polygon::scanline_base<int>::vertex_half_edge, boost::polygon::polygon_arbitrary_formation<int>::active_tail_arbitrary*> > > > (this=0x7fffffffb940,
    output=std::vector of length 0, capacity 195,
    elements=std::vector of length 0, capacity 0, point=...,
    counts_from_scanline=std::vector of length 1, capacity 1 = {...},
    incoming_count=std::vector of length 1, capacity 2 = {...})
    at kicad.bzr/boost_root/include/boost/polygon/detail/polygon_arbitrary_formation.hpp:1532
#3 0x00007fffe97a392b in boost::polygon::polygon_arbitrary_formation<int>::processEvent_<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > >, __gnu_cxx::__normal_iterator<boost::polygon::scan---Type <return> to continue, or q <return> to quit---
line_base<int>::vertex_half_edge*, std::vector<boost::polygon::scanline_base<int>::vertex_half_edge, std::allocator<boost::polygon::scanline_base<int>::vertex_half_edge> > > > (this=0x7fffffffb940,
    output=std::vector of length 0, capacity 195, inputBegin=..., inputEnd=...)
    at kicad.bzr/boost_root/include/boost/polygon/detail/polygon_arbitrary_formation.hpp:1735
#4 0x00007fffe979daa1 in boost::polygon::polygon_arbitrary_formation<int>::scan<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > >, __gnu_cxx::__normal_iterator<boost::polygon::scanline_base<int>::vertex_half_edge*, std::vector<boost::polygon::scanline_base<int>::vertex_half_edge, std::allocator<boost::polygon::scanline_base<int>::vertex_half_edge> > > > (this=0x7fffffffb940, output=std::vector of length 0, capacity 195,
    inputBegin=..., inputEnd=...)
    at kicad.bzr/boost_root/include/boost/polygon/detail/polygon_arbitrary_formation.hpp:1362
#5 0x00007fffe9799edb in boost::polygon::polygon_set_data<int>::get_fracture<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > >, boost::polygon::polygon_concept> (this=0x7fffffffba50,
    container=std::vector of length 0, capacity 195, fracture_holes=true)
    at kicad.bzr/boost_root/include/boost/polygon/polygon_set_data.hpp:800
#6 0x00007fffe979418f in boost::polygon::polygon_set_data<int>::get_dispatch<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::poly---Type <return> to continue, or q <return> to quit---
gon_data<int> > > > (this=0x7fffffffba50,
    output=std::vector of length 0, capacity 195, tag=...)
    at kicad.bzr/boost_root/include/boost/polygon/polygon_set_data.hpp:783
#7 0x00007fffe9791ef7 in boost::polygon::polygon_set_data<int>::get<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > > > (this=0x7fffffffba50, output=std::vector of length 0, capacity 195)
    at kicad.bzr/boost_root/include/boost/polygon/polygon_set_data.hpp:235

#8 0x00007fffe9790aff in boost::polygon::polygon_set_mutable_traits<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > > >::set<__gnu_cxx::__normal_iterator<std::pair<std::pair<boost::polygon::point_data<int>, boost::polygon::point_data<int> >, int> const*, std::vector<std::pair<std::pair<boost::polygon::point_data<int>, boost::polygon::point_data<int> >, int>, std::allocator<std::pair<std::pair<boost::polygon::point_data<int>, boost::polygon::point_data<int> >, int> > > > > (
    polygon_set=std::vector of length 0, capacity 195, input_begin=...,
    input_end=...)
    at kicad.bzr/boost_root/include/boost/polygon/polygon_set_traits.hpp:100
#9 0x00007fffe97f460c in boost::polygon::self_assignment_boolean_op<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > >, std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::p---Type <return> to continue, or q <return> to quit---
olygon::polygon_data<int> > >, 3> (
    lvalue_=std::vector of length 0, capacity 195,
    rvalue_=std::vector of length 12, capacity 12 = {...})
    at kicad.bzr/boost_root/include/boost/polygon/detail/polygon_set_view.hpp:199
#10 0x00007fffe97f44d2 in boost::polygon::operators::operator-=<std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > >, std::vector<boost::polygon::polygon_data<int>, std::allocator<boost::polygon::polygon_data<int> > > > (lvalue=std::vector of length 0, capacity 195,
    rvalue=std::vector of length 12, capacity 12 = {...})
    at kicad.bzr/boost_root/include/boost/polygon/polygon_set_concept.hpp:440
#11 0x00007fffe97f3b39 in ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList
    (this=0x3041550, aPcb=0x302fda0)
    at kicad.bzr/pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp:483
#12 0x00007fffe980b60b in ZONE_CONTAINER::BuildFilledSolidAreasPolygons (
    this=0x3041550, aPcb=0x302fda0, aOutlineBuffer=0x0)
    at kicad.bzr/pcbnew/zone_filling_algorithm.cpp:103
#13 0x00007fffe980abd5 in PCB_EDIT_FRAME::Fill_Zone (this=0xfe6520,
    aZone=0x3041550)
    at kicad.bzr/pcbnew/zones_by_polygon_fill_functions.cpp:113
---Type <return> to continue, or q <return> to quit---
#14 0x00007fffe980b06e in PCB_EDIT_FRAME::Fill_All_Zones (this=0xfe6520,
    aActiveWindow=0x3130c20, aVerbose=false)
    at kicad.bzr/pcbnew/zones_by_polygon_fill_functions.cpp:159
#15 0x00007fffe9703b3a in DRC::RunTests (this=0x2af8d50, aMessages=0x31793f0)
    at kicad.bzr/pcbnew/drc.cpp:234
#16 0x00007fffe95cbe05 in DIALOG_DRC_CONTROL::OnStartdrcClick (this=0x3130c20,
    event=...)
    at kicad.bzr/pcbnew/dialogs/dialog_drc.cpp:147
#17 0x00007ffff69a971e in wxAppConsoleBase::CallEventHandler (this=0x6dcc80,
    handler=0x3130c20, functor=..., event=...) at ../src/common/appbase.cpp:623
#18 0x00007ffff6b44f08 in wxEvtHandler::ProcessEventIfMatchesId (entry=...,
    handler=<optimised out>, event=...) at ../src/common/event.cpp:1392
#19 0x00007ffff6b452f6 in wxEvtHandler::SearchDynamicEventTable (
    this=0x3189270, event=...) at ../src/common/event.cpp:1751
#20 0x00007ffff6b4537e in wxEvtHandler::TryHereOnly (this=0x3189270, event=...)
    at ../src/common/event.cpp:1585
#21 0x00007ffff6b45443 in TryBeforeAndHere (event=..., this=0x3189270)
    at ../include/wx/event.h:3671
#22 wxEvtHandler::ProcessEventLocally (this=0x3189270, event=...)
    at ../src/common/event.cpp:1522
#23 0x00007ffff6b454a5 in wxEvtHandler::ProcessEvent (this=0x3189270,
    event=...) at ../src/common/event.cpp:1495
---Type <return> to continue, or q <return> to quit---
#24 0x00007ffff6b45217 in wxEvtHandler::SafelyProcessEvent (
    this=<optimised out>, event=...) at ../src/common/event.cpp:1613
#25 0x00007ffff72bab1c in wxWindowBase::HandleWindowEvent (
    this=this@entry=0x3189270, event=...) at ../src/common/wincmn.cpp:1525
#26 0x00007ffff70f69a9 in wxgtk_button_clicked_callback (button=0x3189270)
    at ../src/gtk/button.cpp:40
#27 0x00007ffff4b7d504 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#28 0x00007ffff4b96fa7 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007ffff4b978ff in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007ffff5572395 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#31 0x00007ffff4b7d2d5 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#32 0x00007ffff4b8e913 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#33 0x00007ffff4b97698 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#34 0x00007ffff4b978ff in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#35 0x00007ffff5571289 in ?? ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#36 0x00007ffff5617d1f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#37 0x00007ffff4b7d2d5 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#38 0x00007ffff4b8ef32 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#39 0x00007ffff4b971a5 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#40 0x00007ffff4b978ff in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#41 0x00007ffff572f61c in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#42 0x00007ffff5616464 in gtk_propagate_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#43 0x00007ffff56168fb in gtk_main_do_event ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#44 0x00007ffff5289bac in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#45 0x00007ffff48a7c3d in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007ffff48a7f20 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007ffff48a8242 in g_main_loop_run ()
---Type <return> to continue, or q <return> to quit---
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007ffff5615857 in gtk_main ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#49 0x00007ffff707a745 in wxGUIEventLoop::DoRun (this=0x2bf17c0)
    at ../src/gtk/evtloop.cpp:65
#50 0x00007ffff69ef750 in wxEventLoopBase::Run (this=0x2bf17c0)
    at ../src/common/evtloopcmn.cpp:78
#51 0x00007ffff69aba46 in wxAppConsoleBase::MainLoop (this=0x6dcc80)
    at ../src/common/appbase.cpp:334
#52 0x00000000004228e1 in APP_SINGLE_TOP::OnRun (this=0x6dcc80)
    at kicad.bzr/common/single_top.cpp:155
#53 0x00007ffff6a46660 in wxEntry (argc=<optimised out>, argv=<optimised out>)
    at ../src/common/init.cpp:495
#54 0x000000000041e194 in main (argc=2, argv=0x7fffffffdbe8)
    at kicad.bzr/common/single_top.cpp:189

Related branches

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

Did you create this board with Pcbnew or did you edit the board file by hand? If you created this with Pcbnew, I find it a bit disconcerting that you can actually define a copper layer zones outside of the board outline. At least the DRC should fail for something that doesn't seem to me to be valid. None the less, this board triggers the well known boost polygon bug. You don't need to run the DRC to get the segfault. It's the zone refill is where the failure occurs.

Revision history for this message
henrik (henrik-forsten) wrote :

The board is made with pcbnew and the full board has similar zones. I have used similarly defined zones in several boards where I want to fill a whole layer. Fills are working fine and in my opinion as they should be: no copper is filled outside the board outline, no errors are generated and copper is filled isolation distance away from the edges.

Changed in kicad:
assignee: nobody → Tomasz Wlostowski (twlostow)
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

This should be fixed by 5741, right? Looks like it to me.

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Jason Cerundolo (z-jason-u) wrote :

I tried it in 5747 and it's fixed for me.

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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