Broken input validation in Spice Model Editor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Released
|
Low
|
Unassigned |
Bug Description
Steps to reproduce:
1. Open eeschema
2. Create pspice:VSOURCE
3. Edit properties
4. Edit spice model
5. In 'Transient analysis', 'Pulse' (or any other register card), leave the first field empty, but put text in the second field.
6. Click OK
Expected behaviour:
Error message: "You need to specify at least the first 2 parameters for the transient source"
Buggy behaviour:
Dialog closes without complaints, but does not save the settings.
Cause:
In eeschema/
if( paramCounter == 0 )
{
// It is fine, no parameters were entered
useTrans = false;
break;
}
This makes the false assumption that, if the first field is empty, all the other fields must be empty, too. (Probably assumes the user knows what they are doing. But I don't!)
Application: kicad
Version: (2018-01-15 revision 94c8a947a)-makepkg, release build
Libraries:
wxWidgets 3.0.3
libcurl/7.57.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.27.0
Platform: Linux 4.14.3-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.3 (wchar_t,wx containers,
Boost: 1.65.1
Curl: 7.57.0
Compiler: GCC 7.2.0 with C++ ABI 1011
Build settings:
USE_
USE_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
KICAD_SPICE=ON
tags: | added: ngspice |
tags: | added: eeschema |
Changed in kicad: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in kicad: | |
status: | Fix Committed → Fix Released |
I think the problem is, that it is perfectly valid to not fill in any values for transient analysis on a source, if it is being used as a DC source.