KiCad crashes when changing language if simulator window is open

If the simulator window is open (Menu in Schematic editor: Inspect → Simulator), and you change language in the schematic editor (Menu: Preferences → Set language → [choose any language different from the one currently active]), then KiCad will krasch; the entire thing, simulator, schematic editor, pcb editor if open, and project manager.

I get this in fedora 36 and 37 with nightlies, latest (e335423) and a couple days old builds (b93a3a5).

Is someone else able to reproduce this behaviour?

I could of course write a simple report that this happens, but is there something more I can do as not being a professional programmer, to stimulate the solving of this problem?

Application: KiCad x86_64 on x86_64

Version: 6.99.0-1.20230101gite335423.fc37, release build

Libraries:
wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.2.0
FontConfig 2.14.1
libcurl/7.85.0 OpenSSL/3.0.5 zlib/1.2.12 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.1 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.51.0

Platform: , 64 bit, Little endian, wxGTK, KDE, wayland

Build Info:
Date: Jan 1 2023 18:18:24
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.5.0
Curl: 7.85.0
ngspice: 38
Compiler: GCC 12.2.1 with C++ ABI 1017

Build settings:
KICAD_SPICE=ON

It also happens in the stable version 6.0.10 in f37:

Application: KiCad Schematic Editor

Version: 6.0.10-1.fc37, release build

Libraries:
wxWidgets 3.2.1
libcurl/7.85.0 OpenSSL/3.0.5 zlib/1.2.12 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.1 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.51.0

Platform: Linux 6.0.15-300.fc37.x86_64 x86_64, 64 bit, Little endian, wxGTK, KDE, wayland

Build Info:
Date: Dec 18 2022 00:00:00
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.5.0
Curl: 7.85.0
ngspice: 38
Compiler: GCC 12.2.1 with C++ ABI 1017

Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

And it happens in the flatpak stable 6.0.10 I have installed too:

Application: KiCad

Version: 6.0.10, release build

Libraries:
wxWidgets 3.2.1
libcurl/7.86.0-DEV OpenSSL/3.0.7 zlib/1.2.12 nghttp2/1.51.0

Platform: Linux 6.0.15-300.fc37.x86_64 x86_64, 64 bit, Little endian, wxGTK, KDE, wayland

Build Info:
Date: Dec 26 2022 20:51:08
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.81.0
OCC: 7.6.3
Curl: 7.86.0-DEV
ngspice: 38
Compiler: GCC 12.1.0 with C++ ABI 1017

Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

I get a crash when going from “default” (which is English) to English, don’t need to go to another language.

Are you able to report a bug? Are you registered with Gitlab?

Yes, I can report a bug.
What OS do you have?

Sorry, should have posted.

Linux Mint Cinnamon 20.3.
This is a Jan 1 2023 nightly.

Application: KiCad x86_64 on x86_64

Version: 6.99.0-unknown-16fd586c41~164~ubuntu20.04.1, release build

Libraries:
wxWidgets 3.2.1
FreeType 2.10.1
HarfBuzz 2.6.4
FontConfig 2.13.1
libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux Mint 20.3, 64 bit, Little endian, wxGTK, cinnamon, x11

Build Info:
Date: Jan 1 2023 20:32:51
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.71.0
OCC: 7.5.2
Curl: 7.68.0
ngspice: 38
Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
KICAD_USE_EGL=ON
KICAD_SPICE=ON

1 Like

I can also easily reproduce this, both in V6.10 and V6.99

paul@cezanne:~$ kicad
Segmentation fault (core dumped)
paul@cezanne:~$ kicad-nightly
Segmentation fault (core dumped)
Application: KiCad x86_64 on x86_64

Version: 6.99.0-unknown-e9ed56e9a4~164~ubuntu20.04.1, release build

Libraries:
	wxWidgets 3.2.1
	FreeType 2.10.1
	HarfBuzz 2.6.4
	FontConfig 2.13.1
	libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Platform: Linux Mint 20.3, 64 bit, Little endian, wxGTK, xfce, x11

Build Info:
	Date: Dec 30 2022 20:32:45
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.71.0
	OCC: 7.5.2
	Curl: 7.68.0
	ngspice: 38
	Compiler: GCC 9.4.0 with C++ ABI 1013

Build settings:
	KICAD_USE_EGL=ON
	KICAD_SPICE=ON
1 Like

Now reported as Issue #13349:

Please try to reproduce on further systems, especially other OS:es than fedora and Linux Mint 20.3, and report in this thread, which I have linked in the bug report.
Or you can report straight into Gitlab if you have an account.

1 Like

I can confirm with Kicad 6.10 and 6.99 with Ubuntu 22.04.

Application: KiCad x86_64 on x86_64

Version: 6.99.0-unknown-16fd586c41~164~ubuntu22.04.1, release build

Libraries:
	wxWidgets 3.2.1
	FreeType 2.11.1
	HarfBuzz 2.7.4
	FontConfig 2.13.1
	libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.13

Platform: Ubuntu 22.04.1 LTS, 64 bit, Little endian, wxGTK, mate, x11

Build Info:
	Date: Jan  1 2023 20:32:44
	wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.2
	Curl: 7.81.0
	ngspice: 38
	Compiler: GCC 11.3.0 with C++ ABI 1016

Build settings:
	KICAD_USE_EGL=ON
	KICAD_SPICE=ON

1 Like

There is now a commit 40e41d01 from JP Charras that fixes this (and it seems a second one from Jonathan Haas, 49b35a2c…?).

In the meantime I also confirmed that the same crash happens in Windows 10 with todays nightly build.

I will test again when the next build for fedora becomes available; if you want you can do the same on your OS and report here to confirm it was successful.
In the meantime, thanks to all for the contributions so far!

Update: There is a fix for 6.0 too, 316087c4 by JP Charras.
According to comment on gitlab by Wayne Stambaugh, there might eventually be a 6.0.11 where this fix is included.

Update2: The latest nightly build f4a090 for f36 and f37, which includes the fix, does indeed fix the crash issue.
The change of language on the fly still doesn’t work in the simulator window though; it has to be closed and reopened for the new language to take effect. This has the issue #13357 and will likely not get fixed in 6.99 / 7.0 but in 7.99 once it is started, as it depends on a rewrite of the Simulator UI framework code.

That was just a test in my private fork, you can ignore it. It was basically the same patch that made it into the nightly anyway.

Yes, I noticed that the strategy with the if-statement was the same in both, but one used m_toolManager and the other GetToolManager().
Just out of curiosity, as I don’t know the code well enough: How do these two relate to each other, and what is the significance of choosing one over the other?

I don’t think there is a significant difference, but using the method instead is a little bit cleaner as you can for example rename or move the field without affecting other code too much.

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