# \_\_debugbreak() , exception error in execution ocr tesseract ,

**URL:** <https://forum.opencv.org/t/debugbreak-exception-error-in-execution-ocr-tesseract/10916>\
**Category:** C++\
**Tags:** programming\
**Created:** [November 11, 2022, 8:52pm UTC](https://forum.opencv.org/t/debugbreak-exception-error-in-execution-ocr-tesseract/10916 "2022-11-11T20:52:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nel23\_FX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/nel23_fx/32/5918_2.png) [@nel23\_FX](https://forum.opencv.org/u/nel23_FX)\
**Post date:** [November 11, 2022, 8:52pm UTC](https://forum.opencv.org/t/debugbreak-exception-error-in-execution-ocr-tesseract/10916/1 "2022-11-11T20:52:19Z")

</div>

hello all,  
I build a c++ project using OCRTesseract: I obtain an excecution error when calling the ocr-\>run(…) function. the error is related to ntdll.dll:

| \> | ntdll.dll!RtlReportCriticalFailure() | Inconnu |
| --- | --- | --- |
| | ntdll.dll!RtlpHeapHandleError() | Inconnu |
| | ntdll.dll!RtlpHpHeapHandleError() | Inconnu |
| | ntdll.dll!RtlpLogHeapFailure() | Inconnu |
| | ntdll.dll!RtlpFreeHeapInternal() | Inconnu |
| | ntdll.dll!RtlFreeHeap() | Inconnu |
| | ucrtbase.dll!\_free\_base() | Inconnu |
| | tesseract52.dll!00007ffc7408d5c5() | Inconnu |
| | tesseract52.dll!00007ffc7408df60() | Inconnu |
| | tesseract52.dll!00007ffc741dccf5() | Inconnu |
| | tesseract52.dll!00007ffc741d52be() | Inconnu |
| | tesseract52.dll!00007ffc741dbff7() | Inconnu |
| | QtCameraOpenCVUDP.exe!00007ff7230e632e() | Inconnu |

Has anybody an Idea where to search. I use opencv\_world460.lib;opencv\_text460.lib;opencv\_dnn460.lib;tesseract52.lib for the linking step. It execute well until the ocr-\>run (my code similar to the text/samples/end\_to\_end\_recognition.cpp exemple of module\_contrib). And as it’s a ntdll.dll error I suspect a misconfigured debug option in visualstudio 2022.  
If you understand my problem 🙂

---

<div class="post-metadata">

**Author:** ![nel23\_FX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/nel23_fx/32/5918_2.png) [@nel23\_FX](https://forum.opencv.org/u/nel23_FX)\
**Post date:** [November 11, 2022, 9:25pm UTC](https://forum.opencv.org/t/debugbreak-exception-error-in-execution-ocr-tesseract/10916/2 "2022-11-11T21:25:54Z")

</div>

and exactly at this point : if ( (component\_rects != NULL) || (component\_texts != NULL) || (component\_confidences != NULL) )

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [November 11, 2022, 10:45pm UTC](https://forum.opencv.org/t/debugbreak-exception-error-in-execution-ocr-tesseract/10916/3 "2022-11-11T22:45:23Z")

</div>

that looks like an issue with tesseract, not with OpenCV.

I don’t think the OpenCV forum is the best place to ask about this.

_no_, that’s not an issue with `ntdll.dll`. that is just how exception handling works on windows. your issue is in your own code, which calls `tesseract52.dll` at the time of the crash.

---

<div class="post-metadata">

**Author:** ![nel23\_FX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/nel23_fx/32/5918_2.png) [@nel23\_FX](https://forum.opencv.org/u/nel23_FX)\
**Post date:** [November 11, 2022, 10:54pm UTC](https://forum.opencv.org/t/debugbreak-exception-error-in-execution-ocr-tesseract/10916/4 "2022-11-11T22:54:35Z")

</div>

yes, you’re right it’s in a loop and at the second walk through the while loop : maybe miss cleared variable I think  
Thanks

---

<div class="post-metadata">

**Author:** ![nel23\_FX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/nel23_fx/32/5918_2.png) [@nel23\_FX](https://forum.opencv.org/u/nel23_FX)\
**Post date:** [November 11, 2022, 11:08pm UTC](https://forum.opencv.org/t/debugbreak-exception-error-in-execution-ocr-tesseract/10916/5 "2022-11-11T23:08:48Z")

</div>

in fact i’ve made the job in Java and I try to in C++ now ,

---

<div class="post-metadata">

**Author:** ![nel23\_FX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/nel23_fx/32/5918_2.png) [@nel23\_FX](https://forum.opencv.org/u/nel23_FX)\
**Post date:** [November 15, 2022, 6:34pm UTC](https://forum.opencv.org/t/debugbreak-exception-error-in-execution-ocr-tesseract/10916/6 "2022-11-15T18:34:41Z")

</div>

I go back to this post just to clarify, in fact my code was good but as I was on a debug build , Visual studio break because the project is only linked with release libs tesseract52.dll and leptonica1.X.  
I have rebuilded all the libs to use tesseract52d and leptonica-xx-d and opencv\_text460d.dll etc.  
Now it is ok.  
Thank for all and the topic is closed
