I
I
IvaToa102019-10-24 18:40:34
Android
IvaToa10, 2019-10-24 18:40:34

How to fix SIGSEGV (SEGV_MAPERR) error on Android?

Good afternoon!
The task is to use the c ++ library from another Android application that was not written by me.
The library itself is structured like this:
1. There are methods in c++, like Java_com_, to which we connect from java.
2. There are methods in java that are accessed by the code from c++.
I connect to the library, some of the methods work.
And then it gives this error.

10-23 15:32:07.262 29631-29674/com.test.test A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 29674 (Thread-7)
10-23 15:32:07.528 30482-30482/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-23 15:32:07.529 30482-30482/? A/DEBUG: Build fingerprint: 'HONOR/LLD-L31/HWLLD-H:8.0.0/HONORLLD-L31/144(C10):user/release-keys'
10-23 15:32:07.529 30482-30482/? A/DEBUG: Revision: '0'
10-23 15:32:07.529 30482-30482/? A/DEBUG: ABI: 'arm'
10-23 15:32:07.529 30482-30482/? A/DEBUG: pid: 29631, tid: 29674, name: Thread-7  >>> com.test.test <<<
10-23 15:32:07.529 30482-30482/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
10-23 15:32:07.529 30482-30482/? A/DEBUG: Cause: null pointer dereference
10-23 15:32:07.529 30482-30482/? A/DEBUG:     r0 dd868f00  r1 c77bfbe4  r2 c77bfbe0  r3 c77bfc98
10-23 15:32:07.529 30482-30482/? A/DEBUG:     r4 c77e4bac  r5 00000000  r6 c77bfc28  r7 c330147d
10-23 15:32:07.529 30482-30482/? A/DEBUG:     r8 c77bfe70  r9 00000000  sl b5ea9328  fp c77bfd54
10-23 15:32:07.529 30482-30482/? A/DEBUG:     ip c6d6208c  sp 00000000  lr 00000000  pc 00000000  cpsr 600f0010
10-23 15:32:07.529 30482-30482/? A/DEBUG: backtrace:
10-23 15:32:07.529 30482-30482/? A/DEBUG:     #00 pc 00000000  <unknown>

Question - what could it be? In which direction to dig? What do you advise?
Maybe you can somehow learn more backtrace?
In what cases can there be a SEGV_MAPERR error, can you please write specific examples?
I see that some pointer is null, but in another application that uses this library, everything works.
So the problem is on the application side, not c++.
Assets are the same, all functions in the java code are there (otherwise, when accessing a non-existent function, it would be a JNI_Error).
Maybe there are no resources from the res folder? Although that shouldn't be the reason.
What do you think?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question