mcdougallab / matlabneuroninterface

Interface for connecting NEURON and MATLAB
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

A Section needs to be added to examples seemingly not needing a Section to prevent crashing #70

Open edovanveen opened 1 year ago

edovanveen commented 1 year ago

If we remove soma = n.Section("soma"); from example_savestate it runs fine by itself. However, when combined with other example runs (for example by running all tests), not creating a Section here causes a crash:

Stack Trace (from fault):
[  0] 0x00007ff82bbb5a6c                            C:\nrn\bin\libnrniv.dll+01661548 Z8spFactorPc+00000108
[  1] 0x00007ff82bb3589a                            C:\nrn\bin\libnrniv.dll+01136794 Z9nrn_solveP9NrnThread+00000074
[  2] 0x00007ff82bb2e19d                            C:\nrn\bin\libnrniv.dll+01106333 Z23nrn_fixed_step_lastpartP9NrnThread+00000221
[  3] 0x00007ff82bb2c814                            C:\nrn\bin\libnrniv.dll+01099796 Z14nrn_fixed_stepv+00000228
[  4] 0x00007ff82bb2cb26                            C:\nrn\bin\libnrniv.dll+01100582 Z8fadvancev+00000070
[  5] 0x00007ff82bb441f7                            C:\nrn\bin\libnrniv.dll+01196535 Z8hoc_callv+00000199
[  6] 0x00007ff82bb43fa3                            C:\nrn\bin\libnrniv.dll+01195939 Z11hoc_executeP4Inst+00000067
[  7] 0x00007ff82bb4ddbc                            C:\nrn\bin\libnrniv.dll+01236412 Z13hoc_call_funcP6Symboli+00000060
ramcdougal commented 1 year ago

I wonder if #47's changes to memory management fixed this.

edovanveen commented 1 year ago

Unfortunately, no.

ramcdougal commented 1 year ago

Do the previous tests involve a linear mechanism by any chance? Because we're still trying to figure out why this would be called at all.

ramcdougal commented 1 year ago

I wonder if we can fix this by explicitly bumping up the structure_change_count as part of the reset.

edovanveen commented 10 months ago

This is still not fixed, even after fixing #73