Skip to content

Crashing simulation (ngspice) should not crash kicad / eeschema

Description

Historically, there have been multiple cases where unhandled spice netlist elements can cause crashes in ngspice, see #7180 (closed) and it's duplicate tree for instance.

So far, this has been "handled" by fixing ngspice, and that does work well! However, any new unhandled crash in ngspice still results in the entire eeschema process getting killed, with the resultant loss of work behaviour.

Ideally, we should protect ourselves from this external behaviour. How that should be done is of course potentially rather far-reaching :) This was suggested in #7180 (comment 496217513) but there's no issue that currently tracks this work, and craftyjon on discord suggested I should make the tracking issue for this.

KiCad Version

Application: KiCad Schematic Editor

Version: 6.0.0-rc1-1.20211121git4e0ad07.fc33, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.71.1 OpenSSL/1.1.1l-fips zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh/0.9.6/openssl/zlib nghttp2/1.43.0

Platform: Linux 5.14.16-101.fc33.x86_64 x86_64, 64 bit, Little endian, wxGTK, gnome-xorg, x11

Build Info:
	Date: Nov 21 2021 18:15:08
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.73.0
	OCC: 7.5.0
	Curl: 7.71.1
	ngspice: 33 (yeah, 33 crashes a lot)
	Compiler: GCC 10.3.1 with C++ ABI 1014

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON
Edited by Jon Evans