Spanish ANR: Native method - android.os.MessageQueue.nativePollOnce (Solucionado)

Gustsp

Member
Licensed User
Buen Dia

Tengo el error ANR, que creeria esta relacionado con FirebaseMessaging, ya he migrado al módulo Receiver como describe Erel en
https://www.b4x.com/android/forum/t...-messages-firebase-cloud-messaging-fcm.67716/

El error fatal se produce aun cuando no se envia mensajes y no es en todos los dispositivos, mayormente en android 10 para arriba.

Este el el codigo del modulo
FirebaseMessaging:
Sub Process_Globals
    Private fm As FirebaseMessaging
  
End Sub
'ver https://www.b4x.com/android/forum/threads/firebasenotifications-push-messages-firebase-cloud-messaging-fcm.67716/
'Called when an intent is received.
'Do not assume that anything else, including the starter service, has run before this method.
Private Sub Receiver_Receive (FirstTime As Boolean, StartingIntent As Intent)
    If FirstTime Then
        fm.Initialize("fm")
    End If
    fm.HandleIntent(StartingIntent)
End Sub


Public Sub SubscribeToTopics
    Dim Empresa As String
    Dim Sucursal As String' ="001"
    Dim PvCod As String
    Dim PvAll As String ="pv000"
    Try
      
  
        Empresa=Mdl.EmpDatosACT.EmpresaCUIT
        Sucursal=NumberFormat(  Mdl.EmpDatosACT.EmpresaSucursal,3,0)
        PvCod="pv" & NumberFormat( Mdl.EmpDatosACT.PVNro,3,0)
      
  
            Log (Empresa & Sucursal & PvCod)
            'fm.SubscribeToTopic("general") 'you can subscribe to more topics
            fm.SubscribeToTopic(Empresa & Sucursal) 'you can subscribe to more topics
            fm.SubscribeToTopic(Empresa & Sucursal & PvCod) 'you can subscribe to more topics
            fm.SubscribeToTopic(Empresa & Sucursal & PvAll) 'you can subscribe to more topics
      
    Catch
        Log(LastException)
    End Try
'    $data = [
'    'activity' =>$app_push->activity,
'    'image' =>$app_push->image,
'    'subText' => $app_push->subtext,
'    'title' =>$app_push->title,
'    'body' => $app_push->body
'    ];
End Sub

 
Sub fm_MessageArrived (Message As RemoteMessage)
    Log("Message arrived")
    Log($"Message data: ${Message.GetData}"$)
    'Msgbox("Message arrived","Siii")
    Dim n As Notification
    n.Initialize
    n.Icon = "icon" ' 'De esta manera no hay que especificar icono, coje el icono de la app
    n.AutoCancel=True ''Quita la notificación al pulsar sobre ella
    N.Vibrate = True       'Vibrará al recibirse un nuevo mensaje
    N.Sound = True        ' hará el sonido predeterminado
    N.Light = True            'Se encenderá la luz de notificaciones si está disponible
    n.SetInfo2(Message.GetData.Get("title"), Message.GetData.Get("body"),Message.GetData.Get("id"), Notificaciones)
    n.Notify(Message.GetData.Get("id"))
  
End Sub

Sub fm_TokenRefresh (Token As String)
    Log("TokenRefresh: " & Token)
End Sub

el codigo ANR que me esta aparecindo en el playstore es
ANR: Native method - android.os.MessageQueue.nativePollOnce:
"main" tid=1 Native
  #00  pc 0x00000000000d1208  /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
  #01  pc 0x0000000000018120  /system/lib64/libutils.so (android::Looper::pollInner(int)+144)
  #02  pc 0x0000000000017ff0  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56)
  #03  pc 0x000000000013ec9c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
  at android.os.MessageQueue.nativePollOnce (Native method)
  at android.os.MessageQueue.next (MessageQueue.java:336)
  at android.os.Looper.loop (Looper.java:181)
  at android.app.ActivityThread.main (ActivityThread.java:7590)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:539)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:950)

"Signal Catcher" tid=7 Runnable
  #00  pc 0x00000000004121d4  /apex/com.android.runtime/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
  #01  pc 0x00000000004f9b50  /apex/com.android.runtime/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+512)
  #02  pc 0x000000000051448c  /apex/com.android.runtime/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+828)
  #03  pc 0x000000000050d2b0  /apex/com.android.runtime/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+456)
  #04  pc 0x000000000050c794  /apex/com.android.runtime/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+1964)
  #05  pc 0x000000000050be74  /apex/com.android.runtime/lib64/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char>>&)+844)
  #06  pc 0x00000000004c7288  /apex/com.android.runtime/lib64/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char>>&)+200)
  #07  pc 0x00000000004db6c0  /apex/com.android.runtime/lib64/libart.so (art::SignalCatcher::HandleSigQuit()+1352)
  #08  pc 0x00000000004da76c  /apex/com.android.runtime/lib64/libart.so (art::SignalCatcher::Run(void*)+252)
  #09  pc 0x00000000000e6b50  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #10  pc 0x0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Jit thread pool worker thread 0" tid=2 Native
  #00  pc 0x000000000008043c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x000000000014c1f4  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
  #02  pc 0x0000000000515eec  /apex/com.android.runtime/lib64/libart.so (art::ThreadPool::GetTask(art::Thread*)+256)
  #03  pc 0x0000000000515278  /apex/com.android.runtime/lib64/libart.so (art::ThreadPoolWorker::Run()+144)
  #04  pc 0x0000000000514d38  /apex/com.android.runtime/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+148)
  #05  pc 0x00000000000e6b50  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #06  pc 0x0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"FinalizerDaemon" tid=8 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:442)
  at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:190)
  at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:211)
  at java.lang.Daemons$FinalizerDaemon.runInternal (Daemons.java:273)
  at java.lang.Daemons$Daemon.run (Daemons.java:139)
  at java.lang.Thread.run (Thread.java:919)

"ReferenceQueueDaemon" tid=9 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:442)
  at java.lang.Object.wait (Object.java:568)
  at java.lang.Daemons$ReferenceQueueDaemon.runInternal (Daemons.java:217)
  at java.lang.Daemons$Daemon.run (Daemons.java:139)
  at java.lang.Thread.run (Thread.java:919)

"HeapTaskDaemon" tid=10 Waiting
  #00  pc 0x0000000000080440  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
  #01  pc 0x000000000014c62c  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::TimedWait(art::Thread*, long, int)+168)
  #02  pc 0x000000000029020c  /apex/com.android.runtime/lib64/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*)+508)
  #03  pc 0x0000000000290a58  /apex/com.android.runtime/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+92)
  at dalvik.system.VMRuntime.runHeapTasks (Native method)
  at java.lang.Daemons$HeapTaskDaemon.runInternal (Daemons.java:525)
  at java.lang.Daemons$Daemon.run (Daemons.java:139)
  at java.lang.Thread.run (Thread.java:919)

"FinalizerWatchdogDaemon" tid=11 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:442)
  at java.lang.Object.wait (Object.java:568)
  at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded (Daemons.java:341)
  at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal (Daemons.java:321)
  at java.lang.Daemons$Daemon.run (Daemons.java:139)
  at java.lang.Thread.run (Thread.java:919)

"Binder:26064_1" tid=12 Native
  #00  pc 0x00000000000d1344  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
  #01  pc 0x000000000008b7b0  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
  #02  pc 0x0000000000058dfc  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244)
  #03  pc 0x0000000000058fd8  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #04  pc 0x00000000000597b0  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+64)
  #05  pc 0x000000000007f8dc  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
  #06  pc 0x0000000000013654  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
  #07  pc 0x00000000000c4cb8  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
  #08  pc 0x00000000000e6b50  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #09  pc 0x0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Binder:26064_2" tid=13 Native
  #00  pc 0x00000000000d1344  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
  #01  pc 0x000000000008b7b0  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
  #02  pc 0x0000000000058dfc  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244)
  #03  pc 0x0000000000058fd8  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #04  pc 0x00000000000597dc  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+108)
  #05  pc 0x000000000007f8dc  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
  #06  pc 0x0000000000013654  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
  #07  pc 0x00000000000c4cb8  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
  #08  pc 0x00000000000e6b50  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #09  pc 0x0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Binder:26064_3" tid=14 Native
  #00  pc 0x00000000000d1344  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
  #01  pc 0x000000000008b7b0  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
  #02  pc 0x0000000000058dfc  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244)
  #03  pc 0x0000000000058fd8  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #04  pc 0x00000000000597dc  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+108)
  #05  pc 0x000000000007f8dc  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
  #06  pc 0x0000000000013654  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
  #07  pc 0x00000000000c4cb8  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
  #08  pc 0x00000000000e6b50  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #09  pc 0x0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Profile Saver" tid=15 Native
  #00  pc 0x000000000008043c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x000000000014c1f4  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
  #02  pc 0x0000000000347dcc  /apex/com.android.runtime/lib64/libart.so (art::ProfileSaver::Run()+632)
  #03  pc 0x000000000034bcb8  /apex/com.android.runtime/lib64/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+88)
  #04  pc 0x00000000000e6b50  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #05  pc 0x0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Firebase-Messaging-Init" tid=16 Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2067)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1120)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:849)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.1.0:2)
  at java.lang.Thread.run (Thread.java:919)

"Firebase-Messaging-Topics-Io" tid=17 Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2067)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1120)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:849)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.1.0:2)
  at java.lang.Thread.run (Thread.java:919)

"ScionFrontendApi" tid=20 Timed Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:919)

"GmsDynamite" tid=18 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:442)
  at java.lang.Object.wait (Object.java:568)
  at com.google.android.gms.dynamite.zza.run (com.google.android.gms:play-services-basement@@18.1.0:2)

"RenderThread" tid=22 Native
  #00  pc 0x00000000000d1208  /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
  #01  pc 0x0000000000018120  /system/lib64/libutils.so (android::Looper::pollInner(int)+144)
  #02  pc 0x0000000000017ff0  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56)
  #03  pc 0x00000000002de960  /system/lib64/libhwui.so (android::uirenderer::ThreadBase::waitForWork()+132)
  #04  pc 0x00000000002de76c  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+576)
  #05  pc 0x0000000000013654  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
  #06  pc 0x00000000000e6b50  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #07  pc 0x0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Measurement Worker" tid=23 Timed Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:442)
  at iw.run (:com.google.android.gms.dynamite_measurementdynamite@[email protected] (100400-0):7)

"queued-work-looper" tid=21 Native
  #00  pc 0x00000000000d1208  /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
  #01  pc 0x0000000000018120  /system/lib64/libutils.so (android::Looper::pollInner(int)+144)
  #02  pc 0x0000000000017ff0  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56)
  #03  pc 0x000000000013ec9c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
  at android.os.MessageQueue.nativePollOnce (Native method)
  at android.os.MessageQueue.next (MessageQueue.java:336)
  at android.os.Looper.loop (Looper.java:181)
  at android.os.HandlerThread.run (HandlerThread.java:67)

"firebase-installations-executor-1" tid=24 Timed Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:919)

"firebase-installations-executor-2" tid=25 Timed Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:919)

"pool-9-thread-1" tid=26 Timed Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill (SynchronousQueue.java:461)
  at java.util.concurrent.SynchronousQueue$TransferStack.transfer (SynchronousQueue.java:362)
  at java.util.concurrent.SynchronousQueue.poll (SynchronousQueue.java:937)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:919)

"magnifier pixel copy result handler" tid=3 Native
  #00  pc 0x00000000000d1208  /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
  #01  pc 0x0000000000018120  /system/lib64/libutils.so (android::Looper::pollInner(int)+144)
  #02  pc 0x0000000000017ff0  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+56)
  #03  pc 0x000000000013ec9c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
  at android.os.MessageQueue.nativePollOnce (Native method)
  at android.os.MessageQueue.next (MessageQueue.java:336)
  at android.os.Looper.loop (Looper.java:181)
  at android.os.HandlerThread.run (HandlerThread.java:67)

"AsyncTask #3" tid=4 Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill (SynchronousQueue.java:459)
  at java.util.concurrent.SynchronousQueue$TransferStack.transfer (SynchronousQueue.java:362)
  at java.util.concurrent.SynchronousQueue.take (SynchronousQueue.java:920)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:919)

"Binder:26064_4" tid=5 Native
  #00  pc 0x00000000000d1344  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
  #01  pc 0x000000000008b7b0  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
  #02  pc 0x0000000000058dfc  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244)
  #03  pc 0x0000000000058fd8  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
  #04  pc 0x00000000000597dc  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+108)
  #05  pc 0x000000000007f8dc  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
  #06  pc 0x0000000000013654  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
  #07  pc 0x00000000000c4cb8  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
  #08  pc 0x00000000000e6b50  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #09  pc 0x0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"GAC_Executor[0]" tid=6 Timed Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.1.0:2)
  at java.lang.Thread.run (Thread.java:919)

"GAC_Executor[1]" tid=27 Timed Waiting
  at sun.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.1.0:2)
  at java.lang.Thread.run (Thread.java:919)
 

Attachments

  • fallo.png
    fallo.png
    31.8 KB · Views: 78
  • imagen_2023-04-28_103126418.png
    imagen_2023-04-28_103126418.png
    27.7 KB · Views: 73
Last edited:

josejad

Expert
Licensed User
Longtime User
Hola:

Al parecer, por lo que leo en el foro, un ANR (application not responding) indica que la aplicación no está respondiendo, por lo que no tiene pinta de que sea por FCM.
Echa un ojo a la explicación de Erel sobre qué es un ANR y qué suele provocarlo, y en este hilo, algunos ejemplos que pueden provocarlo.
Comprueba en tu código que no tengas bucles, funciones o llamadas que tarden mucho en responder (leer archivos, consultar base de datos, etc...) y compruebas que las hagas de forma asíncrona.

saludos,
 

Gustsp

Member
Licensed User

josejad

Expert
Licensed User
Longtime User
Puedes probar a poner en el foro en inglés esos enlaces y tu problema a ver si Erel tiene constancia o alguna solución.

saludos,
 

Gustsp

Member
Licensed User
Buenas
Al parecer he logrado solucionar el error, que posiblemente se producía porque la app se detenía al quedar en segundo plano. por lo que ya no estaba activa y al dispararse el evento el servicio no respondía.

Cambie

B4X:
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_NEVER

Por
B4X:
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS
Service.AutomaticForegroundNotification = Null

Y mágicamente se soluciono y como efecto secundario la app funciona 100% mejor... ya no pierde datos cuando queda en 2do plano que también me tenia preocupado.

Espero que a alguien le sirva

Saludos
 
Last edited:
Top