Strange XDG_CACHE_HOME folder being created

Bug #1785228 reported by Leandro Heck
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Jeff Young

Bug Description

I have a strange folder being created. It seems to be a malformed (environment) variable.

This one: $$XDG_CACHE_HOME}/

I tried to check if it was something generated by me but I don't think so.

Application: kicad
Version: 6.0.0-rc1-unknown-ce37604~66~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g 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-25-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

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

tags: added: packaging ubuntu
Revision history for this message
Aimylios (aimylios) wrote :

I am experiencing the same issue with the current nightly. I have never observed this before, but I just did an upgrade from Fedora 27 to 28 yesterday, so it might be related to that.

The folder only contains *.3dc files, and as far as I can see the XDG_CACHE_HOME variable is used in 3d-viewer/3d_cache/3d_cache.cpp:
cacheDir = ExpandEnvVarSubstitutions( "${XDG_CACHE_HOME}" );

ExpandEnvVarSubstitutions() is defined in common/common.cpp and calls KIwxExpandEnvVars(), which has been introduced by Jeff a couple of days ago as part of commit f8a5e2c1c895ea40fd6fc0595841b3ac54f0b5df (Performance enhancements in fp loading, string cmp, etc.). I suspect that the bug is hidden there.

---

Application: kicad
Version: 6.0.0-rc1-unknown-r13476.72fcf4643.fc28, debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.59.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) libssh/0.7.5/openssl/zlib nghttp2/1.32.0
Platform: Linux 4.17.9-200.fc28.x86_64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.66.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.59.0
    Compiler: GCC 8.1.1 with C++ ABI 1013

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

Revision history for this message
Jeff Young (jeyjey) wrote :

There's definitely an error in KIwxExpandEnvVars(). While the issue doesn't reproduce on OSX, I'd lay strong odds on this being the cause of it.

Fix on the way....

Changed in kicad:
status: New → In Progress
assignee: nobody → Jeff Young (jeyjey)
importance: Undecided → Critical
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 345f57ccb8e2df9bd5ea45cbdd2b68e0f4e18d55
https://git.launchpad.net/kicad/patch/?id=345f57ccb8e2df9bd5ea45cbdd2b68e0f4e18d55

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Aimylios (aimylios) wrote :

I can confirm that the issue has been fixed. The *.3dc files are now created in ~/.cache/kicad/3d/ instead of ~/$$XDG_CACHE_HOME}/kicad/3d/.

Thank you!

---

Application: kicad
Version: 6.0.0-rc1-unknown-r13485.fb28d4588.fc28, debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.59.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) libssh/0.7.5/openssl/zlib nghttp2/1.32.0
Platform: Linux 4.17.9-200.fc28.x86_64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.66.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.59.0
    Compiler: GCC 8.1.1 with C++ ABI 1013

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

Revision history for this message
Jeff Young (jeyjey) wrote :

Good to hear. Thanks for following up, Aimylios.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.