-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
app crash on browsing folder with a lot of photos #10338
Comments
From https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html:
So it seems that the queue is full. This is Android limitation (look for The solution is simple: stop using async tasks. |
@vladbejenaru How often does it happen? Was it a one-off event? |
hi. It happened only once. Suggestion to post here came from the crash and I thought it may help you. |
@vladbejenaru
It does, thank you. It's not that the bug is invalid - the problem is more widespread that this crash
stack trace suggests.
Thank you for reporting it.
|
Is #10284 a dup? |
#10203 as well? |
@svenb1234 We can try moving those tasks to a dedicated thread pool. That does not solve the fundamental issue of launching so many tasks that are not interruptible. If we make the queue deeper, we can cause some performance degradation when user scrolls down large list. If the task involves network I/O, this can get serious. Alternatively, we could just catch this exception and do not show a miniature. That would cause slight visual degradation, but won't cause excessive CPU load with large amount of bg tasks. @AlvaroBrey @tobiasKaminsky comments? |
I can't figure out how to trigger this, I get the following when trying to scroll fast enough to reach 128 tasks:
It looks like this cancellation might be failing in some cases? |
I have been getting this issue for the past month dismissed it at first cause I couldn't find a similar issue happening to someone else and because it happened once. But now it's happening everytime. What's more I am thinking that it's bricking my raspberry pi after a few minutes that the bug occurs. Forcing me to restart. This is the error log generated Cause of errorException in thread "main" java.util.concurrent.RejectedExecutionException: Task android.os.AsyncTask$3@10790db rejected from java.util.concurrent.ThreadPoolExecutor@2bd9778[Running, pool size = 17, active threads = 17, queued tasks = 128, completed tasks = 224]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2085)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394)
at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:651)
at com.owncloud.android.utils.DisplayUtils.setThumbnail(DisplayUtils.java:952)
at com.owncloud.android.ui.adapter.OCFileListDelegate.bindGridViewHolder(OCFileListDelegate.kt:92)
at com.owncloud.android.ui.adapter.OCFileListAdapter.onBindViewHolder(OCFileListAdapter.java:366)
at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7254)
at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7337)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6194)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6460)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6300)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6296)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2330)
at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:572)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
at androidx.recyclerview.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1395)
at androidx.recyclerview.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1136)
at androidx.recyclerview.widget.GridLayoutManager.scrollVerticallyBy(GridLayoutManager.java:386)
at androidx.recyclerview.widget.RecyclerView.scrollStep(RecyclerView.java:1972)
at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5476)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1004)
at android.view.Choreographer.doCallbacks(Choreographer.java:816)
at android.view.Choreographer.doFrame(Choreographer.java:748)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:990)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:280)
at android.app.ActivityThread.main(ActivityThread.java:6706)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) App information
Device information
Firmware
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Can any of the affected users give clear reproduction steps? Is it browsing in the normal files browser, or in the gallery/media screen? Also, does it happen immediately on opening the folder, or after some scrolling? |
Try putting a sleep into the thumbnail async task to slow it down a bit. I think async taks are not cancelled so they should easily accumulate triggering the condition. |
@AlvaroBrey no I am not using the media just browsing the folder normally. The issue does not happen with the media folder. I am not sure if videos play here but I tried to caputre it here |
Same issue here with Android 3.22.1 from PlayStore. |
For this issue/reason I gave up on Nextcloud (Docker install). I wanted to replace Onedrive but Android app is crashing every time on my 4000+ pics folder. Additionally, thumbnails display is painfully slow |
I have the same problem, always when trying to explore a Folder with all my Fotos and Videos: Cause of errorException in thread "main" java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 977488 free bytes and 954KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
at java.lang.Float.valueOf(Float.java:467)
at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.getAnimatedValue(PropertyValuesHolder.java:1359)
at android.animation.ValueAnimator.getAnimatedValue(ValueAnimator.java:948)
at com.elyeproj.loaderviewlibrary.LoaderController.onAnimationUpdate(LoaderController.java:136)
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1653)
at android.animation.ValueAnimator.animateBasedOnTime(ValueAnimator.java:1440)
at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1572)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:307)
at android.animation.AnimationHandler.-$$Nest$mdoAnimationFrame(Unknown Source:0)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:86)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1299)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309)
at android.view.Choreographer.doCallbacks(Choreographer.java:923)
at android.view.Choreographer.doFrame(Choreographer.java:847)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) App information
Device information
Firmware
|
You are not the only one. The nextcloud app is still half baked. I wonder, and I guess you do as well, that nextcloud is already a really big project, but still the mobile app is behaving beta....sometimes even alpha. Missing thumbnails, crashing, slow, hanging, strange implementation of android notifications, some features just dont work yet. In short - unrealiable at best. For realiable file upload, I am using FolderSync (https://play.google.com/store/apps/details?id=dk.tacit.android.foldersync.lite&pcampaignid=web_share). |
Cause of error
App information
com.nextcloud.client
30200190
gplay
Device information
Xiaomi
clover
MI PAD 4 PLUS
OPM1.171019.019
clover
Firmware
27
8.1.0
V10.3.1.0.ODJCNXM
The text was updated successfully, but these errors were encountered: