question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

segmentation fault (core dumped)

See original GitHub issue

I get this error out of nowhere for some reason

python version is 3.9.4

Fatal Python error: Segmentation fault
Current thread 0x00007fdc6aa93b80 (most recent call first):
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.4/lib/python3.9/site-packages/easyocr/craft_utils.py", line 31 in getDetBoxes_core
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.4/lib/python3.9/site-packages/easyocr/craft_utils.py", line 236 in getDetBoxes
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.4/lib/python3.9/site-packages/easyocr/detection.py", line 55 in test_net
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.4/lib/python3.9/site-packages/easyocr/detection.py", line 95 in get_textbox
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.4/lib/python3.9/site-packages/easyocr/easyocr.py", line 275 in detect
  File "/home/linuxbrew/.linuxbrew/Cellar/python@3.9/3.9.4/lib/python3.9/site-packages/easyocr/easyocr.py", line 388 in readtext
  File "/home/andruxuis/Documents/Python/doujinTranslator/main.py", line 11 in <module>
[1]    63904 segmentation fault (core dumped) 

my code


import easyocr
import faulthandler

faulthandler.enable()


# this needs to run only once to load the model into memory
reader = easyocr.Reader(['ja'], gpu=False)


results = reader.readtext('./my.png', paragraph=True, detail=0)


print(results)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

23reactions
venergiac-bhcommented, Jan 3, 2022

got the same error

the problem is the version of opencv-python-headless, SOLVED downgrading to Nov 2021 version

pip install opencv-python-headless==4.5.4.60

3reactions
varunsingh3000commented, Jan 2, 2022

What version of opencv-python are you using? If its the latest version at this time (4.5.5.62), then it seems it’s not compatible with easyocr for now. Downgrade your opencv version to 4.5.4.60. Refer #630, #349. This might solve this error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

what is Segmentation fault (core dumped)? - Stack Overflow
"Segmentation fault" means that you tried to access memory that you do not have access to. The first problem is with your arguments...
Read more >
Error :- Segmentation fault(Core Dumped) - CodeChef Discuss
A segmentation fault ( SEGFAULT ) occurs when you are trying to access memory which you should not be trying to access (...
Read more >
Identify what's causing segmentation faults (segfaults)
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >
Resolving Segmentation Fault (“Core dumped”) in Ubuntu - Blog
Segmentation fault is when your system tries to access a page of memory that doesn't exist. Core dumped means when a part of...
Read more >
When I get a 'segmentation fault (core dumped)' error ... - Quora
A segmentation fault occurs when a process attempts to access memory in a way that the operating system and processor cannot or will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found