Python pcbnew Set/GetTimeStamp fails

Bug #1837867 reported by muXer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
jean-pierre charras

Bug Description

I wrote a plugin for stitching via's in the PCB, but since several versions it doesn't work anymore.

The GetTimeStamp and SetTimeStamp functions don't work as expected

SampleCode:

    def DeleteVias(self):
        target_tracks = filter(lambda x: (x.GetNetname().upper() == self.netname), self.pcb.GetTracks())
        for via in target_tracks:
            if via.Type() == PCB_VIA_T:
                print(via.GetTimeStamp().__class__, via.GetTimeStamp())
                if via.GetTimeStamp() == 33:
                    self.pcb.RemoveNative(via)
        self.RefillBoardAreas()

Output of the "print":

<class 'SwigPyObject'> <Swig Object of type 'timestamp_t *' at 0x7f4aea6ec720>
swig/python detected a memory leak of type 'timestamp_t *', no destructor found.

Tags: pcbnew python
Revision history for this message
muXer (mux3r) wrote :

Oh I forgot the version, sorry

Version: 5.1.3-ffb9f22~84~ubuntu18.04.1, release build

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

Please copy the full version information from About KiCad -> Copy Version Info.

tags: added: pcbnew python
Changed in kicad:
status: New → Incomplete
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: Incomplete → Fix Committed
assignee: nobody → jean-pierre charras (jp-charras)
Changed in kicad:
milestone: none → 5.1.4
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.