Spice simulator cause Kicad to crash if netlist includes a spice library with syntax errors
Description
Loading a spice model which has syntax errors cause Kicad to crash when closing simulator or 'Edit simulation commmand' dialog is used.
Steps to reproduce
- Assign a spice model with a syntax error.
- Run simulator from the menu
- Message prompt will show parsing error messages which ends with this line "Error: ngspice.dll cannot recover and awaits to be detached"
- Closing simulator window will cause segmentation fault.
Attached the related files to reproduce it.
KiCad Version
Application: KiCad x86_64 on x86_64
Version: 7.99.0-807-gb74d964bff, release build
Libraries:
wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.2.0
FontConfig 2.14.1
Platform: Linux 6.2.10-200.fc37.x86_64 x86_64, 64 bit, Little endian, wxGTK, xfce, x11
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.78.0
OCC: 7.6.3
Curl: 7.85.0
ngspice: 40
Compiler: GCC 12.2.1 with C++ ABI 1017
Build settings:
Edited by Okan Demir