program crashes when trying to simulate subcircuit and provides no errors

Bug #1835547 reported by Juan José on 2019-07-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
jean-pierre charras

Bug Description

I posted the issue in detail here:

https://forum.kicad.info/t/program-crashes-when-simulating-subcircuit/17914

The program crashes and gives no error when trying to simulate the following subcircuit:

https://www.infineon.com/cms/en/product/power/mosfet/12v-800v-small-signal-mosfet/bsd214sn/#!simulation

Revision history for this message
Seth Hillbrand (sethh) wrote :

Please attach the relevant project that shows this behavior

Changed in kicad:
status: New → Incomplete
Revision history for this message
Juan José (blascoburguillos) wrote :

Project that shows the described behavior

Revision history for this message
Juan José (blascoburguillos) wrote :

Project that shows the described behavior

Revision history for this message
Juan José (blascoburguillos) wrote :

kicad version: 5.1.2 release build
Platform: Linux 5.1.14-arch1-1-ARCH x86_64 64 bit

Revision history for this message
Seth Hillbrand (sethh) wrote :

I get an error "Too many parameters" but no crash.

I am using ngspice 30.

Can one of our arch-based devs recreate this?

Application: Eeschema
Version: (5.1.0-1204-gb74bccbb1-dirty), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-5-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: GCC 8.3.0 with C++ ABI 1013

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Holger Vogt (h+vogt) wrote :

Just another vote:

Unfortunately the project file is somewhat inconsistent: Openeing the project mosfet.sch from posting #3 generates a warning message "It appears that last time you were editing the file "mosfet.sch" it was not saved properly. I aknowledge this message with "No". Then I get a circuit calling the Infineon MOSFET with all legs shorted to GND.

I have added a "simulation command ".tran 1 2" in a text box (we definitely would need .op here!).

Running the simulation: No crash, but a ngspice error message:

Circuit: KiCad schematic
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Error: no data saved for Transient analysis; analysis not run
doAnalyses: not found
run simulation(s) aborted

Printing the ngspice netlist reveals the issue:

.title KiCad schematic
.include "D:\Spice_general\kicad\mosfet_orig\infineon\OptiMOS2_20V.lib"
XQ? 0 0 0 BSC019N02KS_L1
.save V(0)
.save V(GND)
.tran 1 2
.end

Eeschema adds
.save v(0)
.save v(GND)

This is of no use because GND is (internally, within ngspice) translated to 0. 0 is our reference. No need to save it. It is ignored.

.save is exclusive: If you issue a .save command, only the vector named in the command will be saved. If you issue multiple .save commands, all vectors following the commands are assembled and saved, but no others. So here we save our reference only that is simply ignored by ngspice. No other vectors are to be saved, so no simulation is run.

Please do not .save 0 or GND !

A strange thing is that we have now three different OSs, three different reactions of eeschem-ngspice. Maybe this occurs due to different approaches how to finally start the simulation.

Application: eeschema
Version: (5.1.2)-2, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Juan José (blascoburguillos) wrote :

 > Please do not .save 0 or GND !

But I didn't. This was auto-generated, right? Do I need to do something?

tags: added: eeschema ngspice
Revision history for this message
Seth Hillbrand (sethh) wrote :

@Juan-

Can you please try a recent nightly build? I believe that this issue may have been resolved by JP in d92396341

Revision history for this message
Juan José (blascoburguillos) wrote :

@sethh
Thanks for the update. Unfortunately I won't be able to test it during the upcoming weeks. I'll update it here as soon as I'm able to test if that fixes the issue.

Revision history for this message
Juan José (blascoburguillos) wrote :

@sethh

Do you happen to know if this has been included into the latest release? I'm installing kicad via Arch linux

Revision history for this message
Ian McInerney (imcinerney) wrote :

@Juan, it appears this fix didn't make it into the 5.1.3 release and is currently only in the nightlies for 6.0 development.

@Seth, this should probably be cherry-picked into the 5.1 branch if it fixes the problem in master.

Revision history for this message
Seth Hillbrand (sethh) wrote :

Cherry-picked back to 5.1

Fixed in revision d34b664933daadce902cd72ab9095a1f6248caa9
https://git.launchpad.net/kicad/patch/?id=d34b664933daadce902cd72ab9095a1f6248caa9

Changed in kicad:
milestone: none → 5.1.4
status: Incomplete → Fix Committed
assignee: nobody → jean-pierre charras (jp-charras)
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers