SPICE netlist Run Simulator doesn't allow spaces

Bug #1591777 reported by Julien Faucher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Low
Jeff Young

Bug Description

Hello all !

I'm using KiCAD on Windows (10) and i've the following problem :

The SPICE netlist generator doesn't seems to allow any space in the file path to the simulator.
For example, i want to use LTSpice 4 which is in the "Program File(x86)" folder and i got the message

"Unable to find the command "C:/Program "."

Even if i use some comas like in Windows CMD prompt...
Plus, i think it would be nice to have a kind of string which will be replaced by the output netlist (like "%OUTPUT%" or anything)

Best regards,
Julien

Application: kicad
Version: 4.0.1-stable release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

description: updated
Revision history for this message
PCB Wiz (1-pcb-wiz) wrote :

hmm.. seems to work ok here - default install paths, v4.0.2

C:\Program Files\KiCad\bin\kicad.exe

& Win8.1 (64b), can export a Spice netlist to a dir with spaces

* C:\Path spaces\KiCAD.cir

* EESchema Netlist Version 1.1 (Spice format) creation date:
(etc)

.end

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Doesn't work here, and looking at the code I don't know how it could possibly have worked for 1-pcb-wiz.

The command is interpreted by the shell, so it'll get split:

"C:\Program Files\blah" becomes ["C:\Program", "Files\blah"]

The first problem is that you need to quote it, but you *can't*. If you type a quoted string, the wxFileExists test on gestfich.cpp:213 fails.

Something needs to be done about that test, IMO, as if we're going to use the shell to interpret the command, it's perfectly valid to issue commands that *don't* exist as files.

The second problem then is that dialog_netlist.cpp:RunSimulator performs an inappropriate "parsing" of the input string by itself and tries to split it.

I'll probably fix this myself, but I need time to ponder the right way to do it.

Changed in kicad:
assignee: nobody → Chris Pavlina (pavlina-chris)
status: New → Confirmed
importance: Undecided → Low
tags: added: eeschema
Revision history for this message
Julien Faucher (suzizecat) wrote :

I guess 1-pcb-wiz talks about the netlist generation, which works perfectly fine, but the "Start simulator" don't...

It may be possible to use the "START" windows command to start the default program to handle the netlist... Nice feature to add, i guess ;)

Revision history for this message
PCB Wiz (1-pcb-wiz) wrote :

 "I guess 1-pcb-wiz talks about the netlist generation, which works perfectly fine, but the "Start simulator" don't..."
 Yes, I miss-read the issue as being in the Netlist Generator, not the Spice-launcher...

tags: added: ngspice
Revision history for this message
Jeff Young (jeyjey) wrote :

While we still want to support exporting a spice netlist in case someone wants to use an external tool, we don't need to be responsible for launching it. If you want ease-of-use, use the integrated simulator.

Jeff Young (jeyjey)
Changed in kicad:
milestone: none → 6.0.0-rc1
assignee: Chris Pavlina (pavlina-chris) → Jeff Young (jeyjey)
status: Confirmed → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.