Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve Android Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid xxxxx (Thread-X)?

I'm using Opencv sdk for Android to develop a real time processing and matching.

The main Opencv traitment logic is in a JNI function.

The problem is that sometimes (just sometimes) my app crashes without error, so I ignored the problem until I'm done developing the algorithm.

I started investigating the error and it's definetly in the JNI part.

Here is the error I get in the Log

A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 27424 (Thread-8)
A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0

I searched a lot in the internet and I found this solution

<activity
   android:hardwareAccelerated="false" />

It worked for 2 days and now I'm getting the same error back.

What's the problem and how can I solve it?

Any help would be appreciated and thank you in advance.

EDIT

I should add that my application take a reference image from gallery and compare it using Opencv with a real time image feed.

If I choose an image from gallery and the app crashes, that image won't work again and if I take a new image or an image that worked before, the app works fine.

like image 214
Amine Avatar asked Apr 22 '19 13:04

Amine


3 Answers

I solved by

  1. Restarted my smartphone (physical device).

  2. If you are using Android Studio, then go to file --> Invalidate Cache & Restart.

like image 125
Aditya Aggarwal Avatar answered Oct 16 '22 09:10

Aditya Aggarwal


The easiest way to fix this for me was to uninstall and reinstall the app.

like image 36
Ecclesiaste Panda Avatar answered Oct 16 '22 11:10

Ecclesiaste Panda


This problem did occur to me, but the verified answer didn't help. Instead, the combination of the other answers in this thread did. In a nutshell, all I did was:

  1. Invalidating Android Studio's cache.

  2. Wiping the device's data and cold booting it.

like image 45
Vu Tuan Hung Avatar answered Oct 16 '22 09:10

Vu Tuan Hung