You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
UCrop activity becomes disabled when an AsyncTask instance is run in the background and if the doInBackground method is in a loop or the task's thread is in a wait state.
What is the expected behavior?
UCrop activity should not stall/hang.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
It seems UCrop doesn't play well with AsyncTasks running in a foreground service?
Here's a simple class to reproduce this. Fist, launch the task and then launch UCrop. It could be Android's scheduling system. IDK.
publicclassAnActivityextendsAppCompatActivity {
@OverrideprotectedvoidonCreate(...){
// setup some views. Possibly a button to invoke uCropstartService(newIntent(this, AService.class));
}
}
publicstaticclassBlockingTaskextendsAsyncTask<Void, Void, Void> {
@OverrideprotectedVoiddoInBackground(Void... voids) {
Log.v("BlockingTask", "doInBackground");
try {
// Will block UCrop for 60 seconds.// Even wrapping #execute in another thread will still block UCropThread.sleep(TimeUnit.SECONDS.toMillis(60));
} catch (InterruptedExceptione) {
e.printStackTrace();
}
Log.v("BlockingTask", "doInBackground");
returnnull;
}
}
Please attach any image files, URL and stack trace that can be used to reproduce the bug.
Which versions of uCrop, and which Android API versions are affected by this issue? Did this work in previous versions of uCrop?
uCrop 2.2.3-native
SDK 28, Android Pie
EDIT
My solution was to move my worker method to a Thread class instead of using AsyncTask.
The text was updated successfully, but these errors were encountered:
SharkFourSix
changed the title
uCrop hangs if connected to the Internet is running in the background
uCrop hangs if connected to the Internet or an AsyncTask background thread is running
Jul 31, 2019
SharkFourSix
changed the title
uCrop hangs if connected to the Internet or an AsyncTask background thread is running
uCrop hangs due to the presence of an AsyncTask background thread in wait/sleep state or in loop
Aug 1, 2019
android10
#1202 android.content.ActivityNotFoundException
Unable to find explicit activity class {com.tencent.qcloud.tim.tuikit/com.yalantis.ucrop.UCropActivity}; have you declared this activity in your AndroidManifest.xml?
com.yalantis.ucrop.UCrop.start(UCrop.java:138)
The lower version can
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
UCrop activity becomes disabled when an AsyncTask instance is run in the background and if the
doInBackground
method is in a loop or the task's thread is in a wait state.What is the expected behavior?
UCrop activity should not stall/hang.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
It seems UCrop doesn't play well with AsyncTasks running in a foreground service?
Here's a simple class to reproduce this. Fist, launch the task and then launch UCrop. It could be Android's scheduling system. IDK.
Please attach any image files, URL and
stack trace
that can be used to reproduce the bug.Which versions of uCrop, and which Android API versions are affected by this issue? Did this work in previous versions of uCrop?
uCrop 2.2.3-native
SDK 28, Android Pie
EDIT
My solution was to move my worker method to a
Thread
class instead of using AsyncTask.The text was updated successfully, but these errors were encountered: