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 triggered by slow operations in main thread #181

Open
iamfaizzy opened this issue Dec 24, 2024 · 0 comments
Open

ANR triggered by slow operations in main thread #181

iamfaizzy opened this issue Dec 24, 2024 · 0 comments
Assignees

Comments

@iamfaizzy
Copy link

ANRs are reporting on firebase when application is on background state on multiple OS/Devices.

image

This Function is called from Application's on create

 private void initMediaManager() {

        Map<String, String> config = new HashMap<>();
        
        config.put(AppConstants.Cloudinary.CLOUD_NAME_KEY, AppConstants.Cloudinary.CLOUD_NAME);
        
        MediaManager.init(this, config);
    }

Steps to reproduce

…As this reporting on firebase exact STR is not available to reproduce it.

Error screenshots or Stack Trace (if applicable) ANR 1 stacktrace

      main (runnable):tid=1 systid=6930 
   at com.cloudinary.android.MediaManager.<init>(MediaManager.java:66)
   at com.cloudinary.android.MediaManager.init(MediaManager.java:189)
   at com.cloudinary.android.MediaManager.init(MediaManager.java:145)
   at MyApp.initMediaManager(MyApp.java:224)
   at MyApp.onCreate(MyApp.java:200)
   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1316)
   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7917)
   at android.app.ActivityThread.-$$Nest$mhandleBindApplication(unavailable)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2646)
   at android.os.Handler.dispatchMessage(Handler.java:108)
   at android.os.Looper.loopOnce(Looper.java:226)
   at android.os.Looper.loop(Looper.java:328)
   at android.app.ActivityThread.main(ActivityThread.java:9224)
   at java.lang.reflect.Method.invoke(Native method)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)

ANR 2

image

main (native):tid=1 systid=9663 #00 pc 0xc6054 libc.so (__ioctl + 4) #01 pc 0x82550 libc.so (ioctl + 160) #02 pc 0x54cb8 libbinder.so (android::IPCThreadState::talkWithDriver(bool) + 304) #03 pc 0x55d24 libbinder.so (android::IPCThreadState::waitForResponse(android::Parcel*, int*) + 60) #04 pc 0x55a8c libbinder.so (android::IPCThreadState::transact(int, unsigned int, android::Parcel const&, android::Parcel*, unsigned int) + 188) #05 pc 0x4e130 libbinder.so (android::BpBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int) + 312) #06 pc 0x12895c libandroid_runtime.so (android_os_BinderProxy_transact(_JNIEnv*, _jobject*, int, _jobject*, _jobject*, int) + 316) at android.os.BinderProxy.transactNative(Native method) at android.os.BinderProxy.transact(BinderProxy.java:568) at android.app.job.IJobScheduler$Stub$Proxy.enqueue(IJobScheduler.java:338) at android.app.JobSchedulerImpl.enqueue(JobSchedulerImpl.java:56) at androidx.core.app.JobIntentService$JobWorkEnqueuer.enqueueWork(JobIntentService.java) at androidx.core.app.JobIntentService.enqueueWork(JobIntentService.java:527) at androidx.core.app.JobIntentService.enqueueWork(JobIntentService.java:505) at com.evernote.android.job.JobRescheduleService.startService(JobRescheduleService.java:46) at com.evernote.android.job.JobManager.<init>(JobManager.java:152) at com.evernote.android.job.JobManager.create(JobManager.java:104) at com.cloudinary.android.AndroidJobStrategy.init(AndroidJobStrategy.java) at com.cloudinary.android.MediaManager.<init>(MediaManager.java:81) at com.cloudinary.android.MediaManager.init(MediaManager.java:189) at com.cloudinary.android.MediaManager.init(MediaManager.java) at .MyApp.initMediaManager(MyApp.java:224) at .app.MyApp.onCreate(MyApp.java:200) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7233) at android.app.ActivityThread.access$1700(ActivityThread.java:292) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2172) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:255) at android.app.ActivityThread.main(ActivityThread.java:8224) at java.lang.reflect.Method.invoke(Native method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

Build System

[ ] Gradle

Is the issue reproducible only on a specific device?

[ ] No

Versions and Libraries (fill in the version numbers)

Cloudinary Android SDK version 0.0.0
Android version (minSDK 27 target SDK 34)
Kotlin version -1.8.0
JVM (of the dev environment) - 17
agp_version = '8.0.0'
Gradle - 8.0

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

No branches or pull requests

2 participants