KiCAD 5.1.6 on Ubuntu 18: 3D viewer freezes

I know the question is quite open, but maybe some tips on where to look?

Starting this morning, on one of my two (in principle identical) KiCAD installs, the 3D viewer makes KiCAD freeze (the desktop system grays out all KiCAD windows indefinitely, and I have to click on “Force Quit”, which causes to lose any unsaved work … in any case, it did on one occasion). I say “one of my two” because I’m at the office working on that one. I don’t know whether my installation at home will exhibit the same issue (will try tonight when I’m back home, of course).

This is the version info:

Application: KiCad
Version: 5.1.6-c6e7f7d~87~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-112-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.5.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

I had a partially upgraded system, but now, I did a full upgrade (sudo apt upgrade) and rebooted the machine. No difference; the 3D viewer still makes KiCAD (all sub-apps) freeze.

I uninstalled and reinstalled KiCAD. First, I tried sudo apt remove kicad .... sudo apt install kicad; then, I tried sudo apt purge kicad .... sudo apt install kicad. Neither one made any difference.

In case that’s relevant: the purge command did warn me that a directory (related to plugins, or scripting) was not empty and thus was not removed.

What are the differences?
What is the GPU and which drivers are you using in one and on the other system?
Maybe better to rise a bug… with this information.

Well, I’m not really sure it is a KiCAD bug; it may be some bug in the graphics system around it, or maybe some incompatibility (I had suspected a botched upgrade, but I don’t see any evidence in favour of that theory).

On the system showing the issue, I have an NVIDIA GTX 750, with dual monitor, both at 2560x1440 resolution. Using the NVIDIA propriatary driver, version 440.100

At home (off the top of my head), I’m using an NVIDIA GT 1030 with a single monitor at 3840x2160; I suspect that I’m also using the latest available proprietary driver for that particular GPU model. Notice, however, that I do not know whether the setup at home will exhibit the same issue (it hasn’t, up until last night; then again, neither was the setup here at the office until yesterday afternoon, at least not that I had noticed; I distinctly remember that I did run the 3D viewer more than once yesterday here at the office).

Not sure why it didn’t occur to me to try that, but it turns out that it is the particular layout that is causing the 3D viewer to freeze!!

I just opened a different project, went to pcbnew, and the 3D-view worked as usual.

Anyway, fast-forward a few debugging tests to narrow-down the problem … It would seem like the culprit was the .stp 3D model for this USB-C connector Connector_USB:USB_C_Receptacle_Amphenol_12401610E4-2A

I edited that footprint, and changed the 3D model for the .stp file I downloaded from the manufacturer. I think I edited the file with FreeCAD to adjust the colours.

Funny thing is: when I tried to open this .stp file with FreeCAD, I first thought FreeCAD had frozen. I tried again and went for a coffee while FreeCAD was loading … Turns out it worked (it was just taking so long that it looked like the thing was frozen).

Funny thing with KiCAD is: I tried the same thing: open and let it run even though it looks like it froze. After a few minutes, the 3D viewer was showing me the board like usual. The actual funny part is: after it opened once, now I invoke the 3D-viewer and it responds instantly (well, as fast as usual).

In case someone wants to dig deeper into this, here’s the 3D file (like I said, downloaded from the manufacturer as .stp, and edited with FreeCAD to adjust the colours).

2 Likes

oh! So I see it is related with library (same as FreeCAD?) that loads step file.

After 3D-Viewer loads a file, it is converted to a binary internal format and is cached. :slight_smile:

2 Likes

Loos like that’s a project-specific persistent (i.e., saved to disk) cache ? It still loads fine, even though I closed KiCAD and reopened it later. If I go to a different project and add this footprint to the layout, then it takes a while (not as long as yesterday, though!) to show the 3D-view the first time, and then it comes up more quickly.

1 Like

The cache is user specific, the location is system specific.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.