uxcam / flutter-plugin

BSD 3-Clause "New" or "Revised" License
4 stars 10 forks source link

OutOfMemoryError exception on flutter android build #53

Closed ahmed-osama-saad closed 6 months ago

ahmed-osama-saad commented 6 months ago

I'm getting a repeated exception on the android build of my flutter app.

flutter_uxcam version: ^2.4.7

Flutter (Channel stable, 3.13.7, on macOS 14.1.1 23B81 darwin-arm64, locale en-GB) • Flutter version 3.13.7 on channel stable at /opt/homebrew/Caskroom/flutter/3.10.6/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2f708eb839 (7 months ago), 2023-10-09 09:58:08 -0500 • Engine revision a794cf2681 • Dart version 3.1.3 • DevTools version 2.25.0

Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 134217744 byte allocation with 25165824 free bytes and 122MB until OOM, target footprint 97961808, growth limit 201326592
       at java.util.Arrays.copyOf(Arrays.java:3161)
       at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
       at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
       at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
       at com.uxcam.internals.iv.a(iv.java:86)
       at com.uxcam.internals.fu.b(fu.java:288)
       at com.uxcam.internals.fu.a(fu.java:331)
       at com.uxcam.internals.fu.a(fu.java:3)
       at com.uxcam.internals.is.a(is.java:527)
       at com.uxcam.internals.ir.onResponse(ir.java:143)
       at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.java:60)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:920)
DFDIEGOH commented 6 months ago

Hi @ahmed-osama-saad -

The recommended approach will be to upgrade this to the latest version, which is 2.5.2 which also includes different improvements and fixes targeting this specific OOM crashes.

Closing this ticket, as this has been fixed in the latest version (2.5.2)