Segfault while changing polygon segment count

Bug #1740253 reported by J A
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Tomasz Wlostowski

Bug Description

When trying to change the number of segments/360 degrees parameter of a polygon, the following segmentation fault occurs. The segmentation is 100% reproducible:

- Open PCB file via kicad
- Edit polygon
- Change segments/360 degrees from 16 to 32
- Press OK

I'm running the KiCad nightly builds for Ubuntu:

Application: kicad
Version: no-vcs-found-71ea6dc~61~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.10.0-42-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build 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
    KICAD_SPICE=ON

This is the reason for the segfault according to valgrind:
==8092== Process terminating with default action of signal 11 (SIGSEGV)
==8092== Access not within mapped region at address 0x8
==8092== at 0x1C0F0A33: SHAPE_POLY_SET::unfractureSingle(std::vector<SHAPE_LINE_CHAIN, std::allocator<SHAPE_LINE_CHAIN> >&) (in /usr/bin/_pcbnew.kiface)
==8092== by 0x1C0F1C2E: SHAPE_POLY_SET::Unfracture(SHAPE_POLY_SET::POLYGON_MODE) (in /usr/bin/_pcbnew.kiface)
==8092== by 0x1C0F1D77: SHAPE_POLY_SET::CacheTriangulation() (in /usr/bin/_pcbnew.kiface)
==8092== by 0x1BB350E6: ZONE_FILLER::Fill(std::vector<ZONE_CONTAINER*, std::allocator<ZONE_CONTAINER*> >) [clone ._omp_fn.1] (in /usr/bin/_pcbnew.kiface)
==8092== by 0x1E1B843D: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==8092== by 0x73FB6B9: start_thread (pthread_create.c:333)
==8092== by 0x77183DC: clone (clone.S:109)

Revision history for this message
J A (mnja) wrote :
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I confirmed this and it happens with both the gal and legacy canvases. It only happens when editing the properties of the inner round zone of the attached board. Editing the properties of the outer rectangular zones does not segfault.

Changed in kicad:
status: New → Triaged
importance: Undecided → Critical
Changed in kicad:
assignee: nobody → Tomasz Wlostowski (twlostow)
Changed in kicad:
milestone: none → 5.0.0-rc1
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: Triaged → Fix Committed
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.