Hello
i am using runtime permitions to listen to new sms messages
strangley when i am playing with the "allow/deny" options the app crash
i get the following in the logs
here is the code i suspect is the cause
any ideas ?
i am using runtime permitions to listen to new sms messages
strangley when i am playing with the "allow/deny" options the app crash
i get the following in the logs
B4X:
running waiting messages (1)
** Activity (main) Resume **
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x41c8000041c80000 in tid 5359 (b4a.example), pid 5359 (b4a.example)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'HUAWEI/STK-L21M/HWSTK-HF:9/HUAWEISTK-L21/9.1.0.223C185:user/release-keys'
Revision: '0'
ABI: 'arm64'
Happend: 'Mon Aug 19 17:05:54 2019
'
SYSVMTYPE: Art
APPVMTYPE: Art
pid: 5359, tid: 5359, name: b4a.example >>> b4a.example <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x41c8000041c80000
x0 0000000000000001 x1 0000007fe5eac7f8 x2 0000000000000008 x3 ffffffffa2a977e8
x4 0007575760000000 x5 0000007fe5eac068 x6 000000700eab2000 x7 0000000006530296
x8 41c8000041c80000 x9 0000000100000000 x10 0000003e630ea2f3 x11 0000000023c911d9
x12 0000000000000016 x13 000000005d5a9eb2 x14 0001908b01b12600 x15 00000a6214bff932
x16 0000006f7119fba0 x17 000000700c1b2e14 x18 000000001557e240 x19 0000006f882c7bc0
x20 0000006f882c7c68 x21 0000000000000000 x22 0000006f64d3c330 x23 000000000000006b
x24 0000006f64d3c318 x25 0000007fe5eac878 x26 0000000000000002 x27 0000000000000001
x28 000000000000006b x29 0000007fe5eac9d0
sp 0000007fe5eac830 lr 00000070096962d0 pc 00000070096962dc
backtrace:
#00 pc 00000000000142dc /system/lib64/libutils.so (android::Looper::pollInner(int)+948)
#01 pc 0000000000013e8c /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+60)
#02 pc 000000000012a6ec /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
#03 pc 000000000042a35c /system/framework/arm64/boot-framework.oat (offset 0x415000) (android.media.MediaExtractor.seekTo [DEDUPED]+140)
#04 pc 0000000000bb5b14 /system/framework/arm64/boot-framework.oat (offset 0x415000) (android.os.MessageQueue.next+276)
#05 pc 0000000000bb29fc /system/framework/arm64/boot-framework.oat (offset 0x415000) (android.os.Looper.loop+716)
#06 pc 0000000000945d24 /system/framework/arm64/boot-framework.oat (offset 0x415000) (android.app.ActivityThread.main+1236)
#07 pc 000000000056f24c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#08 pc 00000000000d4224 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#09 pc 0000000000472fd4 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#10 pc 0000000000474a28 /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
#11 pc 00000000004043ac /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
#12 pc 00000000001456d4 /system/framework/arm64/boot.oat (offset 0x13b000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
#13 pc 0000000000edcd68 /system/framework/arm64/boot-framework.oat (offset 0x415000) (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136)
#14 pc 0000000000ee3d8c /system/framework/arm64/boot-framework.oat (offset 0x415000) (com.android.internal.os.ZygoteInit.main+2540)
#15 pc 000000000056f24c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#16 pc 00000000000d4224 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#17 pc 0000000000472fd4 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#18 pc 0000000000472c34 /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424)
#19 pc 0000000000367254 /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652)
#20 pc 00000000000b9810 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120)
#21 pc 00000000000bc588 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+780)
#22 pc 0000000000002368 /system/bin/app_process64 (main+1444)
#23 pc 00000000000ae7e4 /system/lib64/libc.so (__libc_init+88)
here is the code i suspect is the cause
B4X:
Sub AskForSms
If rp.Check(rp.PERMISSION_RECEIVE_SMS) = False Then 'if there is no prevoius permition
Dim msgboxresult As Int = Msgbox2("Allow sms access to auto verify yournumber ?", "Auto number verification", "Yes", "", "No", Null)
If msgboxresult = DialogResponse.Positive Then
rp.CheckAndRequest(rp.PERMISSION_RECEIVE_SMS)
Wait For Activity_PermissionResult (Permission As String, result As Boolean)
If Permission = rp.PERMISSION_RECEIVE_SMS And result = True Then
sms.Initialize("sms")
End If
End If
End If
End Sub
any ideas ?