Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6480 Discussions

hello_classification example runtime_error at memory location 0x000000381E37D8E8.

eddie_patton
New Contributor I
1,773 Views

Hi

I ran the 2022.3.1 hello_classification example and get the exception below on read_model() in Visual Studio's output window:

Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000381E37D8E8.
'hello_classification.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\openvino_2022.3.1\runtime\bin\intel64\Debug\openvino_ir_frontendd.dll'. 

and then on compile_model() I get this error:

'hello_classification.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\openvino_2022.3.1\runtime\bin\intel64\Debug\openvino_auto_batch_plugind.dll'. 
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::NotFound at memory location 0x000000381E37C280.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000381E37A940.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000381E37A940.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000381E375B90.
'hello_classification.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\openvino_2022.3.1\runtime\bin\intel64\Debug\openvino_intel_cpu_plugind.dll'. 
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::NotImplemented at memory location 0x000000381E37C730.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::NotImplemented at memory location 0x000000381E379F80.

Yet when I continue the example, the output is as expected (the class probabilities match what's published on OpenVINO™ Blog | Running OpenVINO C++ samples on Visual Studio

[ INFO ] Build ................................. 2022.3.1-9227-cf2c7da5689-releases/2022/3
[ INFO ]
[ INFO ] Loading model files: C:\Users\Eddie.Patton\Documents\Intel\OpenVINO\models_2022.3.1\public\googlenet-v1\FP32\googlenet-v1.xml
[ INFO ] model name: GoogleNet
[ INFO ]     inputs
[ INFO ]         input name: data
[ INFO ]         input type: f32
[ INFO ]         input shape: [1,3,224,224]
[ INFO ]     outputs
[ INFO ]         output name: prob
[ INFO ]         output type: f32
[ INFO ]         output shape: [1,1000]

Top 10 results:

Image C:\Users\Eddie.Patton\Documents\Intel\OpenVINO\models_2022.3.1\car.bmp

classid probability
------- -----------
656     0.8120953
654     0.0552138
468     0.0177683
436     0.0161950
705     0.0113521
817     0.0104081
581     0.0086928
575     0.0079272
734     0.0065350
785     0.0042873

Note that the above output says the toolkit build is 2022.3.1 and the mo version below is also 2022.3.1

So why are there exceptions in the Visual Studio output and why aren't they caught by try/catch?

Is this because the Debug dlls have an issue that the Release dlls don't?

********* Info on how I got this example running on 2022.3.1 ************

I followed the instructions to setup the openvino examples on visual studio

    OpenVINO™ Blog | Running OpenVINO C++ samples on Visual Studio

However, I am not using the 2023 toolkit. 

I downloaded the 2022.3.1 toolkit from here storage.openvinotoolkit.org.

And used the python virtual environment to install the openvino model optimizer tools:

pip install openvino-dev[pytorch,onnx]==2022.3.1

I checked the model optimizer version

>mo --version
Version of Model Optimizer is: 2022.3.1-9227-cf2c7da5689-releases/2022/3

The model I downloaded is googlenet-v1 using

omz_downloader --name googlenet-v1
omz_converter --name googlenet-v1

Setupvars.bat was run from the 2022.3.1 toolkit folder and I also started Visual Studio from the same cmd window where setupvars.bat was run.  

0 Kudos
1 Solution
Megat_Intel
Moderator
1,664 Views

Hi Eddie,

Thank you for your patience.

 

For your information, the exceptions you observed are normal behavior. The errors are internal exceptions that have already been handled internally by OpenVINO™, and they don't affect the code execution.

 

It is just how OpenVINO™ works internally. That also explains why the error message are not displayed in the command prompt and why the catch method does not caught the error.

 

On the other hand, the Development team mentioned that they will soon add a note in the blog to inform that the exceptions that indicate are normal.

 

 

Regards,

Megat


View solution in original post

0 Kudos
7 Replies
eddie_patton
New Contributor I
1,749 Views

If it helps, I am running Python 3.10.11 and the venv local installs are below

>pip freeze --local
addict==2.4.0
certifi==2023.7.22
charset-normalizer==3.2.0
colorama==0.4.6
defusedxml==0.7.1
fastjsonschema==2.15.3
idna==3.4
jstyleson==0.0.2
networkx==2.8.8
numpy==1.24.4
onnx==1.12.0
opencv-python==4.8.0.76
openvino==2022.3.1
openvino-dev==2022.3.1
openvino-telemetry==2023.1.1
pandas==1.3.5
Pillow==10.0.0
protobuf==3.20.1
python-dateutil==2.8.2
pytz==2023.3.post1
PyYAML==6.0.1
requests==2.31.0
scipy==1.8.1
six==1.16.0
texttable==1.6.7
torch==1.13.0
torchvision==0.14.0
tqdm==4.66.1
typing_extensions==4.7.1
urllib3==2.0.4
yacs==0.1.8

0 Kudos
Megat_Intel
Moderator
1,747 Views

Hi Eddie,

Thank you for reaching out to us.

 

For your information, I was able to replicate the issue and received the same error message as yours. I show my result here:

 hello_classification_debugx64.png

 

On the other hand, when running the hello_classification.exe file from the command prompt, I did not encounter any errors as shown below:

 cmd_result.png

 

The error seems to appear in Visual Studio only and does not affect the OpenVINO™ inference. For confirmation, I have informed the relevant team regarding this and will provide you an update once I receive feedback, Thank you.

 

 

Regards,

Megat

 

0 Kudos
eddie_patton
New Contributor I
1,738 Views

Thanks for doing investigating this Megat. I too do not see any exception info showing up in the cmd window, but I'm sure there's a way to configure compile flags to route all exception info to the cmd window. 

I will try 2023 and see what happens. Releasing production code with the exceptions we've observed wouldn't be allowed - at least not in the company I work for  ;-).

 

0 Kudos
eddie_patton
New Contributor I
1,726 Views

Another datapoint:

I downloaded the 2023.0.2 toolkit from storage.openvinotoolkit.org, and downloaded the model optimizer using 

 

python -m pip install openvino-dev[caffe]==2023.0.2

 

validated by 

 

>mo --version
Version of Model Optimizer is: 2023.0.2-11065-e662b1a3301-releases/2023/0

 

The cmd window output was the same as presented in Hello Classification C++ Sample — OpenVINO™ documentationCopy to clipboardCopy to clipboardCopy to clipboardCopy to clipboardCopy to clipboardCopy to clipboardCopy to clipboard — Version(2023.0)

with the version info being:

 

[ INFO ] Build ................................. 2023.0.2-11065-e662b1a3301-releases/2023/0
[ INFO ]

 

Unfortunately I get the same exception errors output to the Visual Studio 2019 output window on read_model() and compile_model() using the googlenet-v1 model.

 

**** output from  model = core.read_model(model_path) **********************
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000DD76FCD538.
'hello_classification.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\openvino_2023.0.2\runtime\bin\intel64\Debug\openvino_ir_frontendd.dll'. 
'hello_classification.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\openvino_2023.0.2\runtime\bin\intel64\Debug\openvino_auto_batch_plugind.dll'. 

**** output from core.compile_model(model, device_name) ************
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000DD76FCBF70.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::NotFound at memory location 0x000000DD76FC9870.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000DD76FC7060.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000DD76FC7060.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000DD76FCBD80.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000DD76FCA600.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000DD76FCA600.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000DD76FC5710.
'hello_classification.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\openvino_2023.0.2\runtime\bin\intel64\Debug\openvino_intel_cpu_plugind.dll'. 
'hello_classification.exe' (Win32): Loaded 'C:\Program Files (x86)\Intel\openvino_2023.0.2\runtime\3rdparty\tbb\bin\tbbbind_2_5_debug.dll'. 
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000DD76FCBED0.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000DD76FCBCE0.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::NotImplemented at memory location 0x000000DD76FCC350.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::NotImplemented at memory location 0x000000DD76FC9BB0.
Exception thrown at 0x00007FFFA042CF19 in hello_classification.exe: Microsoft C++ exception: InferenceEngine::GeneralError at memory location 0x000000DD76FCCB10.
'hello_classification.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. 
'hello_classification.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. 

 

 

 

0 Kudos
Megat_Intel
Moderator
1,665 Views

Hi Eddie,

Thank you for your patience.

 

For your information, the exceptions you observed are normal behavior. The errors are internal exceptions that have already been handled internally by OpenVINO™, and they don't affect the code execution.

 

It is just how OpenVINO™ works internally. That also explains why the error message are not displayed in the command prompt and why the catch method does not caught the error.

 

On the other hand, the Development team mentioned that they will soon add a note in the blog to inform that the exceptions that indicate are normal.

 

 

Regards,

Megat


0 Kudos
eddie_patton
New Contributor I
1,645 Views

Thanks Megat for bringing this to closure.

A SW dev will see these and then assume that they are the cause of an unexplained behavior that they are debugging.  It's a diversion from what the real issue might be (like what happened to me), and it creates noise when one's trying to review outputs when debugging.  This isn't a good output to have from a toolkit. 

That said, we'll live with it. 

Thanks again.

Cheers

Eddie

 

0 Kudos
Megat_Intel
Moderator
1,598 Views

Hi Eddie,

Thank you for sharing your findings with us and we appreciate your feedback.

 

This thread will no longer be monitored since we have provided an explanation. If you need any additional information from Intel, please submit a new question.

 

 

Regards,

Megat


0 Kudos
Reply