Closed SimonNCT closed 1 year ago
This is a great bug report! Thank you very much for all the details and especially the already found workaround! I will forward all this information internally to see why this particular camera feature is causing issues.
In the meantime could you please check which firmware version your camera reports. Using the Vimba X Viewer, open the camera and navigate in the All
feature tab to Camera -> DeviceControl -> Device Firmware Version
. This might help us narrow down the issue.
You could also try upgrading your firmware version by downloading the newest released version from our website here: https://www.alliedvision.com/en/support/firmware-downloads/ You can then use the Vimba X Firmware Updater to install the downloaded firmware to the camera.
It appears that this issue should be fixed with a firmware update. As far as I can tell the issue is only present in firmware version 10. Our latest released firmware version as of writing this is version 12. Could you let us know if a firmware update fixes the issue for you?
Thanks for the quick reply!
Previous device firmware version: 10.0.6C9062B1 New device firmware version: 12.0.00611A22 (note: had to try 4-5 times before the upgrade succeeded)
It works now!
If the update fails a lot of times, it might be necessary to check your hardware connection (cable, switch, port etc.), since the updates only fail when the connection has been disrupted or the camera looses power during the update. A good way to check the stability of the connection is to stream images in Vimba Viewer with a DeviceLinkThroughputLimit of 450 000 000 and see if the frame rate is stable (i.e. no lost or incomplete frames). If not, lower it until the stream is stable. If you need to reduce the bandwidth to 200 000 000 or below, switch out hardware components one by one.
I thought I had the camera connected directly to my laptop via USB3 - cannot guarantee this though.
I set the DeviceLinkThroughputLimit
to 450'000'000
and the received frame rate was pretty much identical to the AcquisitionFrameRate
that was set to 69.7796
(+- 0.2 I guess). I could not find a lost frame counter though.
I updated the camera again with the newer firmware but was not able to reproduce this error.
Anyway, the main issue has been resolved/circumvented, thanks again!
The camera can do 130FPS, at 200MByte/s, after that it is limited by the sensor read out, which still wouldn't completely stress the connection, just a bit more. USB3 is the base requirement, but the bandwidth can still be limited due to what the USB controller can process and the quality/age of the cable and the connectors. One reason for a failed firmware update on a customer site was for example a USB connector that had been damaged by dirt getting into the connector and worsening one of the contacts. The failed firmware updates are just an indication of the transmission being suboptimal, so nothing critical, but just to keep in mind if you need to update it again. Worst case scenario, a failed firmware update can brick the camera, especially when the failure happens in the last 15% of the data ransfer or the device restart during the end of the update. So I would recommend not trying to reproduce the failed firmware updates.
Thanks for the additional information, will keep that in mind!
Summary
The vmbpy package (Python Vimba X SDK) has an issue when entering a context with a Camera object. More specifically, a certain feature cannot be queried.
Configuration
Steps to reproduce
First confirm that you can actually see a proper image feed when using Vimba X Viewer. Then, copy their example file from here and execute it: https://github.com/alliedvision/VmbPy/blob/main/Examples/asynchronous_grab.py
It should fail at line 122: https://github.com/alliedvision/VmbPy/blob/main/Examples/asynchronous_grab.py#L122
It actually fails when entering the context manager. Change lines to:
What is the current bug behavior?
An exception occurs when entering the context manager. The exception should look similar to this one:
(line numbers may vary slightly)
More specifically, in
vmbpy/feature.py
at line 594 (call_vmb_c('VmbFeatureEnumRangeQuery', handle, feat_name, None, 0, byref(enums_count))
), you get an error when thefeat_name=SequencerTriggerSource
.What is the expected correct behavior?
The context manager should be entered normally and acquiring frames should be possible.
Possible fixes
Not a fix but this issue can be mitigated by replacing line 594 of the above mentioned
vmbpy/feature.py
by:In other words, do not call vmb_c if this specific feature name is queried. All other feature names succeed. Some have longer names (the failing one has 22 bytes, there exist some with 26 bytes though).
Can you please take a look into this? In Vimba X Viewer the mentioned property is displayed and is set to "Off".