Skip to content

Commit b4f26925 causes panelization to crash on Mac #875

@mairas

Description

@mairas

Prerequisites

  • I have read FAQ
  • I have searched existing issues (including closed ones)
  • I use KiKit at least version 1.7.2 (older version are not supported)

KiKit version

python -m kikit.ui, version 1.7.2+18.gb4f2692

KiCAD version (only KiCAD 8 and 9 are supported)

Version 9.0.6, release build

Operating system

MacOS 26.1

Description

This panelization command:

kikit panelize \
    --tabs 'annotation' \
    --framing 'frame; width: 5mm; space: 2mm' \
    --tooling '4hole; hoffset: 20mm; voffset: 3.5mm; size: 1.152mm' \
    --fiducials '4fid; hoffset: 30mm; voffset: 4mm; coppersize: 1mm; opening: 2mm;' \
    --layout 'grid; rows: 4; cols: 1; space: 5mm' \
    --cuts 'vcuts; layer: Edge.Cuts' \
    --post 'millradius: 2mm' \
    ${BOARD}.kicad_pcb ${BOARD}-panel.kicad_pcb

on this project: https://github.com/hatlabs/SH-ESP32-hardware (can provide an exact project archive on request)

results in KiKit crashing hard:

@cutter:~/w/h/S/SH-ESP32-hardware (v2.2.2|%) $ ./prepare_panel_assembly_vcuts.sh
Panelizing...
11:48:42 AM: Debug: Adding duplicate image handler for 'PNG file'
11:48:42 AM: Debug: Adding duplicate image handler for 'JPEG file'
11:48:42 AM: Debug: Adding duplicate image handler for 'TIFF file'
11:48:42 AM: Debug: Adding duplicate image handler for 'GIF file'
11:48:42 AM: Debug: Adding duplicate image handler for 'PNM file'
11:48:42 AM: Debug: Adding duplicate image handler for 'PCX file'
11:48:42 AM: Debug: Adding duplicate image handler for 'IFF file'
11:48:42 AM: Debug: Adding duplicate image handler for 'Windows icon file'
11:48:42 AM: Debug: Adding duplicate image handler for 'Windows cursor file'
11:48:42 AM: Debug: Adding duplicate image handler for 'Windows animated cursor file'
11:48:42 AM: Debug: Adding duplicate image handler for 'TGA file'
11:48:42 AM: Debug: Adding duplicate image handler for 'XPM file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PNG file'
11:48:43 AM: Debug: Adding duplicate image handler for 'JPEG file'
11:48:43 AM: Debug: Adding duplicate image handler for 'TIFF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'GIF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PNM file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PCX file'
11:48:43 AM: Debug: Adding duplicate image handler for 'IFF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows icon file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows cursor file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows animated cursor file'
11:48:43 AM: Debug: Adding duplicate image handler for 'TGA file'
11:48:43 AM: Debug: Adding duplicate image handler for 'XPM file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PNG file'
11:48:43 AM: Debug: Adding duplicate image handler for 'JPEG file'
11:48:43 AM: Debug: Adding duplicate image handler for 'TIFF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'GIF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PNM file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PCX file'
11:48:43 AM: Debug: Adding duplicate image handler for 'IFF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows icon file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows cursor file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows animated cursor file'
11:48:43 AM: Debug: Adding duplicate image handler for 'TGA file'
11:48:43 AM: Debug: Adding duplicate image handler for 'XPM file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PNG file'
11:48:43 AM: Debug: Adding duplicate image handler for 'JPEG file'
11:48:43 AM: Debug: Adding duplicate image handler for 'TIFF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'GIF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PNM file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PCX file'
11:48:43 AM: Debug: Adding duplicate image handler for 'IFF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows icon file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows cursor file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows animated cursor file'
11:48:43 AM: Debug: Adding duplicate image handler for 'TGA file'
11:48:43 AM: Debug: Adding duplicate image handler for 'XPM file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PNG file'
11:48:43 AM: Debug: Adding duplicate image handler for 'JPEG file'
11:48:43 AM: Debug: Adding duplicate image handler for 'TIFF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'GIF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PNM file'
11:48:43 AM: Debug: Adding duplicate image handler for 'PCX file'
11:48:43 AM: Debug: Adding duplicate image handler for 'IFF file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows icon file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows cursor file'
11:48:43 AM: Debug: Adding duplicate image handler for 'Windows animated cursor file'
11:48:43 AM: Debug: Adding duplicate image handler for 'TGA file'
11:48:43 AM: Debug: Adding duplicate image handler for 'XPM file'
libc++abi: terminating due to uncaught exception of type std::out_of_range: aGlobalIndex-th vertex does not exist
Fatal Python error: Aborted

Current thread 0x0000000200eea080 (most recent call first):
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pcbnew.py", line 10191 in Move
  File "/Users/mairas/src/yaqwsx/KiKit/kikit/panelize.py", line 2383 in translate
  File "/Users/mairas/src/yaqwsx/KiKit/kikit/panelize_ui_impl.py", line 690 in positionPanel
  File "/Users/mairas/src/yaqwsx/KiKit/kikit/panelize_ui.py", line 300 in doPanelization
  File "/Users/mairas/src/yaqwsx/KiKit/kikit/panelize_ui.py", line 217 in panelize
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 788 in invoke
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 1443 in invoke
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 1697 in invoke
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 1082 in main
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 1161 in __call__
  File "/Users/mairas/src/yaqwsx/KiKit/kikit/ui.py", line 28 in <module>
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87 in _run_code
  File "/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197 in _run_module_as_main
/usr/local/bin/kikit: line 2: 97009 Abort trap: 6           /Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/bin/python3 -m kikit.ui "$@"

Steps to Reproduce

Run the command provided above.

I have pinned this issue down to commit b4f2692 (Prevent interference of neighboring boards polygons). Before that commit, no crash. After that commit, crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions