Skip to content

Out of Memory when browsing photos in large folder #17190

@ClusterDuckster

Description

@ClusterDuckster

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Have large folder (12k photos and videos, 40gb)
  2. scroll through
  3. open a few photos, then go back keep scrolling
  4. repeat 3-4 times
  5. Out of memory exception

Expected behaviour

Even though its quite a tough situation with such a big folder, the app should make it work without throwing a hard OOM error. Like free up memory from previously watched content.

Actual behaviour

Cause of error

Exception in thread "Thread-42" java.lang.OutOfMemoryError: Failed to allocate a 52696 byte allocation with 1436800 free bytes and 1403KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
    at org.apache.jackrabbit.webdav.MultiStatus.getResponses(MultiStatus.java:128)
    at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.readData(ReadFolderRemoteOperation.java:131)
    at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.run(ReadFolderRemoteOperation.java:70)
    at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:193)
    at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:460)
    at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:275)
    at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:387)
    at java.lang.Thread.run(Thread.java:1563)

App information

  • ID: com.nextcloud.client
  • Version: 340000090
  • Build flavor: generic

Device information

  • Brand: google
  • Device: tegu
  • Model: Pixel 9a
  • Id: BP4A.260205.001
  • Product: tegu

Firmware

  • SDK: 36
  • Release: 16
  • Incremental: 2026060601

Android version

16

Device brand and model

Google Pixel9a

Stock or custom OS?

Custom (explain in "additional information")

Nextcloud android app version

34.0.0

Nextcloud server version

Nextcloud Hub 25

Using a reverse proxy?

I don't know

Android logs

No response

Server error logs

Additional information

Smartphone OS GrapheneOS
Nextcloud server by Hetzner storageshare

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions