Wx text entry not updated

First reply: I have only a few own apps, but I needed a common version for this framework. I recently faced the incompatibility between KICAD and freecad, two of my favourite tool.

Second reply: I didn’t install wxpython by myself (e.g. using pip3). It is installed by apt as dependency for KICAD 6.0!

After a few days of testing I would like to give an update.
I just tried to install the flatpak version. By standard this is wasting a lot of space in my home directory. I could start KiCad and check the functionality.
First of all the observed problem with the text entry was not in place. I checked the version info and found this:
Application: KiCad

Version: 6.0.4, release build

Libraries:
wxWidgets 3.1.5
libcurl/7.79.1-DEV GnuTLS/3.7.2 zlib/1.2.11 libidn2/2.3.1 nghttp2/1.44.0

Platform: Linux 5.4.0-105-generic x86_64, 64 bit, Little endian, wxGTK, cinnamon, x11

Build Info:
Date: Mar 18 2022 22:56:53
wxWidgets: 3.1.5 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.6.1
Curl: 7.79.1-DEV
ngspice: 36
Compiler: GCC 11.2.0 with C++ ABI 1016

Build settings:
KICAD_USE_OCC=ON
KICAD_USE_EGL=ON
KICAD_SPICE=ON

I remember a statement, that KiCad in most (all?) linux distributions is build against wx 3.0.

Then I checked the python shell. It was opened with the expected design, however, I was surprised that the greeting text states a python version 3.9.9. My version installed on from the regular repositories is 3.9.5, the active one is 3.8.10 ( as on most Ubuntu based variants with 20.04 long term kernel).
Additional I got an error message:
Gtk-Message: 22:17:56.949: Failed to load module “xapp-gtk3-module”
This may be the root cause for some hidings of the cursor.
The most important drawback is: I cannot use any of the plugins in the layout editor. I can load any plugin, but none of them is indicated as icon, none of them can be executed. This makes the flatpak version hardly usable.

Back to the mainstream. I could build the latest KiCad version from the sources using wx3.1.5. It is basically working, the effect of the text window is removed, however,Python remains a major issue.
The python shell is not started correctly. Only the frame and window header is shown but no content.
In the layout editor the plugins are loaded, the icons are shown, but most of them are not executable. Two major failure messages were found:

  1. wx.App not started
  2. list index is out of range.

The second error is related to the fact, that the plugins are looking for a window title starting with “pcbnew”. In version 6 this is not available, it was renamed to “pcbedit”, for the german localization “layouteditor”. Therefore they must fail.
For the first error I assume an incompatibility in the code for python 3.8 and 3.9. Since I have no experience in Python programming up to now any hints would be welcome.

I checked the different fori for KiCad and found the notice, that the version 6.0.3 is damaged and should not be used. When I look at the packages which were installed from the repository I saw the following versions:
KiCad-Doc - 6.0.0
Libraries footprints and 3D - 6.0.3
KiCad and demos - 6.0.4

With these different versions there may be a risk that something went wrong. I decided to completely deinstall Kicad and all supporting files. After a fresh installation KiCad was mostly working. Only the plugins looking for a window name “pcbnew” are still failing.

The changes between 6.0.3 and 6.0.4 were in the main application package.
The 6.0.3 libraries and footprints were not related to the problems that caused 6.0.3 to be pulled.

This is most likely because you didn’t recompile wxpython after you upgraded your wxwidgets to 3.1.5. wxPython versions are tightly coupled to wxwidgets versions.

Regarding plugins looking for pcbnew, you have to update those or report the issue to their authors. It’s also possible that the logic you are looking at is only relevant for v5 and doesn’t get executed in modern kicad versions. At least my plugin works like that.

1 Like

Thank you for your hint. I loaded the current wxPython version (4.1.1) and rebuild it with pip as described in several references.
Before and after a new KiCad compilation there was no improvement for the described behaviour.
Which plugin do you maintain? I would like to crosscheck.

From wxPhoenix readme

If you would rather use an already built and installed wxWidgets then that is possible as well by changing some options, see python build.py --help for details. However be aware that doing so will require a wxWidgets that is very close to the same age as the Phoenix code, at least for the unreleased preview snapshots. In other words, the wxWidgets build should use code from the wxWidgets source repository within a few days of when the Phoenix code was checked out. Currently the master branch of Phoenix is tracking the master branch of wxWidgets.

On the other hand, it is probably best to just let wxPython build and bundle wxWidgets. The build tools will by default build wxWidgets in a way that allows it to be bundled with the wxPython extension modules as part of the wxPython package, meaning it can peacefully coexist with any wxWidgets libraries you may already have installed.

When building kicad the second option is not what you want because kicad will pick up system wxwidgets. So getting wxpython to match correctly with wxwidgets is not straightforward. Also I believe there still is no wxpython release matching wxwidgets 3.1.5 although master branch is brought “closely” up to date.

InteractiveHtmlBom. See this line. This only runs for KiCad 5.0, not even 5.1 or later.

I’m also having an issue on Linux Mint.
I’ve now seen the “Preferences” getting garbled twice now. I don’t know if it’s related to Mint, or a general GTK thing or something else entirely.
I’m guessing It only happens the first time the preferences window is opened, and if it happens more often to me I may make an issue for it on gitlab.

It looks like:

Never sighted this issue. My Mint details are above if a comparison is wanted.

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