Interpreter stack type error

Anything that doesn't fit elsewhere.
Post Reply
shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Interpreter stack type error

Post 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 ?
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Interpreter stack type error

Post by ted »

Where is nc declared?
shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Re: Interpreter stack type error

Post 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.
ted
Site Admin
Posts: 5795
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Interpreter stack type error

Post 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!
Post Reply