Error generated. /home/jetson/jetson_multimedia_api/argus/samples/utils/Thread.cpp, threadFunction:126 (propagating)

Hi all,

Environment :

Jetpack : 4.5.1
LibArgus : 0.97.3
Board : NVIDIA Jetson AGX Xavier
Camera : Custom MIPI CSI Camera
Driver : Custom driver (Able to capture with nvarguscamerasrc and LibArgus)

I’m using LibArgus in my custom C++ application to capture with a custom camera, the driver for this camera is correctly installed and i’ve tested argus sample like (oneShot, camera_recording etc…) and that’s worked well.

In my application i just create a class i called Producer which inherited from the class Thread (Class from /jetson_multimedia_api/argus/samples/utils/Thread.cpp)
The implementation of the threadInitialization() of the class Producer just initialize a camera provider, and exctract the argus camera provider interface etc.

But when i execute my program i’ve the error below in the threadFunction which calls the threadInitialization() i’ve implemented, and it seems the program is stuck is the waitRunning() function and return after doing this comparaison if (timeoutUs < sleepTimeUs) return false;

Error generated. /home/jetson/jetson_multimedia_api/argus/samples/utils/Thread.cpp, threadFunction:126 (propagating)

Can you please suggest me some solution to solve this issue and avoid having this errors ?

Thank you

hello chakibdace,

it looks like the implementation issue,
may I know what’s the actual use-case, why don’t you extend the camera use-case based-on the sample application,

Hi @JerryChang

I got inspired by the samples of tegra_multimedia_api, it appears that in the implementation of the function it fails to detect sensor modes which are availables, there is the implementation :


if (!m_iCameraProperties)
    {
        reportError(__func__, "Camera properties interface not initialized");
        return false;
    }

    // Get available sensor modes
    //m_iCameraProperties->getAllSensorModes(&m_sensormodes);
	std::cout << "Get basic sensorModes" << std::endl;
	m_iCameraProperties->getBasicSensorModes(&m_sensormodes);

    if (m_sensormodes.size() == 0)
    {
		std::cout << "No sensor modes availables" << std::endl;
        reportError(__func__, "No sensor modes availables");
        return false;
    }

The vector m_sensormodes is equal to 0 so it returns false and propagate an error, I dunno why when i’m using libArgus sample it finds the sensor mode but in my implementation it fails…

Do you have any idea about this issue ?

Thanks

hello chakibdace,

did you get the camera device correctly? you should create the CameraProvider object and get the core interface.
for example,

    /* Create the CameraProvider object */
    UniqueObj<CameraProvider> cameraProvider = UniqueObj<CameraProvider>(CameraProvider::create());
    ICameraProvider *iCameraProvider = interface_cast<ICameraProvider>(cameraProvider);

    /* Get the camera devices */
    std::vector<CameraDevice*> cameraDevices;
    iCameraProvider->getCameraDevices(&cameraDevices);

    /* Camera properties interface of 1st camera device*/
    ICameraProperties *iCameraProperties = interface_cast<ICameraProperties>(cameraDevices[0]);

Hi @JerryChang

I’ve correctly create the camera provider, and get the camera device and retrieve camera properties of the camera with the index 0.

It works when i use directly a simple script to get sensor modes, but it doesn’t find sensor modes when i use this latter in a C++ custom application, i’m calling the same functions and using a shared library (libargussampleutils.so).

I’m wondering why it fails to get sensor modes even if i’m using the same implementations in a simple script.

It’s weird that when i execute a simple script using Argus it succeed to detect all sensors modes but when i use a cross compiled application which use Argus it fails to get sensors modes

hello chakibdace,

how you cross compile the app, did you based-on the exactly same JetPack release version?

Hi @JerryChang

It was cross compiled using Yocto, and i’ve just seen that it’s cross compiled using ./recipes-multimedia/argus/tegra-mmapi_32.2.0.bb, so i think you are right it’s due to JetPack compatibility in fact the JetPack 4.5.1 (The one i’m using because the camera driver only work in this version of the JetPack) use tegra-mmapi_32.5.1, so do you think it’s possible to change the BSP-Tegra layer to use tegra-mmapi_32.5.1 ?

Thanks

hello chakibdace,

there’re all Jetson Linux Versions available. you may download that for implementation.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.