Segfault on creating square filled zone with python interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Released
|
Unknown
|
Bug Description
When using the python interface, Kicad crashes with a segfault following refresh when a filled zone is added in some cases.
Following code is a minimal example reproducing the problem:
import pcbnew
from pcbnew import FromMM
board = pcbnew.GetBoard()
zone = pcbnew.
sps = pcbnew.
chain = pcbnew.
chain.Append( FromMM(0.0), FromMM(0.0) )
chain.Append( FromMM(20.0), FromMM(0.0) )
chain.Append( FromMM(20.0), FromMM(20.0) )
chain.Append( FromMM(0.0), FromMM(20.0) )
chain.SetClosed
sps.AddOutline(
zone.SetOutline
board.Add(zone)
pcbnew.Refresh()
Interestingly, problem only occurs when the shape is square, i.e. when last chain append is to (0.0,20) as above. If changed to (0.1, 20), or omitted (to make a triangle) then it works fine.
Application: kicad
Version: 6.0.0-unknown-
Libraries:
wxWidgets 3.0.4
libcurl/7.64.0 OpenSSL/1.1.1b zlib/1.2.11 brotli/1.0.7 libidn2/2.1.1 libpsl/0.20.2 (+libidn2/2.0.5) libssh/
Platform: Linux 5.0.11-
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,
Boost: 1.69.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.64.0
Compiler: GCC 9.0.1 with C++ ABI 1013
Build settings:
USE_
USE_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
KICAD_
KICAD_SPICE=ON
description: | updated |
Changed in kicad: | |
importance: | Undecided → Critical |
tags: | added: pcbnew python |
Changed in kicad: | |
milestone: | none → 6.0.0-rc1 |
Changed in kicad: | |
milestone: | 6.0.0-rc1 → none |
Changed in kicad: | |
importance: | Critical → Unknown |
status: | Expired → Fix Released |
I am unable to recreate this. Do you still observe the same behavior?
Application: Pcbnew 1256-g39954b20f ), release build compatible with 2.8) GTK+ 3.24
Version: (5.1.0-
Libraries:
wxWidgets 3.0.4
libcurl/7.64.0 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-5-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,
Boost: 1.67.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.64.0
Compiler: GCC 8.3.0 with C++ ABI 1013
Build settings: SCRIPTING= ON SCRIPTING_ MODULES= ON SCRIPTING_ PYTHON3= ON SCRIPTING_ WXPYTHON= ON SCRIPTING_ WXPYTHON_ PHOENIX= ON SCRIPTING_ ACTION_ MENU=ON GITHUB_ PLUGIN= ON USE_OCE= ON USE_OCC= OFF
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
KICAD_
KICAD_SPICE=ON