"bad stack access"

Anything that doesn't fit elsewhere.
Post Reply
udi
Posts: 13
Joined: Wed Aug 10, 2005 3:25 am
Location: Hebrew University, School of Medicine

"bad stack access"

Post by udi »

hi all,

I'm using the following code:

objref vvec, tvec ,vx, i1, i2
vvec = new Vector()
tvec = new Vector()

tvec.record(&t)
soma vvec.record(&v(0.5),tvec)

i1 = tvec.indvwhere(">=", t1) //t1, t2 are defined elsewhere
i2 = tvec.indvwhere("<=", t2)

vx = vvec.c(i1+1, i2)

When I run the simulation the following errors appears:

bad stack access: expecting (double); really (Unknown)
nrniv: interpreter stack type error

What is the problem ?

Thanks in advance,

--Udi.
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: "bad stack access"

Post by ted »

Rather than give you a fish, here's how to fish.

If you can't just look at the code and quickly see what's wrong, try one of these
strategies:
1. Insert print statements and see if the error message appears before or after
the message is printed. This only works for run-time errors; it will not work for
syntax errors, which crop up when the code is parsed.
2. Comment out blocks of code until the error message disappears. Then uncomment
code in small increments until you find out what triggers the error message.

So give one or both of these strategies a try and see if you can discover (or at least
localize) the cause of the problem. Once you know where it is, the cure may jump out
at you.
Post Reply