Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0 size buffers in processBuffer() when capturing 'Single' or 'Multiple' #20

Open
daykin opened this issue Mar 21, 2023 · 4 comments
Open

Comments

@daykin
Copy link
Contributor

daykin commented Mar 21, 2023

Discovered by testing fix for #18 (not related at all, to be clear):

Environment:
Arch: linux-x86_64-debug
EPICS Base 7.0.7
ADGenICam R1-8, master commit 639aa4f
ADAravis R2-3, master commit ebca7d0
Camera: The Imaging Source Europe DMK 33GX174, via gigabit ethernet
Additional Plugins: Only NDStdArrays Image plugin for viewing output array in CS-Studio

Steps to reproduce:

  1. Generate xml and database from arv-tool-0.8 genicam per the documentation
  2. Point build system to appropriate EPICS_BASE, ADCORE, GENICAM modules in configure/RELEASE
  3. Add in the ADBase and NDFile settings .req files to aravisApp/Db/aravisCamera_settings.req
  4. Build everything
  5. Start up an IOC, invoking aravisConfig(portName, aravisCameraName)
  6. load in aravisCamera.template (and, by extension, ADGenICam.template and ADBase.template)
  7. load in camera-specific records generated in step 1
  8. Change $(P)$(R):DataType to UInt16
  9. RegionSize and PixelFormat remain Mono16, no conversion or shift
  10. GainAuto and ExposureAuto set to 'Continuous'
  11. AcquirePeriod set to 1 second
  12. NumImages set to 100
  13. ImageMode set to 'Multiple'
  14. Acquire

Result:
ArraySize_RBV Remains zero. In IOC, the following output occurs:
2023/03/21 15:30:00.404 ADAravis:processBuffer: w: 1920, h: 1200, size: 0, expected_size: 4608000

If ImageMode is set to 'Continuous' the error goes away.

@daykin
Copy link
Contributor Author

daykin commented Mar 21, 2023

Additional info:
Upon starting acquisition in 'single' or 'multiple', the following error occurs:
** (process:2297535): CRITICAL **: 16:02:20.339: arv_gc_integer_get_value: assertion 'error == NULL || *error == NULL' failed

@MarkRivers
Copy link
Member

That sounds to me like your camera may not support "single" or "multiple" modes. Open the camera-specific screens and look for the GenICam feature called AcquisitionMode. What choices do you see there?

@daykin
Copy link
Contributor Author

daykin commented Mar 21, 2023

Ha, I was literally in the process of typing that: This camera does not support any mode besides AcquisitionMode=Continuous. would it be worthwhile to try to add a better check for that?

@daykin daykin closed this as completed Mar 21, 2023
@daykin daykin reopened this Mar 21, 2023
@MarkRivers
Copy link
Member

Returning an error if one attempts to set a non-supported AcquisitionMode and leaving the mode unchanged would be a good idea. There is already some logic that converts Multiple to Continuous for cameras that don't support Multiple:

https://github.com/areaDetector/ADGenICam/blob/639aa4f51fe233e311f22c8f61ed6138b0d5a442/GenICamApp/src/GenICamFeature.cpp#L546

That section of code could be enhanced to do something similar if Single or Multiple or both are unsupported.

I have no way to test that, but I am happy to accept a PR if you want to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants