Closed k1o0 closed 4 years ago
Adding to this mystery, it seems the problem only occurs when the stimulus depends on an input signal (e.g. inputs.wheel
) before events.expStart
updates. Observations:
events.expStart
and update as soon as we enter the main loop after run
is called.events.expStart
updates. That is, if the show property is false.events.expStart
takes a value.t
signal, which also updates before events.expStart
.events.expStart
at all for anything.The only visible difference between t
and e.g. inputs.wheel
is that one is an origin signal and the other is a subscriptable signal...
https://github.com/cortex-lab/signals/commit/276cd6f45a3ffa426f6a722b08fe86bd473aa30d provides a robust fix for this. In the future this should be fixed in mexnet here (c.f. old code).
When using a pre-delay it is possible for various signals to update before the expStart event is updated as parameter signals acquire their values at an undefined time. This doesn't cause errors unless a visual stimulus is presented, in which case MATLAB crashed. Example:
To do: find the cause of the crash and prevent it from happening, or at least throw an informative error.