← Back to team overview

kicad-developers team mailing list archive

critical bug in Spice simulator - feedback from OSX devs needed

 

Hi,

I've been trying to fix [1] without success: ngspice will not load
another circuit if the current one contains fatal errors. Under some
circumstances, this segfaults KiCad.

The only solution I see is to bring back dynamic
(dlopen()/wxDynamicLibrary) loading of ngspice DLL every time the
simulator is launched, since unloading and reloading again resets
ngspice's internal state and releases all allocated resources. The early
versions of the simulator had worked like this but later it was changed
to traditional linking reportedly due to some issues on OSX with dynamic
library loading. I can't find any trace of information about these
DLL-related issues - so I'm calling our Mac devs here to reply if
anybody remembers why this change was done.

If no one gives a solid reason to stay with a hard-linked ngspice DLL,
I'll revert the ngspice plugin to use wxDynamicLibrary.

Tom

[1] https://bugs.launchpad.net/kicad/+bug/1753092


Follow ups