Possible bug in Vector's record function
Posted: Wed Jul 02, 2008 2:49 pm
I found that if one uses the third form of Vector's record function (the one with the separate time vector) I get no recorded data for either vector.
Here's a sample code that reproduces the bug for me:
On my computer, it prints out 0's for both of the vectors' sizes. If I do it this way, however, everything works as expected:
I am using a slightly modified NEURON 6.1 on Windows, but my changes to it have not touched any of the low-level implementations so I do not think I broke it myself. I don't have access to a vanilla install of NEURON right now, but I shall test to see if this is reproducible there as well as soon as I am able.
Here's a sample code that reproduces the bug for me:
Code: Select all
load_file("stdrun.hoc")
create soma
insert pas
objref data_vec, time_vec
data_vec = new Vector()
time_vec = new Vector()
data_vec.record(&soma.v(0.5), time_vec)
run()
{
printf("Size of data vector: %d\n", data_vec.size())
printf("Size of time vector: %d\n", time_vec.size())
}
Code: Select all
load_file("stdrun.hoc")
create soma
insert pas
objref data_vec, time_vec
data_vec = new Vector()
time_vec = new Vector()
data_vec.record(&soma.v(0.5))
time_vec.record(&t)
run()
{
printf("Size of data vector: %d\n", data_vec.size())
printf("Size of time vector: %d\n", time_vec.size())
}