Pcbnew crashes when flipping board, saving and opening again

Bug #1778288 reported by Fabián Inostroza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Maciej Suminski

Bug Description

I tried merging two boards using Pcbnew standalone to make a stencil for two boards.
The layers I was interested where different for the two boards so I flipped one of them, exported the gerbers and then closed Pcbnew.
When trying to open the file again Pcbnew crashed.

I found later that this also happens when lauching Pcbnew from KiCad and only while using the modern toolset (accelerated).

Steps to reproduce:
1. Open the attached project.
2. Select the board and flip it, save and close Pcbnew
3. Open again the pcb file.

If you refill the zones before saving and after flipping then Pcbnew doesn't crash.

gdb shows a segfault in include/geometry/shape_poly_set.h:87.

Application: kicad
Version: (5.0.0-rc2-193-gdd436b658), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.60.0 GnuTLS/3.5.18 zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.2 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.32.0 librtmp/2.3
Platform: Linux 4.16.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.60.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

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_USE_OCC=OFF
    KICAD_SPICE=OFF

Tags: pcbnew
Revision history for this message
Fabián Inostroza (fabianinostroza) wrote :
description: updated
Changed in kicad:
milestone: none → 5.0.0-rc3
importance: Undecided → Critical
tags: added: pcbnew
Revision history for this message
Nick Østergaard (nickoe) wrote :

I can confirm the crash with

Application: kicad
Version: (5.0.0-rc2-195-gcd9abbb99), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.60.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.31.1
Platform: Linux 4.17.2-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.67.0
    OpenCASCADE Technology: 6.9.1
    Curl: 7.60.0
    Compiler: GCC 8.1.1 with C++ ABI 1012

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=OFF
    KICAD_USE_OCC=ON
    KICAD_SPICE=ON

Changed in kicad:
status: New → Confirmed
Changed in kicad:
assignee: nobody → Maciej Suminski (orsonmmz)
status: Confirmed → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

There is still a minor issue: after the steps described in the report, one has to move the polygon to refresh the holes after the board file is opened. It does not qualify as a critical bug though.

Revision history for this message
Fabián Inostroza (fabianinostroza) wrote :

Thanks Maciej, it doesn't crash now.

The issue you mention was also present in the modern toolset (fallback) before the fix to the accelerated canvas.

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

Bug attachments

Remote bug watches

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