MRAA on android crashes: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr

Hello,

We’ve been working sucessfully with some units of RockPi 4 but randomly we get some APP crashes with this error:

A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x50100000083 in tid 8074 (Thread-21), pid 6376 (package.name)

We’ve checked that is related with C native code, and more detailed, setting a gpo with MRAA library when Gpio_write (:554 mraaJNI.class) is called, but we don’t have more information about the error because is in native side.

Has anyone tested this API included in last Android 9 image, or could you try to reproduce this error?

Thanks very much in advance

Please share /data/tombstones/*

How can I upload a file?

I’ve tried pastebin but is limited to 512 kb.

Thanks

You can pack them all into a zip and share them via MEGA.

Sent by private message with wetransfer link. Thanks!

What is your use scenario? Do you have multithreaded operation?

 /**
 * Gpio object destructor, this will only unexport the gpio if we where
 * the owner
 */
~Gpio()
{
    mraa_gpio_stop(m_gpio);
}

You need to be careful not to set it to a local variable or the destructor will be called

Gpio’s API comes from:

All api function:

Hi,

We’re using multithread because Android may launch several tasks (onResume, onDestroy, etc) in different order and asynchronously.

So, we’ve modified our software to check gpio status, and we will take care about exports and unexports, avoiding to get resources when are disposed.

Thanks very much for all your help