kicad-jlcpcb-tools: Crash during DB download on MacOS

Hi there, this plugin looks awesome, unfortunately I could not try it out yet, because of the following issue:

Bug/Reproduction Every single time I open the plugin, it starts to download the zip parts of the parts DB, but then KiCAD crashes before completion. I monitored the $plugin/jlcpcb folder, and the furthest the download ever got was parts 001-007 complete (80000000 bytes), but part 008 still at 0 bytes. Unfortunately I could not get a readable exception, but if you can help me to run the download step manually, I’m happy to debug further!

Version information

OS: MacOS 13.6.6 (22G630)

Plugin: 2024.04.03

Application: KiCad arm64 on arm64
Version: 8.0.1, release build
Libraries:
    wxWidgets 3.2.4
    FreeType 2.13.2
    HarfBuzz 8.3.0
    FontConfig 2.15.0
    libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
Platform: macOS Ventura Version 13.6.6 (Build 22G630), 64 bit, Little endian, wxMac
Build Info:
    Date: Mar 14 2024 13:30:33
    wxWidgets: 3.2.4 (wchar_t,wx containers)
    Boost: 1.84.0
    OCC: 7.7.2
    Curl: 7.87.0
    ngspice: 42
    Compiler: Clang 14.0.3 with C++ ABI 1002
Build settings:

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

Well I guess my theory of working memory doesn’t appear to be necessarily the cause of the crash. I figured loading 70MB repeatedly was causing too much memory allocated at once.

I have one more theory to try out based on the ui feedback. I have to take a quick shower but I can whip up a proof of concept fix within the hour.

On Sat, Apr 27, 2024 at 3:23 PM velolala @.***> wrote:

It seems to be enough, to mark any text inside the log area. See e.g. this terminal log, where I had two successful downloads, then before the third attempt, I had marked a few characters on the last log message (in the UI):

/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/bin/python3 -m kicad-jlcpcb-tools /Users/kicad/remoteroot/workspace/build-macos-kicad-release/kicad-mac-builder/build/kicad/src/kicad/pcbnew/action_plugin.cpp(163): assert “PgmOrNull()” failed in register_action(). starting jlcpcbtools standalone mode… 2024.04.27 21:16:03 - DEBUG - download - Parts db is split into 8 parts. Proceeding to download… 2024.04.27 21:16:03 - DEBUG - download - Removing any spurios old zip part files… 2024.04.27 21:16:03 - DEBUG - download - Removing /Users/myuser/Projects/kicad-jlcpcb-tools/jlcpcb/parts-fts5.db.zip.001. 2024.04.27 21:16:03 - DEBUG - download - Removing /Users/myuser/Projects/kicad-jlcpcb-tools/jlcpcb/parts-fts5.db.zip.006. 2024.04.27 21:16:03 - DEBUG - download - Removing /Users/myuser/Projects/kicad-jlcpcb-tools/jlcpcb/parts-fts5.db.zip.008. 2024.04.27 21:16:03 - DEBUG - download - Removing /Users/myuser/Projects/kicad-jlcpcb-tools/jlcpcb/parts-fts5.db.zip.007. 2024.04.27 21:16:03 - DEBUG - download - Removing /Users/myuser/Projects/kicad-jlcpcb-tools/jlcpcb/parts-fts5.db.zip.005. 2024.04.27 21:16:03 - DEBUG - download - Removing /Users/myuser/Projects/kicad-jlcpcb-tools/jlcpcb/parts-fts5.db.zip.002. 2024.04.27 21:16:03 - DEBUG - download - Removing /Users/myuser/Projects/kicad-jlcpcb-tools/jlcpcb/parts-fts5.db.zip.003. 2024.04.27 21:16:03 - DEBUG - download - Removing /Users/myuser/Projects/kicad-jlcpcb-tools/jlcpcb/parts-fts5.db.zip.004. 2024.04.27 21:16:06 - DEBUG - download - Download parts db chunk 1 with a size of 76.29MB 2024.04.27 21:16:12 - DEBUG - download - Download parts db chunk 2 with a size of 76.29MB 2024.04.27 21:16:16 - DEBUG - download - Download parts db chunk 3 with a size of 76.29MB 2024.04.27 21:16:19 - DEBUG - download - Download parts db chunk 4 with a size of 76.29MB 2024.04.27 21:16:21 - DEBUG - download - Download parts db chunk 5 with a size of 76.29MB 2024.04.27 21:16:24 - DEBUG - download - Download parts db chunk 6 with a size of 76.29MB 2024.04.27 21:16:27 - DEBUG - download - Download parts db chunk 7 with a size of 76.29MB 2024.04.27 21:16:29 - DEBUG - download - Download parts db chunk 8 with a size of 18.00MB 2024.04.27 21:16:30 - DEBUG - download - Combining and extracting zip part files… 2024.04.27 21:16:43 - DEBUG - download - Parts db is split into 8 parts. Proceeding to download… 2024.04.27 21:16:43 - DEBUG - download - Removing any spurios old zip part files… 2024.04.27 21:16:49 - DEBUG - download - Download parts db chunk 1 with a size of 76.29MB 2024.04.27 21:16:53 - DEBUG - download - Download parts db chunk 2 with a size of 76.29MB 2024.04.27 21:16:56 - DEBUG - download - Download parts db chunk 3 with a size of 76.29MB 2024.04.27 21:17:00 - DEBUG - download - Download parts db chunk 4 with a size of 76.29MB 2024.04.27 21:17:04 - DEBUG - download - Download parts db chunk 5 with a size of 76.29MB 2024.04.27 21:17:07 - DEBUG - download - Download parts db chunk 6 with a size of 76.29MB 2024.04.27 21:17:09 - DEBUG - download - Download parts db chunk 7 with a size of 76.29MB 2024.04.27 21:17:13 - DEBUG - download - Download parts db chunk 8 with a size of 18.00MB 2024.04.27 21:17:14 - DEBUG - download - Combining and extracting zip part files… 2024.04.27 21:17:42 - DEBUG - download - Parts db is split into 8 parts. Proceeding to download… 2024-04-27 21:17:47.676 Python[789:2092234] IMKClient Stall detected, please Report your user scenario attaching a spindump (or sysdiagnose) that captures the problem - (invocationInterruptXPCReply) block performed very slowly (5.00 secs). zsh: trace trap -m kicad-jlcpcb-tools

— Reply to this email directly, view it on GitHub https://github.com/Bouni/kicad-jlcpcb-tools/issues/448#issuecomment-2081158009, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJH4ADY5MVQMMIQXOGYOWTY7P3LJAVCNFSM6AAAAABGUZDXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGE2TQMBQHE . You are receiving this because you were mentioned.Message ID: @.***>

@Bouni and others, I can try to reproduce it here. I’ve seen it happen prior to the fts5 changes but it’s sporadic. Crash, then restart and download finishes. If I can catch it on the debugger that should help, and I’ll look at the issue text above.