Python DeleteStructure crashes on DRAWSEGMENT
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Invalid
|
Undecided
|
Unassigned |
Bug Description
It probably happens on other objects as well.
When calling DeleteStructure on an object, KiCad occasionally crashes.
[pcbnew.
An apparently better way to remove S_SEGMENTS is:
pcbnew.
rather than:
segment.
Application: kicad
Version: (2017-08-27 revision e3c64f1f0)-makepkg, release build
Libraries:
wxWidgets 3.0.3
libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.3 (wchar_t,wx containers,
Boost: 1.60.0
Curl: 7.54.1
KiCad compiler: GCC 7.1.0 with C++ ABI 1011
Build settings:
USE_
USE_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
I'm not sure this is a bug other than the fact the drawing object list is exposed and open to abuse. It should be private so you cannot do this or at least you should be restricted to iterating over the list in Python. You probably should be using BOARD::Remove() rather than BOARD:: GetDrawings( ).Remove( ) to remove objects from the BOARD object.