sasfog / Open-PupilEXT

Open-PupilEXT Experimental Community Version
https://www.frontiersin.org/articles/10.3389/fnins.2021.676220/abstract
Other
0 stars 0 forks source link

Program crashes when the physical camera device cable is unplugged unexpectedly #84

Open kheki4 opened 1 year ago

kheki4 commented 1 year ago

The proper behaviour would be to:

See sample code on Basler website for detecting camera device removal: https://docs.baslerweb.com/pylonapi/cpp/sample_code#deviceremovalhandling

Bonus: display a message in the statusbar or in a window.

kheki4 commented 2 months ago

Dealt here: https://github.com/sasfog/Open-PupilEXT/pull/132

However, see notes. Only exception-level is handled properly now, event handler level catching of device removal seems not to work. (Grabbing itself does not trigger an exception for this, and the heartbeat-based checks do not produce events for some reason.) Important to note that webcam does not yet check for sudden device removal. To be done later.