__debugbreak() , exception error in execution ocr tesseract ,

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 :slight_smile:

and exactly at this point : if ( (component_rects != NULL) || (component_texts != NULL) || (component_confidences != NULL) )

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.

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

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

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