Libnvscibuf.so is not loaded

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.6.0.8170
other

Host Machine Version
native Ubuntu 18.04
other

Hello,

I am working on writing an application to run on the AGX which uses a library for bridging between NvMedia images and Cuda buffers. I have built a test application around the library in question and deployed it to the AGX board. At runtime of the app, I receive the following error:

I have checked that the dependencies are indeed found on the board and are in the expected locations. As well as checked the linking of the application, to ensure it has found the required libraries. To me, it seems that the thrown error is not a normal system error (of library not found or similar) but rather some internal check that is performed by the dependent library in question.

I am not too sure how to proceed further from this point, as I cannot see where exactly this error is being thrown from or exactly what is causing it…

Any advice would be greatly appreciated.

Best Regards,
Mike

Dear @Mike_W,
Is libnvscibuf.so linked to application? What’s the output of ldd?

Dear @SivaRamaKrishnaNV,

I have attached the output of ldd. The .so is linked to the application.

Dear @Mike_W,
Looks like issue is with used color format due to which nvcolor to nvscicolor is failing.
Is it possible to share code snippet and sensor details?

Dear @SivaRamaKrishnaNV

I believe this is the relevant code snippet.

nvmediaDevice = NvMediaDeviceCreate();
nvmedia2D = NvMedia2DCreate(nvmediaDevice);
NvSciBufModuleOpen(&bufModule);
NvSciSyncModuleOpen(&syncModule);
NvSciBufAttrList nvmediaBufAttrs;
NvSciBufAttrListCreate(bufModule, &nvmediaBufAttrs);

NVM_SURF_FMT_DEFINE_ATTR(nvMediaSufaceFormatAttributes);
NVM_SURF_FMT_SET_ATTR_RGBA(nvMediaSufaceFormatAttributes,RGBA,UINT,8,PL);

NvMediaSurfAllocAttr surfAllocAttrs[NVM_SURF_ALLOC_ATTR_MAX];
uint32_t numSurfAllocAttrs = 3;
surfAllocAttrs[0].type = NVM_SURF_ATTR_WIDTH;
surfAllocAttrs[0].value = width;
surfAllocAttrs[1].type = NVM_SURF_ATTR_HEIGHT;
surfAllocAttrs[1].value = height;
surfAllocAttrs[2].type = NVM_SURF_ATTR_COLOR_STD_TYPE;
surfAllocAttrs[2].value = NVM_SURF_ATTR_COLOR_STD_SRGB;
NvSciBufAttrValAccessPerm access_perm = NvSciBufAccessPerm_ReadWrite;
NvSciBufAttrKeyValuePair attrKvp = {NvSciBufGeneralAttrKey_RequiredPerm,
&access_perm,
sizeof(access_perm)};

NvSciBufAttrListSetAttrs(nvmediaBufAttrs,&attrKvp,1);
NvMediaImageFillNvSciBufAttrs( nvmediaDevice,
NvMediaSurfaceFormatGetType(nvMediaSufaceFormatAttributes,NVM_SURF_FMT_ATTR_MAX),
surfAllocAttrs,
numSurfAllocAttrs,
0,
nvmediaBufAttrs);

Dear @SivaRamaKrishnaNV

Would you need to see something specifically?

Any help is greatly appreciated.

Dear @Mike_W,
It is clear that, the issue is due to invalid format conversion between NvColor to NvSciColor. It is not clear from the code snippet where this issue trigger. Have you modified any NvMedia sample to create your sample code? Are you looking to convert Nvmedia Image to CUDA using NvSciBuf?

Hi @Mike_W

I faced a similar problem because I forgot to initialize the NvMediaImage NvSciBuf API.

NvMediaImageNvSciBufInit();

Do it only once before NvSciBufModuleOpen

Best regards,
Alejandro

Hi @AlejandroSolis-RidgeRun

This was the solution to the problem! Thanks very much.

Best regards,
Mike

Dear @AlejandroSolis-RidgeRun,
Thank you for sharing your insights.