kicad-developers team mailing list archive
Mailing list archive
Re: PATCH: fix crash in netlist updater
On further digging I believe reason for that is that we no longer use the
extended iterator that is in dlist.i
There is some logic there to auto cast objects to proper class by calling
Cast(). I tried this in scripting console and
c = d.Cast()
<pcbnew.DRAWSEGMENT; proxy of <Swig Object of type 'DRAWSEGMENT *' at
It would be good to add same wrapper for deque. I can look into it a bit
later if nobody beats me to it.
On Sat, Jun 1, 2019 at 9:55 PM Andrew Lutsenko <anlutsenko@xxxxxxxxx> wrote:
> On a related note, python api to get drawings (and probably everything
> else that is now in deque) is broken.
> board.GetDrawings() returns
> <pcbnew.DRAWINGS; proxy of <Swig Object of type 'std::deque< BOARD_ITEM *
> > *' at 0x7fa121ffc930> >
> and it's items don't have some methods for some reason
> b = pcbnew.GetBoard()
> d = b.GetDrawings()
> Traceback (most recent call last):
> File "<input>", line 1, in <module>
> File "/usr/local/lib/python3.6/dist-packages/pcbnew.py", line 8393, in
> __getattr__ = lambda self, name: _swig_getattr(self, BOARD_ITEM, name)
> File "/usr/local/lib/python3.6/dist-packages/pcbnew.py", line 83, in
> raise AttributeError("'%s' object has no attribute '%s'" %
> (class_type.__name__, name))
> AttributeError: 'BOARD_ITEM' object has no attribute 'GetShape'
> On Sat, Jun 1, 2019 at 9:49 PM Seth Hillbrand <seth@xxxxxxxxxxxxx> wrote:
>> Thanks Andrew! Good catch.
>> On 2019-06-01 21:40, Andrew Lutsenko wrote:
>> > Hi Seth,
>> > I tried to pull netlist into completely empty board today and got a
>> > crash that I tracked down to
>> > this commit
>> > Simple fix for this particular problem is in attached patch but I
>> > didn't go through all the changes in that commit. It seems in a few
>> > places there are unchecked Modules().front() calls. Maybe they should
>> > be changed to GetFirstModule().
>> > Regards,
>> > Andrew