Skip To Main Content
Support Knowledge Base

Error: “Segmentation Fault” When Performing Inference with OpenVINO™ Runtime C++ API

Content Type: Error Messages   |   Article ID: 000092648   |   Last Reviewed: 11/17/2022

Description

  1. Created input tensor and performed inference with OpenVINO™ Runtime C++ API:
    ov::Tensor input_tensor = ov::Tensor(input_type, input_shape, &data);
    infer_request = compiled_model.create_infer_request();
    infer_request.set_input_tensor(input_tensor);
    infer_request.infer();
  2. Encountered error:
    Segmentation Fault

Resolution

Segmentation Fault occurs when a program attempts to access a memory location that is not allowed to access.

 

Change &data to data when creating input tensor.

Related Products

This article applies to 1 products.