yaqwsx / KiKit

Automation tools for KiCAD
https://yaqwsx.github.io/KiKit
MIT License
1.49k stars 200 forks source link

Panels created in KiKit v1.5.0 cause segfault in KiCAD v8 #651

Closed tanaes closed 5 months ago

tanaes commented 5 months ago

Prerequisites

KiKit version

v1.5.0

KiCAD version

v8.0.0

Operating system

OS X 14.1.2

Description

Creating panel in KiKit via the GUI interface made a successful panel, which i was able to export for production.

However, re-opening the saved panel in PCBNew causes a segfault failure (see attached for stack trace).

Re-opening an older panel, which had been generated via previous KiKit version in KiCAD 7, works fine.

I was able to reproduce this failure with a minimal board created entirely in KiCAD 8, just to make sure it wasn't an issue with a version mismatch between KiCAD board and panel creation. segfault.txt

Steps to Reproduce

see attached for simple project I used to recreate failure entirely within KiCAD v8.

panel_test.zip

yaqwsx commented 5 months ago

https://gitlab.com/kicad/code/kicad/-/issues/17230

yaqwsx commented 5 months ago

Update from the issue report:

DevTeamBlueMaestro commented 5 months ago

Will this fix enable panels already created to be opened? I have already put into production a panel I can no longer open and don't have a way of generating pick and place files for this new panel I created.

yaqwsx commented 5 months ago

It should. When you try the testing version, it should be already fixed.

DevTeamBlueMaestro commented 5 months ago

Do you mean if I try the current testing version of KiKad this issue should be fixed?

yaqwsx commented 5 months ago

If you try stable or upstream KiKit with testing KiCAD (not 8.99 nightly, but 8.0 nightly), it should work.

DevTeamBlueMaestro commented 5 months ago

Yes, I can confirm that KiKit 1.5 with KiCad nightly build at today's date works. Thank you, I have made a donation too. Keep up the good work.

bvernoux commented 5 months ago

I have done the test with KiKit 1.5 + KiCad 8.0.1 official (Win11 Pro) (https://www.kicad.org/download/windows/) and I can still reproduce an issue when saving and reloading the PCB board panel which is corrupted with tons of "Invalid net ID" after load @tanaes Could you try on your side (as I'm pretty sure you can reproduce that too) ?

yaqwsx commented 5 months ago

At the moment I see nothing I can do in KiKit to make this work. This has to be fixed in KiCAD. CLI is no affected, only GUI.

yaqwsx commented 5 months ago

HA! I digged a little deeper into KiCAD's sources and I think I found a solution. @bvernoux and @tanaes could you try it with the current upstream version of KiKit?

bvernoux commented 5 months ago

Thanks for the quick fix I confirm the issue is fixed with your current upstream version of KiKit + KiCad 8.0.1 (official) tested on Windows11 64bits

yaqwsx commented 5 months ago

Unfortunately, starting with KiCAD 6, some of the board properties are saved in the project file. However, when closing pcbnew, the project is not updated on disk. It is updated on disk when project is saved or closed.