Openalpr: [Solved]"Segmentation fault (core dumped)" fatal error

Created on 10 Jul 2018  路  16Comments  路  Source: openalpr/openalpr

I got this error on either the version that I compiled myself and the official dist binary version.
And so many people suffered this error and don't know how to solve it.

use 'alpr path/to/your_picture -c xx', xx is any country code but 'us'
and it works.

'us' config may has issues?

Most helpful comment

I too am having this issue.
I installed ALPR on Ubuntu 18.04 LTS using the easy way.
Installed each dependency one by one, as my machine wouldn't download multiple at once. Downloaded the source and built it.

The test using this image fails with segmentation fault.
http://plates.openalpr.com/h786poj.jpg

These work fine however.
http://plates.openalpr.com/ea7the.jpg
http://plates.openalpr.com/h786poj.jpg (Second highest confidence is correct for this one).

Is there any way to enable verbose debugging so I can see where the error is coming from?

All 16 comments

I too am having this issue.
I installed ALPR on Ubuntu 18.04 LTS using the easy way.
Installed each dependency one by one, as my machine wouldn't download multiple at once. Downloaded the source and built it.

The test using this image fails with segmentation fault.
http://plates.openalpr.com/h786poj.jpg

These work fine however.
http://plates.openalpr.com/ea7the.jpg
http://plates.openalpr.com/h786poj.jpg (Second highest confidence is correct for this one).

Is there any way to enable verbose debugging so I can see where the error is coming from?

I too am having this issue.
I installed ALPR on Ubuntu 18.04 LTS using the easy way.
Installed each dependency one by one, as my machine wouldn't download multiple at once. Downloaded the source and built it.

The test using this image fails with segmentation fault.
http://plates.openalpr.com/h786poj.jpg

These work fine however.
http://plates.openalpr.com/ea7the.jpg
http://plates.openalpr.com/h786poj.jpg (Second highest confidence is correct for this one).

Is there any way to enable verbose debugging so I can see where the error is coming from?

I did the same steps and I have exactly the same problem, running from the console:

# Test the library
wget http://plates.openalpr.com/h786poj.jpg -O lp.jpg
alpr lp.jpg

I'm getting this error:
Segmentation fault (core dumped)

Ubuntu said:

Problem with ExecutablePath: usr/bin/alpr
Send report?

I tried run python code from Integrating OpenALPR
and i got message from console PyCharm

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

I searched and found stackoverflow

Anyone fixed this in Ubuntu 18? I am also having the same error with using

# Test the library
wget http://plates.openalpr.com/h786poj.jpg -O lp.jpg
alpr lp.jpg

And Getting this error

Segmentation fault (core dumped)

Specifying correct country code seems to fix this issue. The error seems to stem from trying to auto match the country.

I can work with that @tajition. But I'm encountering, it can detect some of my plate, but then after a seconds it will automatically close. Then the
"segmentation core fault dumped" will appear on my terminal. I do running it using python integration with opencv to make it real time.

same error

Is there any way to enable verbose debugging so I can see where the error is coming from?

Pass the --debug flag.

Here's the output from my Ubuntu 18.04 X64 machine, with a bunch of scoring messages deleted.
I noticed that the preview window opens, then closes immediately before the segfault, so the recognition process seems to have completed, perhaps there's something amiss in the rendering process.

$ alpr --debug lp.jpg
prewarp skipped due to missing prewarp config
No prewarp configuration specified
Prewarp Initialization Time: 0.00407ms.
Analyzing: us
No prewarp configuration specified
Prewarp Initialization Time: 0.003685ms.
LBP Time: 101.554ms.
Starting CharacterAnalysis identification
  -- Produce Threshold Time: 1.49285ms.
  -- Character Analysis Find Contours Time: 0.33218ms.
filterContourHoles: contour index: 16
Threshold 0 had 5 good indices.
filterContourHoles: contour index: 14
Threshold 1 had 5 good indices.
filterContourHoles: contour index: 11
Threshold 2 had 5 good indices.
  -- Character Analysis Filter Time: 0.132922ms.
CharacterAnalysis::findOuterBoxMask
Winning image index (findOuterBoxMask) is: -1
Best fit score: 5 Index: 0
CharacterAnalysis, plate inverted: MEAN: [255, 0, 0, 0] : 0
Plate inverted: 0
The winning score is: 4
Character Analysis Time: 53.7297ms.
High Contrast Detection Time: 0.071802ms.
PlateLines constructor
PlateLines findLines
PlateLines::getLines
PlateLines::getLines
Plate Lines Time: 8.69696ms.
PlateCorners constructor
PlateCorners::findPlateCorners
--------------------
[SCORING OUTPUT DELETED]
--------------------
Drawing debug stuff...
Plate Corners Time: 29.245ms.
deskew Time: 6.18443ms.
Starting CharacterSegmenter
  -- Produce Threshold Time: 3.4641ms.
Segmenter: inverted: 1
LINE 0: avgCharHeight: 37 - height_to_width_ratio: 2
LINE 0: avgCharWidth: 18.5
  -- Character Segmentation Create and Score Histograms Time: 0.368709ms.
All Boxes size 4
All Boxes size 2
All Boxes size 1
All Boxes size 0
All Boxes size 0
All Boxes size 0
All Boxes size 0
All Boxes size 0
All Boxes size 0
All Boxes size 0
All Boxes size 0
All Boxes size 0
All Boxes size 0
 Adding label All Histograms
 Adding label Best Boxes
Not Merging 2 boxes -- 0 and 1 -- has_good_gap: 0 bigWidth (48) > max_width (12)
Not Merging 2 boxes -- 1 and 2 -- has_good_gap: 1 bigWidth (32) > max_width (12)
Not Merging 2 boxes -- 2 and 3 -- has_good_gap: 1 bigWidth (23) > max_width (12)
 Box Score: 3
 Box Score: 3
Mostly Empty Filter: box index: 2 this box had a score of : 1 MIN_FULL_BOXES: 1
 Box Score: 1
Mostly Empty Filter: box index: 3 this box had a score of : 1 MIN_FULL_BOXES: 1
 Box Score: 1
  -- Character Segmentation Box cleaning/filtering Time: 0.511101ms.
Character CLEAN: (height) removing box 0 in threshold 1 -- Height 14 < 20
Character Segmenter Time: 23.5503ms.

Possibly related to #761

installing tesserract from a ppa is the solution

After trying a lot of fixes, finally @Reddyforcode link worked

@Reddyforcode thank you brother. you saved my day

installing tesserract from a ppa is the solution
Thank you! This solved the problem for me, now with tesseract-ocr (4.1.1-1ppa1~bionic1) it is working OK.

Hello everyone,

Same issue here.

I just downloaded the last version of tesseract, build and re-build openalpr. And it works!!!

wget  https://github.com/tesseract-ocr/tesseract/archive/4.0.0.tar.gz
gunzip 4.0.0.tar.gz
tar -xvf 4.0.0.tar
cd tesseract-4.0.0/
./autogen.sh
./configure
make -j4
sudo make install
sudo ldconfig

And then:

cd openalpr/src
cmake ./
make
sudo make install
sudo ldconfig

Hope this help you.
Saludos desde Argentina (this explain my english...sorry)

Was this page helpful?
0 / 5 - 0 ratings