Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OpenCV - Segmentation fault
#4
Hi Larz60 sorry i'm not familiar with python so i'm hoping this is right;


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.
Reply


Messages In This Thread
OpenCV - Segmentation fault - by samtwilliams - Sep-15-2019, 07:39 PM
RE: OpenCV - Segmentation fault - by samtwilliams - Sep-15-2019, 08:50 PM
RE: OpenCV - Segmentation fault - by Larz60+ - Sep-16-2019, 12:45 AM
RE: OpenCV - Segmentation fault - by samtwilliams - Sep-17-2019, 07:43 PM
RE: OpenCV - Segmentation fault - by kinetic - Sep-17-2019, 08:05 PM
RE: OpenCV - Segmentation fault - by samtwilliams - Sep-17-2019, 08:18 PM
RE: OpenCV - Segmentation fault - by Larz60+ - Sep-18-2019, 12:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [pyparsing] How to make my simple parser fault tolerant medihack 0 211 May-14-2024, 04:52 PM
Last Post: medihack
  make: *** [Makefile:29: all] Segmentation fault Anldra12 2 1,998 May-01-2022, 06:17 PM
Last Post: Anldra12
  Segmentation fault (core dumped) hobbyist 1 10,726 Jun-07-2021, 12:56 PM
Last Post: supuflounder
  Segmentation fault with large files kusal1 3 2,856 Oct-01-2019, 07:32 AM
Last Post: Gribouillis
  Multiple calls to Python interpreter embedded in C++ application yield segmentation f mmoelle1 0 2,902 Mar-21-2019, 08:54 PM
Last Post: mmoelle1
  Segmentation fault when connecting to modbus device with Libmodbus alice 0 2,536 Dec-18-2018, 04:03 PM
Last Post: alice
  Debugging a seg fault tidymax 1 2,909 Oct-31-2018, 02:58 PM
Last Post: ichabod801
  calling python function in c++ callback getting segmentation fault error Jotirling 3 7,269 Oct-26-2017, 08:55 AM
Last Post: Larz60+
  Compiler fault or some kind of weird referencing bug? Joseph_f2 11 9,352 May-09-2017, 08:50 PM
Last Post: volcano63
  Thai Text Segmentation Module draems 4 8,399 Feb-03-2017, 03:29 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020