A quick follow-up. I did finally update to 7.7, but I am still getting frequent seg faults. It now seg faults every time I run my full code (i.e. execfile("driver.py")) but if I run every line manually, it doesn't seg fault. The only warning I get is the following, whether it segfaults or not:
Code: Select all
NEURON: syntax error
near line 1
^
NEURON: syntax error
near line 1
{sw5=new PlotShape(0)}
^
NEURON: syntax error
near line 1
^
NEURON: syntax error
near line 1
{sw6=new PlotShape(0)}
^
h.cvode.atol(absTolerance)
h.cvode.re_init()
Segmentation fault: 11
When I run my code manually, I still get the above warning, just no seg fault, and the shape plots still show up and look as I would expect them to. So I narrowed it down to this bit of code by making a "neuron_gui" toggle. When I turn the gui off, there is no seg fault. So here is the segment of my gui code that yields this warning, and likely the seg fault:
Code: Select all
def create_gui_windows(nablock):
# no problems with shapeWindow, sw2, sw3, ... so I'm starting at sw4
h('{objref sw4}')
h('{sw4=new PlotShape(0)}')
sw4 = h.sw4
sw4.variable('dfof_max_gmax')
# sw4.variable('dfof_gmax')
sw4.view(703, 192, 35, 0, 250, 500, 1000, 250)
# sw4.view(690, 190, 35, 0, 250, 500, 1000, 250) #spineloc .3
sw4.exec_menu('Show Diam')
sw4.exec_menu('Shape Plot')
sw4.scale(0, 200) #600)
sw4.show(0)
h.fast_flush_list.append(sw4)
h('{objref sw5')
h('{sw5=new PlotShape(0)}')
# sw5 = h.sw5
sw5 = h.sw4
# sw5.variable('dfof_max_gmax')
sw5.variable('dfof_max_gmax')
sw5.view(630, 195, 150, 0, 700, 0, 700, 500)
sw5.exec_menu('Show Diam')
sw5.exec_menu('Shape Plot')
sw5.scale(0, 200) #600)
sw5.show(0)
h.fast_flush_list.append(sw5)
h('{objref sw6')
h('{sw6=new PlotShape(0)}')
# sw6 = h.sw6
sw6 = h.sw3
sw6.variable('cam_camax')
sw6.view(630, 195, 150, 0, 700, 0, 700, 500)
sw6.exec_menu('Show Diam')
sw6.exec_menu('Shape Plot')
sw6.scale(5e-5, .0005)
sw6.show(0)
h.fast_flush_list.append(sw6)
#.....same setup for sw7, sw8, sw9
return [shapeWindow, sw2, sw3, sw4, sw5, sw6, sw7, sw8, sw9]
I start at sw4 because I have no issues with sw1-sw4. When I run this, I get the issues shown above. However, if I run this code but with "sw5 = h.sw5" and "sw6 = h.sw6" as I would like to, this function doesn't run:
Code: Select all
In [10]: h('{objref sw4}')
Out[10]: 1
In [11]: h('{objref sw5')
NEURON: syntax error
near line 1
^
Out[11]: 0
(note that the quantities being plotted are the same in 4 & 5 and 3 & 6, which is why I "cheated" and paired them like this when the original commented out lines didn't work). Any ideas on why I can't create sw5 etc? Can I not have two shapeWindows of the same quantity? (I have several zoomed in versions to show spines and the broader neuron).