juha-h / baresip-studio

baresip library based SIP client for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v59.0.3 crashes on registration

pfactum opened this issue · comments

Hello.

Thank you for your work on baresip for Android!

After the v59.0.3 upgrade my baresip client started to crash immediately after opening the application during the registration stage.

I'm using it on Samsung A52 5G with the newest stock firmware. On a PBX side there's latest Asterisk v21.0.0. It uses SIP over TLS on a non-standard port backed by a Let's Encrypt certificate.

In the Asterisk logs I see that registration succeeds, but immediately after that the client deregisters and crashes.

I tried clearing the app cache as well as wiping its data completely and re-creating account, but got no luck. The app is installed from F-Droid.

Should I collect more data on this, please let me know how.

Please help.

Thanks.

I think this is the stacktrace:

10-27 23:30:40.233 19621 19621 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-27 23:30:40.233 19621 19621 F DEBUG   : Build fingerprint: 'samsung/a52xqnaeea/a52xq:13/TP1A.220624.014/A526BXXS5EWI1:user/release-keys'
10-27 23:30:40.233 19621 19621 F DEBUG   : Revision: '5'
10-27 23:30:40.233 19621 19621 F DEBUG   : ABI: 'arm64'
10-27 23:30:40.233 19621 19621 F DEBUG   : Processor: '6'
10-27 23:30:40.233 19621 19621 F DEBUG   : Timestamp: 2023-10-27 23:30:39.888002914+0200
10-27 23:30:40.233 19621 19621 F DEBUG   : Process uptime: 2s
10-27 23:30:40.233 19621 19621 F DEBUG   : Cmdline: com.tutpro.baresip
10-27 23:30:40.233 19621 19621 F DEBUG   : pid: 19450, tid: 19568, name: Thread-3  >>> com.tutpro.baresip <<<
10-27 23:30:40.233 19621 19621 F DEBUG   : uid: 10606
10-27 23:30:40.233 19621 19621 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000008
10-27 23:30:40.233 19621 19621 F DEBUG   : Cause: null pointer dereference
10-27 23:30:40.233 19621 19621 F DEBUG   :     x0  0000000000000000  x1  b400007d75bcd710  x2  b400007d75bcd710  x3  0000007c51eafec8
10-27 23:30:40.233 19621 19621 F DEBUG   :     x4  0000000000000014  x5  0000007c53962932  x6  00000000000001d9  x7  7f7f7f7f7f7f7f7f
10-27 23:30:40.233 19621 19621 F DEBUG   :     x8  0000000000000000  x9  0000000000000000  x10 0000000000000030  x11 000000000000000e
10-27 23:30:40.233 19621 19621 F DEBUG   :     x12 0000000000002d54  x13 0000007c51eafe70  x14 ffffff0000000000  x15 ffffffffffffffff
10-27 23:30:40.233 19621 19621 F DEBUG   :     x16 0000007c53f75d68  x17 0000007c53ae336c  x18 0000007c494e4000  x19 b400007dd5ca88a0
10-27 23:30:40.233 19621 19621 F DEBUG   :     x20 0000000000000000  x21 0000007c51eb1000  x22 0000007c51eb0010  x23 0000000000000000
10-27 23:30:40.233 19621 19621 F DEBUG   :     x24 0000007c51eb1000  x25 b400007db5b7db74  x26 b400007db5b7db00  x27 00000000000001f7
10-27 23:30:40.233 19621 19621 F DEBUG   :     x28 0000000000000001  x29 0000007c51eafec0
10-27 23:30:40.233 19621 19621 F DEBUG   :     lr  0000007c53ae10d8  sp  0000007c51eafeb0  pc  0000007c53ae336c  pst 0000000060001000
10-27 23:30:40.233 19621 19621 F DEBUG   : backtrace:
10-27 23:30:40.234 19621 19621 F DEBUG   :       #00 pc 00000000002e036c  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (rtprecv_metric+0) (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #01 pc 00000000002de0d4  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #02 pc 000000000030de3c  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (mem_deref+56) (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #03 pc 00000000002cc740  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #04 pc 000000000030de3c  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (mem_deref+56) (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #05 pc 00000000002d10f8  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #06 pc 000000000030de3c  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (mem_deref+56) (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #07 pc 00000000002e2cbc  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (ua_handle_options+444) (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #08 pc 00000000002e5cc8  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #09 pc 0000000000336678  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #10 pc 0000000000336b70  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #11 pc 0000000000320220  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #12 pc 000000000030ac94  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (re_main+984) (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #13 pc 00000000002c58a0  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/base.apk!libbaresip.so (Java_com_tutpro_baresip_BaresipService_baresipStart+2028) (BuildId: 536379d1349c222caff78a1e717e2f2d2822e9c7)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #14 pc 0000000000461d54  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 4c9b59b74ca9272f710a71137164c349)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #15 pc 000000000020a2b0  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 4c9b59b74ca9272f710a71137164c349)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #16 pc 00000000001b0088  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/oat/arm64/base.vdex (com.tutpro.baresip.BaresipService.onStartCommand$lambda$2+52)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #17 pc 0000000000209334  /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 4c9b59b74ca9272f710a71137164c349)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #18 pc 00000000001aff5e  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/oat/arm64/base.vdex (com.tutpro.baresip.BaresipService.$r8$lambda$SEpNQ3EVjmamh2FrDQyu5wDzT5k+0)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #19 pc 0000000000209334  /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 4c9b59b74ca9272f710a71137164c349)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #20 pc 00000000003aa528  /data/app/~~2rV47Qv8-BSmnlD7vlbUcw==/com.tutpro.baresip-sikiv0hfrkJ_Hbwlx4fNYA==/oat/arm64/base.vdex (com.tutpro.baresip.BaresipService$$ExternalSyntheticLambda11.run+8)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #21 pc 00000000003fe910  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+80)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #22 pc 000000000045836c  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+556) (BuildId: 4c9b59b74ca9272f710a71137164c349)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #23 pc 00000000004841e4  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+156) (BuildId: 4c9b59b74ca9272f710a71137164c349)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #24 pc 0000000000483eb0  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+400) (BuildId: 4c9b59b74ca9272f710a71137164c349)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #25 pc 00000000005cc668  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1680) (BuildId: 4c9b59b74ca9272f710a71137164c349)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #26 pc 00000000000ba5a8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: ef11d8d2511bfd3cab1588a6cb2014bb)
10-27 23:30:40.234 19621 19621 F DEBUG   :       #27 pc 0000000000053e9c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: ef11d8d2511bfd3cab1588a6cb2014bb)

How did you get the stacktrace?

I just installed it and I've been having trouble setting up my voip but I did something that causes it to crash.

I downloaded and installed the app from here and it works. :-)

@pfactum Looks like the crash shown in the backtrace happens when baresip received OPTIONS request.. I'll try to reproduce.

@bjlockie Are you telling that the app crashes when installed from F-Droid and does not crash when installed from GitHub or what? Debugging info is here https://github.com/juha-h/baresip-studio/wiki/Debugging.

How did you get the stacktrace?

USB debugging + adb logcat as described in the wiki above.

I did install the github apk alongside the fdroid version before I uninstalled the fdroid version and I may have installed the older github baresip+ before I installed this latest baresip.
I only got the crash from the fdroid version.
I'll try the fdroid version again.

Turned out that the crash is caused by a recent commit in baresip library when OPTIONS request is received. I'll create a new version when the bug is fixed.

I uninstalled the github version and installed it from fdroid and it didn't crash.
Weird and hard to debug. :-(

I created new baresip version 59.0.4 and baresip+ version 46.1.1 that should fix the crash whenever F-Droid has built and published them. They are already available on GitHub. Reopen if the issue prevails.

A new version has just arrived to F-Droid, and it fixes the issue for me. Thank you.