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.
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
.op
.control
version
.endc
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
Eeschma->File->Export->Netlist->Spice->Export Netlist.
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.
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.
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.
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
Description :
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.
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.
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.
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.
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.