Sep-17-2019, 07:43 PM
(This post was last modified: Sep-17-2019, 07:48 PM by samtwilliams.)
Hi Larz60 sorry i'm not familiar with python so i'm hoping this is right;
I have also added a fault handler and the output is this;
Output:Starting program: /usr/bin/python3 readstream.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff444d700 (LWP 129)]
[Thread 0x7ffff444d700 (LWP 129) exited]
[New Thread 0x7ffff444d700 (LWP 132)]
[New Thread 0x7fffc7382700 (LWP 133)]
Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
0x00007fffe37f5568 in tesseract::LTRResultIterator::WordFontAttributes(bool*, bool*, bool*, bool*, bool*, bool*, int*, int*) const ()
from /usr/lib/x86_64-linux-gnu/libtesseract.so.4
(gdb) backtrace
#0 0x00007fffe37f5568 in tesseract::LTRResultIterator::WordFontAttributes(bool*, bool*, bool*, bool*, bool*, bool*, int*, int*) const ()
from /usr/lib/x86_64-linux-gnu/libtesseract.so.4
#1 0x00007fffe40615e2 in alpr::TesseractOcr::recognize_line(int, alpr::PipelineData*) () from /usr/lib/libopenalpr.so.2
#2 0x00007fffe4062f91 in alpr::OCR::performOCR(alpr::PipelineData*) () from /usr/lib/libopenalpr.so.2
#3 0x00007fffe402591a in alpr::AlprImpl::analyzeSingleCountry(cv::Mat, cv::Mat, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >) ()
from /usr/lib/libopenalpr.so.2
#4 0x00007fffe40243e0 in alpr::AlprImpl::recognizeFullDetails(cv::Mat, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >) ()
from /usr/lib/libopenalpr.so.2
#5 0x00007fffe4026dd7 in alpr::AlprImpl::recognize(cv::Mat, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >) () from /usr/lib/libopenalpr.so.2
#6 0x00007fffe4026cbc in alpr::AlprImpl::recognize(cv::Mat) () from /usr/lib/libopenalpr.so.2
#7 0x00007fffe40263ef in alpr::AlprImpl::recognize(std::vector<char, std::allocator<char> >) () from /usr/lib/libopenalpr.so.2
#8 0x00007fffe401ea6c in alpr::Alpr::recognize(std::vector<char, std::allocator<char> >) () from /usr/lib/libopenalpr.so.2
#9 0x00007fffe437719f in recognizeArray () from /usr/lib/libopenalprpy.so
#10 0x00007ffff1402dae in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#11 0x00007ffff140271f in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#12 0x00007ffff16165d4 in _ctypes_callproc () from /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
#13 0x00007ffff1616d64 in ?? () from /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so
#14 0x00000000005a95fc in _PyObject_FastCallKeywords ()
#15 0x0000000000509ad3 in ?? ()
#16 0x000000000050b4a9 in _PyEval_EvalFrameDefault ()
#17 0x0000000000508c69 in ?? ()
#18 0x000000000050999d in ?? ()
#19 0x000000000050b4a9 in _PyEval_EvalFrameDefault ()
#20 0x0000000000508c69 in ?? ()
#21 0x000000000050999d in ?? ()
#22 0x000000000050b4a9 in _PyEval_EvalFrameDefault ()
#23 0x0000000000507125 in ?? ()
#24 0x000000000050a3b3 in PyEval_EvalCode ()
#25 0x00000000006349e2 in ?? ()
#26 0x0000000000634a97 in PyRun_FileExFlags ()
#27 0x000000000063824f in PyRun_SimpleFileExFlags ()
#28 0x0000000000638df1 in Py_Main ()
#29 0x00000000004b0de0 in main ()
(gdb)
I have also added a fault handler and the output is this;
Output:# python3 -Xfaulthandler readstream.py
Plate #0: 0909E (81.66%)
Plate #0: 0909E (81.66%)
Fatal Python error: Segmentation fault
Current thread 0x00007f3ad58e1740 (most recent call first):
File "/usr/local/lib/python3.6/dist-packages/openalpr/openalpr.py", line 174 in recognize_array
File "readstream.py", line 54 in main
File "readstream.py", line 89 in <module>
Segmentation fault
Not quite sure what the issue is though, it's always seem to process two plates before faulting.