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

Exception Invalid FrameDim - Basler ACE USB3 #39

Open
dschick opened this issue Oct 11, 2024 · 15 comments
Open

Exception Invalid FrameDim - Basler ACE USB3 #39

dschick opened this issue Oct 11, 2024 · 15 comments

Comments

@dschick
Copy link

dschick commented Oct 11, 2024

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
Copy link
Contributor

laurent-claustre commented Oct 14, 2024

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
Copy link
Contributor

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
Copy link
Author

dschick commented Oct 14, 2024

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
Copy link
Contributor

laurent-claustre commented Oct 14, 2024

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
Copy link
Contributor

laurent-claustre commented Oct 14, 2024

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
Copy link
Author

dschick commented Oct 14, 2024

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

@dschick
Copy link
Author

dschick commented Oct 15, 2024

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
Copy link
Author

dschick commented Oct 15, 2024

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

@laurent-claustre
Copy link
Contributor

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
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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

@dschick
Copy link
Author

dschick commented Oct 16, 2024

thanks, I will check this asap

@laurent-claustre
Copy link
Contributor

finally there is no real issue with basler/lima/python3.10. The only problem I found was due to the windows firewall which did block the inbound traffic for some python executable.

image

Changing the inbound rules for them did fix the issue:
image

@dschick
Copy link
Author

dschick commented Nov 4, 2024

Hi @laurent-claustre ,

Thanks for further working on that issue. I actually tried to work it out on windows, but I had problems to get things working with a fresh install of lima-camera-basler-tango using conda.

Therefor, I switched to linux using a month-old installation via conda.
I tried to figure out, why I always get an Segmentation fault (core dumed) as soon as I open the Device in Jive.
So I tried things using pyTango and most of the things are working.
I found one error when asking for the saving_every_n_frames attribute
*Application*Lima.Server.LimaCCDs::LimaCCDs::read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
But this did not crash the device.

However, as soon as I ask for the video_last_image the device exhibts the seg fault.
This also happens as soon as I "tab" the video_ attributes in the python shell.
I can read and write all other video_ attributes and as soon as I once start the video_mode, so that a video_last_image is available, everything is okay and I can also open the device in Jive.

This might be a dedicated problem so please feel free to move it to another issue.

Best

Daniel

PS: for the last_image attribute everything is fine and an error is raised, when it is not available but the device server stays alive

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

3 participants