open-ephys / bonsai-onix1

Bonsai library for the Open Ephys Onix Acquisition System
https://open-ephys.github.io/bonsai-onix1-docs/
MIT License
4 stars 3 forks source link

High frequency inputs to NeuropixelsV2eBno055Data node reveals multithreading issue during workflow restart #192

Open jvoigts opened 2 months ago

jvoigts commented 2 months ago

This can occur either when using the restart button in bonsai or stopping and starting rapidly (within about a second maybe). I'm seeing this with two V2e neuropixels, nothing else in the workflow. I have not properly tried different workflows etc. yet, so I have no info on whether this is specific to this configuration.

jonnew commented 2 months ago

If a NeuropixelsV2eBno055Data is feed with a high-frequency sequence, the user will very likely be presented with an "Attempt to trigger and already triggered operation" exception. Two issues:

Side note: I would attach a workflow but I dont know how because of githubs file type filters.

glopesdev commented 2 months ago

@jonnew I think the issue that @jvoigts raised is a separate one from this new polling issue that you raised, and it is a known issue with asynchronous dispose (i.e. the previous context may be disposing while a new one is being created) that I was still considering how to solve.

I think the high frequency polling issue is different even though they output the same low-level oni exception, so I would open two separate issues until we conclude definitively that they are the same.

jonnew commented 2 months ago

I dont think so -- we worked together to figure out what would fix the original issue he raised and this was the cause

glopesdev commented 2 months ago

@jonnew ok, just to confirm since I am realizing your original comment did not fully clarify, when is the error exactly thrown? Is it still when the user starts and stops the workflow? Or an error during polling at runtime?

If the former then I agree it might be the same error.

jonnew commented 2 months ago

I should have made I clearer (it's the 2nd to last sentence of the second bullet) that this occurs during a workflow restart. Without a high frequency input to the NeuropixelsV2eBno055Data node the workflow can be restarted without issue.