Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANR in ConversationFragment.onResume() #3504

Open
adbenitez opened this issue Dec 17, 2024 · 4 comments
Open

ANR in ConversationFragment.onResume() #3504

adbenitez opened this issue Dec 17, 2024 · 4 comments
Labels

Comments

@adbenitez
Copy link
Member

caused by [libnative-utils.so] dc_marknoticed_chat:

 #00  pc 0x000000000004b20c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
    
  
      #01  pc 0x0000000000cd0088  /data/app/~~KPtQ_9O6KqxixjvNdrlq5Q==/chat.delta-loT4g48vjTcQzJYPVnLLJg==/lib/arm64/libnative-utils.so
    
  
      #02  pc 0x0000000000ccfba8  /data/app/~~KPtQ_9O6KqxixjvNdrlq5Q==/chat.delta-loT4g48vjTcQzJYPVnLLJg==/lib/arm64/libnative-utils.so
    
  
      #03  pc 0x0000000000e1e8f0  /data/app/~~KPtQ_9O6KqxixjvNdrlq5Q==/chat.delta-loT4g48vjTcQzJYPVnLLJg==/lib/arm64/libnative-utils.so
    
  
      #04  pc 0x0000000000e1f1ec  /data/app/~~KPtQ_9O6KqxixjvNdrlq5Q==/chat.delta-loT4g48vjTcQzJYPVnLLJg==/lib/arm64/libnative-utils.so
    
  
      #05  pc 0x0000000000822f6c  /data/app/~~KPtQ_9O6KqxixjvNdrlq5Q==/chat.delta-loT4g48vjTcQzJYPVnLLJg==/lib/arm64/libnative-utils.so (dc_marknoticed_chat+388)
    
  
      at com.b44t.messenger.DcContext.marknoticedChat (Native method)
    
  
      at org.thoughtcrime.securesms.ConversationFragment.onResume (ConversationFragment.java:214)
    
  
      at androidx.fragment.app.Fragment.performResume (Fragment.java:3180)
    
  
      at androidx.fragment.app.FragmentStateManager.resume (FragmentStateManager.java:606)
    
  
      at androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:285)
    
  
      at androidx.fragment.app.FragmentStore.moveToExpectedState (FragmentStore.java:113)
    
  
      at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1433)
    
  
      at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2977)
    
  
      at androidx.fragment.app.FragmentManager.dispatchResume (FragmentManager.java:2909)
    
  
      at androidx.fragment.app.FragmentController.dispatchResume (FragmentController.java:285)
    
  
      at androidx.fragment.app.FragmentActivity.onResumeFragments (FragmentActivity.java:334)
    
  
      at androidx.fragment.app.FragmentActivity.onPostResume (FragmentActivity.java:323)
    
  
      at androidx.appcompat.app.AppCompatActivity.onPostResume (AppCompatActivity.java:245)
    
  
      at android.app.Activity.performResume (Activity.java:8291)
    
  
      at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4547)
    
  
      at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4592)
    
  
      at android.app.servertransaction.ResumeActivityItem.execute (ResumeActivityItem.java:52)
    
  
      at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
    
  
      at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
    
  
      at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2125)
    
  
      at android.os.Handler.dispatchMessage (Handler.java:106)
    
  
      at android.os.Looper.loop (Looper.java:223)
    
  
      at android.app.ActivityThread.main (ActivityThread.java:7999)
    
  
      at java.lang.reflect.Method.invoke (Native method)
    
  
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:635)
    
  
      at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:947)
@adbenitez adbenitez added the bug label Dec 17, 2024
@adbenitez
Copy link
Member Author

some how the call to dcContext.marknoticedChat((int) chatId) is getting stuck

@r10s
Copy link
Member

r10s commented Dec 17, 2024

thanks for figuring that out! so then sth. might be wrong in core, and there may be situations where
marknoticedChat() does not return immediately? cc @link2xt

btw, it is ANR, not ARN :)

"ANR" is an abbreviation for the spanish term "Aplicación No Responde"

@adbenitez
Copy link
Member Author

oops! dyslexia! XD

@adbenitez adbenitez changed the title ARN in ConversationFragment.onResume() ANR in ConversationFragment.onResume() Dec 17, 2024
@iequidoo
Copy link
Contributor

chat::marknoticed_chat() only has 3 awaits and all of them are for SQL queries, though if it marks all messages in the archive as noticed, i think it may take noticeable time. Is this reproducible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants