Open gwideman opened 1 month ago
Could you try the upstream version? There were some significant changes in the way GUI operates, so I want to be sure the problem is present.
The only difference between CLI and GUI is that after successful penalization, GUI has to copy the panel into the currently open window. It is possible there might be some inefficiency there, I will check it out.
Could you try the upstream version?
I can try that, but it will probably take me a day to get to it.
OK, I have not tried anything new yet.
The GUI is part of the backend. The KiCAD plugin is just a tiny loader. Definitely try to reproduce this with the v1.6.0. At the moment, there is no point in trying upstream version as it is the same as the just released v1.6.0.
I have an exact same problem. It stalled after hitting on the panelize button. I didn't have that issue until I upgraded KiCad to 8.0.4 and kikit to 1.6.0. I even upgraded your GUI backend to 1.6.0. The overall CPU when stalled is at 3-4%.
I want to add that it stalls on BOTH Windows version and Mac OS (silicon) Ventura 13.5.1. When hitting panelize button, it crashed. Looks like a segmentation fault as it was trying to access to memory outside of memory region for the process.
Although the panelization was partially done. When I reopened KiCad, all I can see was a generated Edge.Cuts layer but not the rest of the design with all other layers. See screenshot:
Although I could panelize it without any issues if I run from CLI. Both were on KiCad 8.0.4 and I've updated to the most recent versions of kikit (shell command) and kikit-gui (KiCad plug-in).
Below is the crash report:
Process: pcbnew [33202]
Path: /Applications/KiCad/KiCad.app/Contents/Applications/pcbnew.app/Contents/MacOS/pcbnew
Identifier: org.kicad.pcbnew
Version: 8.0.4 (8.0.4)
Code Type: ARM-64 (Native)
Parent Process: kicad [31371]
Responsible: kicad [31371]
User ID: 501
Date/Time: 2024-07-20 12:20:18.5048 -0400
OS Version: macOS 13.5.1 (22G90)
Report Version: 12
Anonymous UUID: 94DCB19B-8018-E78F-AD75-5D423B7ED59F
Time Awake Since Boot: 840000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x2626269602020207 -> 0x0000269602020207 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x2626269602020207
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [33202]
VM Region Info: 0x269602020207 is not in any region. Bytes after previous region: 41944684298760 Bytes before following region: 63127395630585
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
commpage (reserved) 1000000000-7000000000 [384.0G] ---/--- SM=NUL ...(unallocated)
---> GAP OF 0x5f9000000000 BYTES
MALLOC_NANO 600000000000-600008000000 [128.0M] rw-/rwx SM=PRV
Kernel Triage:
VM - (arg = 0x0) pmap_enter retried due to resource shortage
VM - (arg = 0x0) pmap_enter retried due to resource shortage
VM - (arg = 0x0) pmap_enter retried due to resource shortage
VM - (arg = 0x0) pmap_enter retried due to resource shortage
Update to this issue, using newly updated:
In brief testing I was not able to get kikit to complete error free. Here's a list of what I noted along the way.
Conclusions:
JSON settings used:
{
"layout": {
"hspace": "0.mm",
"rows": "3",
"cols": "4"
},
"tabs": {
"type": "full"
},
"cuts": {
"type": "vcuts",
"clearance": "0.2mm",
"layer": "Edge.Cuts"
},
"framing": {
"type": "frame",
"hspace": "0mm",
"vspace": "0mm",
"width": "10mm",
"maxtotalheight": "300mm",
"maxtotalwidth": "300mm"
},
"text": {
"type": "simple",
"voffset": "3mm",
"text": "[REDACTED] 07 JUL 2024 2024 [REDACTED] STEP= xxxx"
},
"post": {
"origin": "bl",
"dimensions": "True"
}
}
+1 also impacted from this. Dont know why its getting stuck/stalls which in the end crushes the KiCad.
Can we download the 1.5.x version (unofficial upstream version) that was before the 1.6.0 release? For me that was working fine.
Conversation on this issue seems to have stalled. Anything we can do to help diagnose this issue?
Prerequisites
KiKit version
kikit, version 1.5.1
KiCAD version
8.0.3
Operating system
Windows 10 Pro 10.0.19045
Description
This report may have insufficient detail to spot a cause, but I'm hoping for suggestions on how to help narrow down that cause.
Symptom: A panelization job, as specified in a json file, runs in seconds from the command line, but when launched from the Kicad PCB kikit plugin UI "Panelize" button, the kikit process stalls for several minutes.
Sample stall time: For a 35x35mm board with 5 SMD ICs and a few dozen other SMD parts, to be panelized 3x4 boards, from CLI it runs in 6 seconds. From plugin UI, it runs in 5 minutes.
Stall time does vary with complexity. A 20mm square board with just one SMD transistor panelized 3x4 takes less than 2 secs for CLI, but 7 secs from plugin UI, so hard to notice much difference.
I have seen this symptom on all of the four boards I tried, on two different PCs, with significantly different kikit parameters (eg: mousebite tabs vs vcuts). I did not see any boards on which kikit UI ran without stalling.
When launched from GUI, the progress bar advances to a certain point (position varies: one example boards stalls at say 10%, another say 40%), then stops there for the majority of the several minutes, then suddenly sprints to 100%.
Inspecting the stalled kikit in Windows Resource monitor, there's no high disk activity (ie: no obvious virtual memory disk thrashing). CPU is about 12%, which is 100% of one "logical processor" on my "4-core, 8 logical processor" i7-6700 machine.
Steps to Reproduce
Of course, if you don't see the stall, then there's some factor outside this repro setup that's somehow in play.