08-23 21:38:50.513 9363 9363 E AndroidRuntime: java.lang.RuntimeException: Firebase Database encountered an OutOfMemoryError. You may need to reduce the amount of data you are syncing to the client (e.g. by using queries or syncing a deeper path). See https://firebase.google.com/docs/database/ios/structure-data#best_practices_for_data_structure and https://firebase.google.com/docs/database/android/retrieve-data#filtering_data08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.google.android.gms.internal.firebase_database.zzs.run(Unknown Source:6)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:789)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)08-23 21:38:50.513 9363 9363 E AndroidRuntime: Caused by: java.lang.OutOfMemoryError: pthread_create (1040KB stack) failed: Try again08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.lang.Thread.nativeCreate(Native Method)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.lang.Thread.start(Thread.java:733)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at bew.a(:com.google.android.gms.dynamite_dynamitemodulesc@12874023@12.8.74 (040400-204998136):25)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at bcm.a(:com.google.android.gms.dynamite_dynamitemodulesc@12874023@12.8.74 (040400-204998136):24)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at bdt.a(:com.google.android.gms.dynamite_dynamitemodulesc@12874023@12.8.74 (040400-204998136):14)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at bdt.a(:com.google.android.gms.dynamite_dynamitemodulesc@12874023@12.8.74 (040400-204998136):5)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at nd.onTransact(:com.google.android.gms.dynamite_dynamitemodulesc@12874023@12.8.74 (040400-204998136):12)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.os.Binder.transact(Binder.java:612)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.google.android.gms.internal.firebase_database.zza.transactAndReadExceptionReturnVoid(Unknown Source:7)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.google.firebase.database.connection.idl.zzp.zzf(Unknown Source:8)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.google.firebase.database.connection.idl.zzae.zzf(Unknown Source:2)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.google.android.gms.internal.firebase_database.zzcb.zzf(Unknown Source:2)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.google.android.gms.internal.firebase_database.zzl.onFailure(Unknown Source:17)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.google.android.gms.tasks.zzl.run(Unknown Source:27)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:266)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)08-23 21:38:54.298 9363 9387 F libc : /usr/local/google/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type St9bad_alloc: std::bad_alloc" failed08-23 21:38:54.299 9363 9387 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 9387 (1.ui)08-23 21:38:54.810 12393 12393 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***08-23 21:38:54.811 12393 12393 F DEBUG : Build fingerprint: 'samsung/dream2qltesq/dream2qltesq:8.0.0/R16NW/G955USQU5CRG3:user/release-keys'08-23 21:38:54.811 12393 12393 F DEBUG : Revision: '12'08-23 21:38:54.811 12393 12393 F DEBUG : ABI: 'arm'08-23 21:38:54.811 12393 12393 F DEBUG : pid: 9363, tid: 9387, name: 1.ui >>> io.myapp<<<08-23 21:38:54.811 12393 12393 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------08-23 21:38:54.830 12393 12393 F DEBUG : Abort message: '/usr/local/google/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type St9bad_alloc: std::bad_alloc" failed'08-23 21:38:54.830 12393 12393 F DEBUG : r0 00000000 r1 000024ab r2 00000006 r3 0000000808-23 21:38:54.830 12393 12393 F DEBUG : r4 00002493 r5 000024ab r6 c9b6d2f8 r7 0000010c08-23 21:38:54.830 12393 12393 F DEBUG : r8 c91cec85 r9 c9b6ddfc sl 7f5ff948 fp c9777dd808-23 21:38:54.830 12393 12393 F DEBUG : ip 00000000 sp c9b6d2e8 lr e7771a17 pc e77a2ba8 cpsr 200d001008-23 21:38:54.840 12393 12393 F DEBUG : 08-23 21:38:54.840 12393 12393 F DEBUG : backtrace:08-23 21:38:54.840 12393 12393 F DEBUG : #00 pc 0004bba8 /system/lib/libc.so (tgkill+12)08-23 21:38:54.840 12393 12393 F DEBUG : #01 pc 0001aa13 /system/lib/libc.so (abort+54)08-23 21:38:54.840 12393 12393 F DEBUG : #02 pc 0001f2f9 /system/lib/libc.so (__libc_fatal+24)08-23 21:38:54.840 12393 12393 F DEBUG : #03 pc 0001aedd /system/lib/libc.so (__assert2+16)08-23 21:38:54.840 12393 12393 F DEBUG : #04 pc 004afd11 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.840 12393 12393 F DEBUG : #05 pc 004afdd5 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.840 12393 12393 F DEBUG : #06 pc 004ae8f9 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.840 12393 12393 F DEBUG : #07 pc 004ae469 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.840 12393 12393 F DEBUG : #08 pc 004ae9cf /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #09 pc 003ad397 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #10 pc 003f359f /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #11 pc 003a6f23 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #12 pc 003a8057 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #13 pc 003a7c21 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #14 pc 003b7ef7 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #15 pc 003bb2f3 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #16 pc 0036358b /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #17 pc 003638f9 /data/app/io.myapp-sCfKdUvIHAX92SAAftOvCw==/lib/arm/libflutter.so08-23 21:38:54.841 12393 12393 F DEBUG : #18 pc 0000241c /data/data/io.myapp/app_flutter/vm_snapshot_instr08-23 21:41:04.436 13731 13750 F libc : /usr/local/google/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type St9bad_alloc: std::bad_alloc" failed08-23 21:41:04.436 13731 13750 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 13750 (1.ui)08-23 21:41:04.734 16898 16898 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Greetings Flutter Experts,I've been working on an app for a while and love the Flutter experience overall. Recently, however, I've run into a bit of a puzzler. On one of my tester's phones (Samsung S8+), the application crashes when trying to hydrate its Firebase connection with an OutOfMemoryError. I've noticed that the app runs around 100MB with spikes as high as 200MB. Is that usual for a Flutter app? Is that somehow blowing a memory limit on his phone? Also, on my own Galaxy S7, the app runs fine (that's where I measured the memory).Below is the debug output from his device - though to me it shows nothing more than a standard OOM while spinning up a thread.Does flutter chew memory more than a native app would (thinking about rendering buffers, etc)?Any thoughts on how best to resolve this issue?Best,pete--------------------------------------------------
08-23 21:38:50.513 9363 9363 E AndroidRuntime: java.lang.RuntimeException: Firebase Database encountered an OutOfMemoryError. You may need to reduce the amount of data you are syncing to the client (e.g. by using queries or syncing a deeper path). See https://firebase.google.com/docs/database/ios/structure-data#best_practices_for_data_structure and https://firebase.google.com/docs/database/android/retrieve-data#filtering_data08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.google.android.gms.internal.firebase_database.zzs.run(Unknown Source:6)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:789)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6938)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)08-23 21:38:50.513 9363 9363 E AndroidRuntime: Caused by: java.lang.OutOfMemoryError: pthread_create (1040KB stack) failed: Try again08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.lang.Thread.nativeCreate(Native Method)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at java.lang.Thread.start(Thread.java:733)
08-23 21:38:50.513 9363 9363 E AndroidRuntime: at bew.a(:com.google.android.gms.dynamite_dynamitemodulesc@1287...@12.8.74 (040400-204998136):25)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at bcm.a(:com.google.android.gms.dynamite_dynamitemodulesc@1287...@12.8.74 (040400-204998136):24)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at bdt.a(:com.google.android.gms.dynamite_dynamitemodulesc@1287...@12.8.74 (040400-204998136):14)08-23 21:38:50.513 9363 9363 E AndroidRuntime: at bdt.a(:com.google.android.gms.dynamite_dynamitemodulesc@1287...@12.8.74 (040400-204998136):5)
I'm sure I'm not loading the root node of the database. In this case, even if I were, there is only a tiny amount of data in the database - so it shouldn't matter. The first action I take with the DB is a write and that isn't happening - so we must be crashing before.
Is it weird that it happens on one device and not the other? Is there is an Android setting that restricts RAM per process?