esrf-bliss / Lima-camera-basler

Lima basler plugin
lima.blissgarden.org
GNU General Public License v3.0
4 stars 26 forks source link

Exception Invalid FrameDim - Basler ACE USB3 #39

Open dschick opened 6 days ago

dschick commented 6 days ago

Hi all,

I am trying to run a basler ace acA800-510um via conda on Win10. The camera is working via the pylonviewer and and also the Lima Python interface seem so be functional.

However, when starting the LimaCCDs TangoDS I receive the following error messages:

(basler) PS C:\Users\loc_schick> LimaCCDs.exe localhost
basler camera_id: sn://24933363
[2024/10/11 15:48:50.487870] 16431ce71f0     *Camera*lima::Basler::Camera::setInterPacketDelay (\BaslerCamera.cpp:1430)-Warning: Parameter not found in CIntegerParameter::SetValue. (No node attached.)
[2024/10/11 15:48:50.488024] 16431ce71f0     *Camera*lima::Basler::Interface::Interface (\BaslerInterface.cpp:41)-Always: force_video_mode=0
[2024/10/11 15:48:50.503228] 16431ce71f0     *Application*apply_buffer_param_properties-Always: BufferAllocParameters [params]: <durationPolicy=EPHEMERAL, sizePolicy=AUTOMATIC, initMem=1, reqMemSizePercent=70>
[2024/10/11 15:48:50.503228] 16431ce71f0     *Application*apply_buffer_param_properties-Always: AccBufferParameters [params]: <durationPolicy=EPHEMERAL, sizePolicy=AUTOMATIC, initMem=0, reqMemSizePercent=0>
rcent=0>
[2024/10/11 15:48:50.622206] 16431ce71f0 *Application*apply_config-Always: Applied config : C:\Users\loc_schick\lima_localhost.cfg : default
[2024/10/11 15:49:03.159855] 16431ce81c0 *Application*read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2024/10/11 15:49:03.159855] 16431ce81c0 *Application*read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2024/10/11 15:49:03.161034] 16431ce81c0 *Application*read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2024/10/11 15:49:03.283306] 16431ce81c0             *Common*lima::GetDefMaxNbBuffers (common\src\MemUtils.cpp:114)-Error: Invalid FrameDim: <0x1x1-Bpp8>
********* Exception(InvalidValue): Invalid FrameDim
[2024/10/11 15:49:03.285569] 16431ce81c0             *Common*lima::GetDefMaxNbBuffers (common\src\MemUtils.cpp:114)-Error: Invalid FrameDim: <0x1x1-Bpp8>
********* Exception(InvalidValue): Invalid FrameDim
[2024/10/11 15:49:03.313894] 16431ce81c0 *Application*read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2024/10/11 15:49:03.315176] 16431ce81c0 *Application*read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2024/10/11 15:49:03.316095] 16431ce81c0 *Application*read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2024/10/11 15:49:03.461402] 16431ce81c0             *Common*lima::GetDefMaxNbBuffers (common\src\MemUtils.cpp:114)-Error: Invalid FrameDim: <0x1x1-Bpp8>
********* Exception(InvalidValue): Invalid FrameDim

while the last exception is repeated several time before the TangoDS dies. A direct restart leads to the following scilent death:

(basler) PS C:\Users\loc_schick> LimaCCDs.exe localhost
basler camera_id: sn://24933363
[2024/10/11 15:50:44.189123] 2448d03a790     *Camera*lima::Basler::Camera::setInterPacketDelay (\BaslerCamera.cpp:1430)-Warning: Parameter not found in CIntegerParameter::SetValue. (No node attached.)
[2024/10/11 15:50:44.189123] 2448d03a790     *Camera*lima::Basler::Interface::Interface (\BaslerInterface.cpp:41)-Always: force_video_mode=0
[2024/10/11 15:50:44.204189] 2448d03a790     *Application*apply_buffer_param_properties-Always: BufferAllocParameters [params]: <durationPolicy=EPHEMERAL, sizePolicy=AUTOMATIC, initMem=1, reqMemSizePercent=70>
[2024/10/11 15:50:44.204189] 2448d03a790     *Application*apply_buffer_param_properties-Always: AccBufferParameters [params]: <durationPolicy=EPHEMERAL, sizePolicy=AUTOMATIC, initMem=0, reqMemSizePercent=0>
[2024/10/11 15:50:44.204189] 2448d03a790     *Application*apply_buffer_param_properties-Always: SavingZBufferParameters [params]: <durationPolicy=EPHEMERAL, sizePolicy=AUTOMATIC, initMem=0, reqMemSizePercent=0>
[2024/10/11 15:50:44.337353] 2448d03a790 *Application*apply_config-Always: Applied config : C:\Users\loc_schick\lima_localhost.cfg : default

I use more or less only default parameters of the LimaCCDs and Basler TangoDS.

Thanks in advance for any help and suggestions.

Best

Daniel

laurent-claustre commented 4 days ago

Hi Daniel, this is a known issue, with USB3 camera and using serial_number the camera is not well detected, see the first warning message:

[2024/10/11 15:48:50.487870] 16431ce71f0     *Camera*lima::Basler::Camera::setInterPacketDelay (\BaslerCamera.cpp:1430)-Warning: Parameter not found in CIntegerParameter::SetValue. (No node attached.)

Instead, you should set a user_name property in jive and configure the camera "Device User ID" using pylonviewer:

Screenshot from 2024-10-14 10-15-20

laurent-claustre commented 4 days ago

humm, sorry, but I was wrong, under linux and using the latest lima package and pylon6-sdk (6.3) I cannot reproduce your issue. Using serial number works fine with my USB3 camera a cA1440-220uc model.

dschick commented 3 days ago

thanks for your quick reply and the testing. I thinkt Lima is connecting correctly for the first time after start, either with serialnumber or username. However, Lima still crashes silently after a few seconds.

I will try it under Linux next, since right now, I am using Windows

laurent-claustre commented 3 days ago

Running atkpanel I get the same error msg about FramDim, this is not so critical, just the buffer_max_number attribute which fails. I continue to investigate

laurent-claustre commented 3 days ago

but this attribute is not the real issue, this attribute is not valid until you start an acquisition. Remember that Atkpanel is polling ALL the attributes every 1 sec, this is why you get repeated error messages. I suspect now a issue with windows only.

dschick commented 3 days ago

alright, I'll try it on Linux hopefully tomorrow. Windows was just for testing, production will be on Linux anyway

dschick commented 2 days ago

Hi @laurent-claustre ,

I just tested the USB camera on a linux machine (Linux Mint, Kernel 4.19) Pylon viewer works without any issues. I installed Lima via the conda packages and get the following error message:

basler camera_id: uname://mybasler
[2024/10/15 14:04:01.915551] 7f8efa804140     *Camera*Basler::Camera::setInterPacketDelay (t LineSource and/or LineSelector:1430)-Warning: Parameter not found in CIntegerParameter::SetValue. (No node attached.)
[2024/10/15 14:04:01.915705] 7f8efa804140     *Camera*Basler::BaslerInterface::Interface (:41)-Always: force_video_mode=0
[2024/10/15 14:04:01.939046] 7f8efa804140     *Application*Lima.Server.LimaCCDs::LimaCCDs::apply_buffer_param_properties-Always: BufferAllocParameters [params]: <durationPolicy=EPHEMERAL, sizePolicy=AUTOMATIC, initMem=1, reqMemSizePercent=50>
[2024/10/15 14:04:01.939182] 7f8efa804140     *Application*Lima.Server.LimaCCDs::LimaCCDs::apply_buffer_param_properties-Always: AccBufferParameters [params]: <durationPolicy=EPHEMERAL, sizePolicy=AUTOMATIC, initMem=0, reqMemSizePercent=0>
[2024/10/15 14:04:01.939267] 7f8efa804140     *Application*Lima.Server.LimaCCDs::LimaCCDs::apply_buffer_param_properties-Always: SavingZBufferParameters [params]: <durationPolicy=EPHEMERAL, sizePolicy=AUTOMATIC, initMem=0, reqMemSizePercent=0>
[2024/10/15 14:04:02.221758] 7f8efa804140 *Application*Lima.Server.LimaCCDs::LimaCCDs::apply_config-Always: Applied config : /home/labuser/lima_henry-baslertest.cfg : default 
Segmentation fault (core dumped)

Here is the full debug log as well

dschick commented 2 days ago

is it maybe about the setInterPacketDelay? could it be, that this parameter is not available for the usb cameras?

laurent-claustre commented 2 days ago

sure, this is only for GigE cameras, but this is not the issue, pb comes from lima-core 1.10 under windows, I tested a usb3 camera on windows 10 and lima-core 1.9.24, by instaling lima-camera-basler 1.10 and lima-camera-basler-tango 1.10 which depends on on lima-core 1.9.24. I will continue to investigate @alejandrohomsp

alejandrohomsp commented 2 days ago

Hi all,

We have seen few Invalid FrameDim issues after the introduction of BufferHelper in v1.10. It seems that some plugins call the buffer management code too early, before the Lima-core initialisation. We will try to patch Lima-core to avoid this error. Concerning the SEGV, it would be nice to have more information on the point of failure.

Best regards

Alejandro

laurent-claustre commented 2 days ago

I can reproduce the same issue using the simulator camera, so this independent of the camera plugin and there is no crash, just that the devices are not exported. I continue to debug that issue on my windows PC.

laurent-claustre commented 2 days ago

it's related to python 3.10, installation with package for python 3.9 works fine...

dschick commented 2 days ago

thanks, I will check this asap