areaDetector / ADGenICam

areaDetector base class for GenICam cameras.
https://areadetector.github.io/areaDetector/ADGenICam/ADGenICam.html
8 stars 17 forks source link

Don't call start_capture() if camera is already acquiring #31

Closed MarkRivers closed 1 year ago

MarkRivers commented 1 year ago

Currently ADGenICam::writeInt32 calls start_capture() even if the camera is already acquiring: https://github.com/areaDetector/ADGenICam/blob/9e257823606e5944c92886726de4b8d4401acedb/GenICamApp/src/ADGenICam.cpp#L97

This is causing memory leaks in ADAravis, and perhaps other drivers. There should be a check before calling start_capture() or stop_capture() to make sure the camera is in the correct state.

AbdallaDalleh commented 1 year ago

I added a PR for this issue: https://github.com/areaDetector/ADGenICam/pull/32

MarkRivers commented 1 year ago

Fixed via https://github.com/areaDetector/ADGenICam/commit/adae668603912b008447499309a3a7f48b3f8951 and https://github.com/areaDetector/ADAravis/commit/d9140060b8c42eaaabd2b45a5e6b4e0549044a8f.