When an Eeschema component has been edited to contain a new SPICE model that is too large or has an error, KiCAD simply shuts down after an attempted simulation.
No errors, nothing.
Second, if a simulation runs into errors, the component editor no longer fits tha window and has to be resized, otherwise the bottom buttons are no longer visible/usable.
OS: Lubuntu 20.04 LTS
Insert your complete version info too, as found in KiCad → Help → About Kicad → Copy Version Info [Button] or the Version tab in the same place. (This is usually a standard request for any discussions of possible bugs.)
Also, does version 6.0.4 (or 6.0.2) behave the same?
To give a concise answer or to remove any bug, the information given above is by far not enough.
May I suggest that you supply the following information:
Complete version info (see post by hmk)
A short note where you have got (downloaded) your KiCad version.
Next we will need, because it is about simulation, the ngspice version used in your installation. This is however not available by just hitting a single button, but by doing the following:
Create a text field in an empty Eeschema screen with the following contents:
* ngspice version info
Run a simulation and post the result (text printed to the Spice Simulator Window) here.
Then it will be very helpful, if not necessary, that one may reproduce your result/bug/crash to investigate the problem.
To enable this action, you might either post your complete project here, including the offending commands, even if they are buggy in itself. Include all libs, models etc. needed to run the example.
It may be simpler to post the ngspice netlist here. The netlist may be obtained by
If you look at the netlist in a text editor, you may detect some .include statements, which are used to include model files etc. Add the netlist and the files to be included by the .include command in a zip file and post it here.
Only with this information given, you may expect a quick and concise answer to your bug report.
Here’s the KicAD version info:
Version: 6.0.3-a3aad9c10e~116~ubuntu20.04.1, release build
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 5.4.0-104-generic x86_64, 64 bit, Little endian, wxGTK, , x11
Date: Mar 16 2022 14:24:02
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Compiler: GCC 9.4.0 with C++ ABI 1013
The ngspice info from running a simulation as suggested does not give more info.
Just that it’s ngspice-31.
NB: I changed the title after realizing I have 6.0.3, sorry.
6.0.3 is broken, so make sure you get 6.0.4 instead and try again.
I don’t know for sure that this is related to that, but 6.0.3 is not for any use at all, and should ideally not be out there; developers pulled it in one day (approx) and replaced it with 6.0.4.
It wasn’t installed by me, but probably came in through a system update. I’ll do another update and see if I land at 6.0.4.
OK, did a system update and am now at 6.0.4
See if you can update ngspice. The most recent version is ngspice-36, and there was at least one easy-to-hit ngspice crash bug that was fixed in version 34. I think there have been some other ngspice crash bugs fixed too but I’m sure Holger can say for certain.
(31 is two or three years old at this point).
I wanted to do that, but it seems everything over 31 is Win/Mac only. I haven’t found any higher Linux versions.
I don’t think ngspice is the issue, though. By using other libraries I’m now able to run a simulation without errors (if not with the desired results, but that’s a different story).
My distro supplies ngspice 36, so it’s your distro:
$ zypper info libngspice0
Loading repository data...
Reading installed packages...
Information for package libngspice0:
Repository : Electronics
Name : libngspice0
Version : 36-lp153.18.1
Arch : x86_64
Vendor : obs://build.opensuse.org/electronics
Installed Size : 7.2 MiB
Installed : Yes
Status : up-to-date
Source package : ngspice-shared-36-lp153.18.1.src
Summary : Shared libraries for ngspice
Ngspice is a mixed-level/mixed-signal circuit simulator. Its code
is based on three open source software packages: Spice3f5, Cider1b1
and Xspice. This package contains the shared libraries.
Indeed the standard ngspice in Ubuntu 20.04 is version 31.
Jean-Samuel Reynaud used to create a ppa for ngspice for KiCad (PPA named ngspice for js-reynaud : Jean-Samuel Reynaud). Unfortunately some build about 2 years ago failed, and he did not pursue this project any further. I will ask him if he might revamp this ppa to offer ngspice-36.
Yes, my (linux) distro is on 36 as well.
I suggested updating ngspice because you said:
or has an error, KiCAD simply shuts down after an attempted simulation.
unfortunately the link between kicad and ngspice is such that ngspice crashing brings down kicad as well. This sounds like (I’m speculating) ngspice is choking on a model and bringing down kicad with it. Ngspice has gotten a lot more robust in the last few years.
But if there’s no way to update ngspice on your system it’s a moot point.
Very probable that ngspice crashes on a model, but that it crashes KiCAD as well is not nice. An error message would be nicer.
This is indeed true. And you may contribute to this development by posting a ngspice netlist here which provokes the crash.
What is a SPICE model that is too large or has an error?
With this information I will check if this crash bug has already been fixed in recent ngspice, or I will provide a fix with the next ngspice release.
I’m sorry, but I’m not able to reproduce every error: they keep changing!
I’ve now sat for hours trying to do an ngspice simulation, and I’ve never experienced anything so frustrating in my life. Every run reveals a different problem.
KiCAD is OK, although the “Update Libraries” issue should be highlighted. This is completely non-intuitive to a user.
But the big problem is ngspice, delivering ridiculous results (kA, kV, nA etc.)
LTSPICE is unfortunately off-limits to a Linux user.
This one crashed KiCAD, or rather ngspice, which then crashed KiCAD:
st_standard_snubberless_triacs.lib (33.2 KB)
For me it is frustrating to see you lamenting, but not doing what I have asked you for to cope with the problem.
I do not have a running netlist, and you do not provide one. Shall I sit down and devise a circuit, just to test your libraries? Shall I anticipate what you have done with your circuit to call the library? No and no.
Please submit your project or at least the ngspice netlist, as I have described and asked you before.
I have been searching a bit and have found a circuit with ST’s triacs running well in plain ngspice-36. See output attached. It does also run in ngspice-31.
Now it is up to you to deliver more data.
My apologies. I’m still a newb and have only worked with Eeschema until now. I’ll explore how to produce a netlist.
OK, here’s project and schematic file. These will kill KiCAD immediately when running a simulation.
Softstart.kicad_pro (5.6 KB)
Softstart.kicad_sch (37.9 KB)
Tried again, but with very little (read: no) success.
Ngspice is simply not mature.
I attach a schematic and a simulation result from the same schematic. Ngspice is able to generate 400 V from a 325 V source. I find that impressive. And even without inductors!
(in a previous Schematic version, even 500 V was there).
KiCAD 5 ran, and 6 run wonderfully, and I love them. Good job!
But ngspice is so unreliable and unpredictable that I wish that LTSPICE will someday be there for Linux users.