Skip to content

OutOfMemoryError on Low-Memory Devices (Android 16, SDK 36) #17412

Description

@ianrcVLC

⚠️ 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. Install Nextcloud client from F-Droid on a low-memory Android 16 device.
  2. Connect to Nextcloud server instance.
  3. Navigate the app—open files, browse folders, interact via touch.
  4. After sustained interaction (variable duration), the app crashes with OutOfMemoryError.

Expected behaviour

App handles touch input events without unbounded memory growth.

Actual behaviour

App crashes. Heap reaches 256MB limit with <1% free after garbage collection. Even a 24-byte allocation fails.

Android version

16 (SDK 36)

Device brand and model

Ulefone Armor X32 Pro (GQ5021AH1)

Stock or custom OS?

Stock

Nextcloud android app version

340010090

Nextcloud server version

Nextcloud hosted on Pikapod.net 34.0.2-apache

Using a reverse proxy?

No

Android logs

Exception in thread "main" java.lang.OutOfMemoryError: Failed to allocate a 24 byte allocation with 2052080 free bytes and 2003KB until OOM, target footprint 268435454, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at com.pri.ai.PriInputMonitorPolicy.onDownEvent(PriInputMonitorPolicy.java:180)
at com.pri.ai.PriInputMonitorPolicy.onInterceptTouchEvent(PriInputMonitorPolicy.java:146)
at com.pri.ai.PriInputMonitorPolicy.onInputEvent(PriInputMonitorPolicy.java:126)
at android.view.ViewRootImpl.processRawInputEvent(ViewRootImpl.java:11283)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:11048)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:300)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.nextLegacy(MessageQueue.java:904)
at android.os.MessageQueue.next(MessageQueue.java:1016)
at android.os.Looper.loopOnce(Looper.java:196)
at android.os.Looper.loop(Looper.java:338)
at android.app.ActivityThread.main(ActivityThread.java:9122)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:614)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1022)

Server error logs

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions