VPI_ERROR_INTERNAL on Headless Jetson

We have some AGX Xaviers running our software, and just recently moved from JetPack 4.5.1 to JetPack 5.0.2 and wanted to begin taking advantage of the VPI interface that is available now.

I am currently seeing a VPI_ERROR_INTERNAL returned on ALL calls to vpiImageCreate(). But there are other function that do succeed. Notably, the opencv interop wrapper which we will also be needing.
Can anyone suggest why we might be getting this VPI_ERROR_INTERNAL? Sample code and output below.

VPIImage mytest1;
VPIImage mytest2;
VPIImage mytest3;
VPIImageFormat myformat;
VPIStatus mystatus;
int w, h;

mystatus = vpiImageCreate(2448, 2048, VPI_IMAGE_FORMAT_U8, 0, &mytest2);
logger.information(cameraSerial + "Create U8 " + vpiStatusGetName(mystatus));
mystatus = vpiImageCreate(2448, 2048, VPI_IMAGE_FORMAT_NV12_ER, 0, &mytest1);
logger.information(cameraSerial + "Create Nv12ER " + vpiStatusGetName(mystatus));

inputImage = newFrame.getFrameData();
mystatus = vpiImageCreateWrapperOpenCVMat(inputImage, 0, &mytest3);
logger.information(cameraSerial + "CreateWrapper  " + vpiStatusGetName(mystatus));
mystatus = vpiImageGetFormat(mytest3, &myformat);
logger.information(cameraSerial + "GetFormat  " + vpiImageFormatGetName(myformat) + " status " + vpiStatusGetName(mystatus));
mystatus = vpiImageGetSize(mytest3, &w, &h);
logger.information(cameraSerial + "GetSize " + std::to_string(w) + "x" + std::to_string(h) + " status " + vpiStatusGetName(mystatus));

With the log showing both vpiImageCreates failing, but the wrapper seems to work just fine??

2023-02-17 21:34:23.515 <27> 22495432 Create U8 VPI_ERROR_INTERNAL
 2023-02-17 21:34:23.535 <27> 22495432 Create Nv12ER VPI_ERROR_INTERNAL
 2023-02-17 21:34:23.599 <27> 22495432 CreateWrapper  VPI_SUCCESS
 2023-02-17 21:34:23.599 <27> 22495432 GetFormat  VPI_IMAGE_FORMAT_BGRA8 status VPI_SUCCESS
 2023-02-17 21:34:23.599 <27> 22495432 GetSize 2448x2048 status VPI_SUCCESS

I’d like to add that I get the same VPI_ERROR_INTERNAL when running one of the Samples. In this case the resize. It also shows something about an EGL_BAD_DISPLAY, but this is a headless setup. Putting a few extra cout lines in I can see that the vpiImageCreate is again what is throwing the error.

./vpi_sample_04_rescale cuda MapTuningStill_163.jpg
ImageCreate1
VPI_ERROR_INTERNAL: VIC|NVENC backend(s) error: (EGL_BAD_DISPLAY)

Hi,

Please run the below command and try it again.

$ unset DISPLAY

Thanks.

That seems to work!! Whew!! Going to to a few more confirmations then I’ll close this issue with many thanks!

Good to know this!
Thanks for the update.

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