How to resolve "segmentation fault(core dumped pro...
# analog-design
a
How to resolve "segmentation fault(core dumped problem)" ? as I got it as a result of my ngspice simulation.
p
This is a bug. It means the simulator accessed memory that it should not. There is no simple way to resolve it. You could try upgrading ngspice to the development version to see if it has been fixed, or report a bug.
y
Did you use the '.ic' command?
s
@Ashok Kumar try to build the smallest circuit that reproduce the segfault, then report to ngspice on sourceforge, the developers are very responsive.
a
@yrrapt yes I have used .ic command.
@Stefan Schippers I'll do that, thank you.
@yrrapt i have removed the . ic command then it worked. but i need this .ic command for setting up an initial condition so is there any alternative.
s
@Ashok Kumar try to set the .IC at the end after the netlist
before the .end of course
a
ok i'll do that. thank you
@Stefan Schippers no that didn't worked.
s
also verify if all the nodes you set in .ic do exist
do no set .ic on nodes trat are driven by voltage sources
a
ok
i have verified this and my node is not connected directly to a source and it is existing.
y
@Ashok Kumar I think there is a bug with the IC command. A couple of people of have come across it here. Even if the command is used incorrectly the program shouldn't segfault so somethings wrong. I would recommend reporting the bug with a short example netlist to the developers and see if they can have a look
a
@yrrapt So,I need to check whether this segfault is there or not , using a small netlist with .ic and if it is there, I need to report a bug right.
y
Yeah, it's really helpful for the developers if you can make an example that's as small as possible that shows the unexpected behaviour. That way they can check it out quickly - and you're more likely to get the bug fixed. I think the ngspice folks hang out on their source forge mailing list but I haven't used it myself
a
Ok I'll do that.
@yrrapt I just simulated the same with ngspice-32 on my windows OS and it worked.
Whereas in Ubuntu ngspice-27 it's showing this segmentation fault
r
Yeah, that's how this kind of thing behaves If you want to help find the bug, take a copy of your whole design, and start deleting chunks out of it. If it makes the error go away, go back and delete something else Repeat until you can't delete anything, then send that to the developers
s
you can build ngspice-32 on ubuntu, this is probably the first thing the developers will tell you. Installing ngspice from source files and compiling to get the executable is not difficult.
a
Yeah I'll do that