Closed adamws closed 3 years ago
Drawing PCB without modules (for example edges only) were causing crash due to module variable not being None (empty list):
aws:PcbDraw/ (master✗) $ pcbdraw --filter "" test/test/test.kicad_pcb test.svg > /home/aws/.local/lib/python3.9/site-packages/pcbdraw/pcbdraw.py(492)get_hole_mask() -> if module.GetPadCount() == 0: (Pdb) type(module) <class 'pcbnew.MODULE_List'> (Pdb) n [1] 351541 segmentation fault (core dumped) pcbdraw --filter "" test/test/test.kicad_pcb test.svg
Using pcbnew.MODULE_List.GetFirst() before iterating through elements seems to be fixing this issue.
Run once for empty board (outline only) and once for PCB with components and it is working.
Thank you for the fix! I merged it into master.
Drawing PCB without modules (for example edges only) were causing crash due to module variable not being None (empty list):
Using pcbnew.MODULE_List.GetFirst() before iterating through elements seems to be fixing this issue.
Run once for empty board (outline only) and once for PCB with components and it is working.