Page 1 of 1

Interpreter stack type error

Posted: Fri May 20, 2011 11:54 am
by shyam_u2
Hi,

I am currently in the process of tuning a LIF neuron according to the characteristics of a particular F-I curve. I use Netcon to record from soma. I am getting a strange bug which says the following.

bad stack access: expecting(double);really(unknown)
nrniv: interpreter stack type error
...... near line
nc = cell. connect2target(nil)

connect2target is defined inside the cell template. I create an object of the template in an separate hoc and call this connect2target(nil), where i get this error.

Code: Select all

load_file("nrngui.hoc")
load_file("BC1_template.hoc")
objref cell,BCsfile



cell = new BC1(1)
access cell.soma
objref stim[2], nce,nil


stim = new NetStim()
stim.start = 1
stim.number = 0
nce = new NetCon(stim, cell.ampa.object(0))
nce.delay = 0
nce.weight = .006


objref nil
nc = cell.connect2target(nil)

BC1 is the cell template which is COBA IF neuron. Can anyone provide me an insight regarding the cause of this error ?

Re: Interpreter stack type error

Posted: Fri May 20, 2011 2:03 pm
by ted
Where is nc declared?

Re: Interpreter stack type error

Posted: Sat May 21, 2011 11:21 am
by shyam_u2
Thanks Ted. It wasnt declared. Usually if a variable is undeclared it generates an error that says that the variable is not declared. I dont know why it gave me a strange error this time.

Re: Interpreter stack type error

Posted: Sat May 21, 2011 2:05 pm
by ted
My experience with error messages has been that indecipherable is the norm, and clarity is an exceptional event. You lead a charmed life!