I am developing an application in flutter, I am using a preloadpageview and cached video player plugin to play videos by urls from my database, after playing 15 to 20 videos, my app is shutting down and logcat is prompting error like this. I am initialising a video in initstate and disposing the video widget as well.
video widget code:
@override
void initState() {
super.initState();
controller = CachedVideoPlayerController.network(mediaUrl);
_initializeVideoPlayerFuture = controller.initialize();
controller.setLooping(true);
}
buildvideopreview(){
return FutureBuilder(
future: _initializeVideoPlayerFuture,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return Stack(fit: StackFit.expand,
children: <Widget>[
AspectRatio(
aspectRatio: controller.value.aspectRatio,
child: VisibilityDetector(
key: Key(postId),
onVisibilityChanged: (VisibilityInfo info){
print("${info.visibleFraction} of my widget is visible");
if(info.visibleFraction == 1 && controller != null){
print('===========playing');
controller.play();
}
else{
print('============pause');
controller.pause();
}
},
child: CachedVideoPlayer(controller),
)
),
Center(
child: showheart
? Image(
image: AssetImage('assets/gifs/heart.gif')
)
: SizedBox()
),
Center(
child: ispaused
? Image(
width: 100,
height: 100,
image: AssetImage('assets/images/pause.png')
)
: SizedBox()
)
],
);
} else {
return Center(
child: Container(
width: 100,
height: 100,
child:
// circularProgress(),
Image(
image: AssetImage('assets/gifs/loadermain.gif')
),
),
);
}
},
);
}
@override
void dispose() {
super.dispose();
postcontroller.dispose();
}
main page(preload pageview):
PreloadPageView.builder(
scrollDirection: Axis.vertical,
controller: postscontroller,
preloadPagesCount: 5,
itemCount: posts.length,
physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) {
Post post = posts[index];
return post;
});
Error:
Throwing OutOfMemoryError "Failed to allocate a 336 byte allocation with 0 free bytes and 0B until OOM, target footprint 402654152, growth limit 402653184" (VmSize 9519664 kB)
on HeapTrim for 838.787ms
I/.imsunil.peopl(31137): Starting a blocking GC Alloc
I/.imsunil.peopl(31137): Clamp target GC heap from 400MB to 384MB
I/.imsunil.peopl(31137): Alloc concurrent copying GC freed 0(0B) AllocSpace objects, 0(0B) LOS objects, 0% free, 384MB/384MB, paused 65us total 39.915ms
I/.imsunil.peopl(31137): Forcing collection of SoftReferences for 64KB allocation
I/.imsunil.peopl(31137): Starting a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Clamp target GC heap from 400MB to 384MB
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
I/.imsunil.peopl(31137): Waiting for a blocking GC Alloc
utm=184 stm=54 core=6 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x7106961000-0x7106963000 stackSize=1023KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read /proc/self/task/31144/stack)
F/.imsunil.peopl(31137): runtime.cc:630] native: #00 pc 000000000008014c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
F/.imsunil.peopl(31137): runtime.cc:630] native: #01 pc 000000000014b1f4 /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
F/.imsunil.peopl(31137): runtime.cc:630] native: #02 pc 00000000005146c0 /apex/com.android.runtime/lib64/libart.so (art::ThreadPool::GetTask(art::Thread*)+256)
F/.imsunil.peopl(31137): runtime.cc:630] native: #03 pc 0000000000513a4c /apex/com.android.runtime/lib64/libart.so (art::ThreadPoolWorker::Run()+144)
F/.imsunil.peopl(31137): runtime.cc:630] native: #04 pc 000000000051350c /apex/com.android.runtime/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+148)
F/.imsunil.peopl(31137): runtime.cc:630] native: #05 pc 00000000000e8930 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
F/.imsunil.peopl(31137): runtime.cc:630] native: #06 pc 0000000000085094 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
F/.imsunil.peopl(31137): runtime.cc:630] (no managed stack frames)
F/.imsunil.peopl(31137): runtime.cc:630]
F/.imsunil.peopl(31137): runtime.cc:630] "Signal Catcher" prio=10 tid=5 WaitingInMainSignalCatcherLoop
F/.imsunil.peopl(31137): runtime.cc:630] | group="" sCount=1 dsCount=0 flags=1 obj=0x12c00078 self=0x71976f7000
F/.imsunil.peopl(31137): runtime.cc:630] | sysTid=31149 nice=0 cgrp=default sched=0/0 handle=0x710595ad50
F/.imsunil.peopl(31137): runtime.cc:630] | state=S schedstat=( 978958 6594323 7 ) utm=0 stm=0 core=5 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x7105864000-0x7105866000 stackSize=991KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read /proc/self/task/31149/stack)
F/.imsunil.peopl(31137): runtime.cc:630] native: #00 pc 00000000000d3268 /apex/com.android.runtime/lib64/bionic/libc.so (__rt_sigtimedwait+8)
F/.imsunil.peopl(31137): runtime.cc:630] native: #01 pc 0000000000090148 /apex/com.android.runtime/lib64/bionic/libc.so (sigwait+68)
F/.imsunil.peopl(31137): runtime.cc:630] native: #02 pc 00000000004da1d0 /apex/com.android.runtime/lib64/libart.so (art::SignalCatcher::WaitForSignal(art::Thread*, art::SignalSet&)+392)
F/.imsunil.peopl(31137): runtime.cc:630] native: #03 pc 00000000004d8f50 /apex/com.android.runtime/lib64/libart.so (art::SignalCatcher::Run(void*)+268)
F/.imsunil.peopl(31137): runtime.cc:630] native: #04 pc 00000000000e8930 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
F/.imsunil.peopl(31137): runtime.cc:630] native: #05 pc 0000000000085094 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
F/.imsunil.peopl(31137): runtime.cc:630] (no managed stack frames)
F/.imsunil.peopl(31137): runtime.cc:630]
F/.imsunil.peopl(31137): runtime.cc:630] "ADB-JDWP Connection Control Thread" prio=10 tid=8 WaitingInMainDebuggerLoop
F/.imsunil.peopl(31137): runtime.cc:630] | group="" sCount=1 dsCount=0 flags=1 obj=0x12c000f0 self=0x710526c800
F/.imsunil.peopl(31137): runtime.cc:630] | sysTid=31150 nice=0 cgrp=default sched=0/0 handle=0x710585dd50
F/.imsunil.peopl(31137): runtime.cc:630] | state=S schedstat=( 6899537 3956038 15 ) utm=0 stm=0 core=1 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x7105767000-0x7105769000 stackSize=991KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read /proc/self/task/31150/stack)
F/.imsunil.peopl(31137): runtime.cc:630] native: #00 pc 00000000000d3168 /apex/com.android.runtime/lib64/bionic/libc.so (__ppoll+8)
F/.imsunil.peopl(31137): runtime.cc:630] native: #01 pc 000000000008dbec /apex/com.android.runtime/lib64/bionic/libc.so (poll+88)
F/.imsunil.peopl(31137): runtime.cc:630] native: #02 pc 0000000000008e24 /apex/com.android.runtime/lib64/libadbconnection.so (adbconnection::AdbConnectionState::RunPollLoop(art::Thread*)+824)
F/.imsunil.peopl(31137): runtime.cc:630] native: #03 pc 000000000000721c /apex/com.android.runtime/lib64/libadbconnection.so (adbconnection::CallbackFunction(void*)+1076)
F/.imsunil.peopl(31137): runtime.cc:630] native: #04 pc 00000000000e8930 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
F/.imsunil.peopl(31137): runtime.cc:630] native: #05 pc 0000000000085094 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
F/.imsunil.peopl(31137): runtime.cc:630] (no managed stack frames)
F/.imsunil.peopl(31137): runtime.cc:630]
F/.imsunil.peopl(31137): runtime.cc:630] "ReferenceQueueDaemon" prio=10 tid=9 Waiting
F/.imsunil.peopl(31137): runtime.cc:630] | group="" sCount=1 dsCount=0 flags=1 obj=0x12c00168 self=0x7100bec000
F/.imsunil.peopl(31137): runtime.cc:630] | sysTid=31152 nice=4 cgrp=default sched=0/0 handle=0x70a8d95d50
F/.imsunil.peopl(31137): runtime.cc:630] | state=S schedstat=( 45776091 76168070 359 ) utm=2 stm=2 core=6 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x70a8c93000-0x70a8c95000 stackSize=1039KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read /proc/self/task/31152/stack)
F/.imsunil.peopl(31137): runtime.cc:630] native: #00 pc 000000000008014c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
F/.imsunil.peopl(31137): runtime.cc:630] native: #01 pc 000000000014b1f4 /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
F/.imsunil.peopl(31137): runtime.cc:630] native: #02 pc 000000000040c0e4 /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, long, int, bool, art::ThreadState)+620)
F/.imsunil.peopl(31137): runtime.cc:630] native: #03 pc 000000000040db44 /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, art::ObjPtr<art::mirror::Object>, long, int, bool, art::ThreadState)+284)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Object.wait(Native method)
F/.imsunil.peopl(31137): runtime.cc:630] - waiting on <0x077da922> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Object.wait(Object.java:442)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Object.wait(Object.java:568)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$ReferenceQueueDaemon.runInternal(Daemons.java:220)
F/.imsunil.peopl(31137): runtime.cc:630] - locked <0x077da922> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$Daemon.run(Daemons.java:142)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Thread.run(Thread.java:919)
F/.imsunil.peopl(31137): runtime.cc:630]
F/.imsunil.peopl(31137): runtime.cc:630] "FinalizerDaemon" prio=10 tid=10 WaitingForGcToComplete
F/.imsunil.peopl(31137): runtime.cc:630] | group="" sCount=1 dsCount=0 flags=1 obj=0x12c001e0 self=0x7100bedc00
F/.imsunil.peopl(31137): runtime.cc:630] | sysTid=31153 nice=4 cgrp=default sched=0/0 handle=0x70a8c8cd50
F/.imsunil.peopl(31137): runtime.cc:630] | state=S schedstat=( 197406407 93751169 663 ) utm=15 stm=4 core=7 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x70a8b8a000-0x70a8b8c000 stackSize=1039KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read /proc/self/task/31153/stack)
F/.imsunil.peopl(31137): runtime.cc:630] native: #00 pc 000000000008014c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
F/.imsunil.peopl(31137): runtime.cc:630] native: #01 pc 000000000014b1f4 /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
F/.imsunil.peopl(31137): runtime.cc:630] native: #02 pc 0000000000243ecc /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::WaitForGcToCompleteLocked(art::gc::GcCause, art::Thread*)+444)
F/.imsunil.peopl(31137): runtime.cc:630] native: #03 pc 0000000000248fdc /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::CollectGarbageInternal(art::gc::collector::GcType, art::gc::GcCause, bool)+836)
F/.imsunil.peopl(31137): runtime.cc:630] native: #04 pc 000000000024d1d8 /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::AllocateInternalWithGc(art::Thread*, art::gc::AllocatorType, bool, unsigned long, unsigned long*, unsigned long*, unsigned long*, art::ObjPtr<art::mirror::Class>*)+1196)
F/.imsunil.peopl(31137): runtime.cc:630] native: #05 pc 0000000000580ed4 /apex/com.android.runtime/lib64/libart.so (artAllocObjectFromCodeInitializedRegionTLAB+376)
F/.imsunil.peopl(31137): runtime.cc:630] native: #06 pc 000000000013e078 /apex/com.android.runtime/lib64/libart.so (art_quick_alloc_object_initialized_region_tlab+104)
F/.imsunil.peopl(31137): runtime.cc:630] native: #07 pc 00000000020b5650 /memfd:/jit-cache (deleted) (com.android.internal.os.BinderInternal$GcWatcher.finalize+368)
F/.imsunil.peopl(31137): runtime.cc:630] native: #08 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
F/.imsunil.peopl(31137): runtime.cc:630] native: #09 pc 0000000000144fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244)
F/.imsunil.peopl(31137): runtime.cc:630] native: #10 pc 00000000002e2674 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384)
F/.imsunil.peopl(31137): runtime.cc:630] native: #11 pc 00000000002dd8d4 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892)
F/.imsunil.peopl(31137): runtime.cc:630] native: #12 pc 000000000059ff90 /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+648)
F/.imsunil.peopl(31137): runtime.cc:630] native: #13 pc 0000000000130814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20)
F/.imsunil.peopl(31137): runtime.cc:630] native: #14 pc 00000000001b3bc2 /apex/com.android.runtime/javalib/core-libart.jar (java.lang.Daemons$FinalizerDaemon.doFinalize+22)
F/.imsunil.peopl(31137): runtime.cc:630] native: #15 pc 00000000005a255c /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1100)
F/.imsunil.peopl(31137): runtime.cc:630] native: #16 pc 0000000000130914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20)
F/.imsunil.peopl(31137): runtime.cc:630] native: #17 pc 00000000001b3cb4 /apex/com.android.runtime/javalib/core-libart.jar (java.lang.Daemons$FinalizerDaemon.runInternal+164)
F/.imsunil.peopl(31137): runtime.cc:630] native: #18 pc 00000000005a0250 /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352)
F/.imsunil.peopl(31137): runtime.cc:630] native: #19 pc 0000000000130814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20)
F/.imsunil.peopl(31137): runtime.cc:630] native: #20 pc 00000000001b39b6 /apex/com.android.runtime/javalib/core-libart.jar (java.lang.Daemons$Daemon.run+50)
F/.imsunil.peopl(31137): runtime.cc:630] native: #21 pc 00000000005a1a70 /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788)
F/.imsunil.peopl(31137): runtime.cc:630] native: #22 pc 0000000000130a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20)
F/.imsunil.peopl(31137): runtime.cc:630] native: #23 pc 00000000000ea9a0 /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Thread.run+8)
F/.imsunil.peopl(31137): runtime.cc:630] native: #24 pc 00000000002b3988 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.16775679700042528677+240)
F/.imsunil.peopl(31137): runtime.cc:630] native: #25 pc 00000000005914f8 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032)
F/.imsunil.peopl(31137): runtime.cc:630] native: #26 pc 000000000013f468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
F/.imsunil.peopl(31137): runtime.cc:630] native: #27 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
F/.imsunil.peopl(31137): runtime.cc:630] native: #28 pc 0000000000144fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244)
F/.imsunil.peopl(31137): runtime.cc:630] native: #29 pc 00000000004afefc /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
F/.imsunil.peopl(31137): runtime.cc:630] native: #30 pc 00000000004b1010 /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416)
F/.imsunil.peopl(31137): runtime.cc:630] native: #31 pc 00000000004f19cc /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176)
F/.imsunil.peopl(31137): runtime.cc:630] native: #32 pc 00000000000e8930 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
F/.imsunil.peopl(31137): runtime.cc:630] native: #33 pc 0000000000085094 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
F/.imsunil.peopl(31137): runtime.cc:630] at com.android.internal.os.BinderInternal$GcWatcher.finalize(BinderInternal.java:63)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:294)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:281)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$Daemon.run(Daemons.java:142)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Thread.run(Thread.java:919)
F/.imsunil.peopl(31137): runtime.cc:630]
F/.imsunil.peopl(31137): runtime.cc:630] "FinalizerWatchdogDaemon" prio=10 tid=11 Sleeping
F/.imsunil.peopl(31137): runtime.cc:630] | group="" sCount=1 dsCount=0 flags=1 obj=0x12c00288 self=0x7100bef800
F/.imsunil.peopl(31137): runtime.cc:630] | sysTid=31154 nice=4 cgrp=default sched=0/0 handle=0x70a8b83d50
F/.imsunil.peopl(31137): runtime.cc:630] | state=S schedstat=( 1896305 12050676 28 ) utm=0 stm=0 core=6 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x70a8a81000-0x70a8a83000 stackSize=1039KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read /proc/self/task/31154/stack)
F/.imsunil.peopl(31137): runtime.cc:630] native: #00 pc 0000000000080150 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
F/.imsunil.peopl(31137): runtime.cc:630] native: #01 pc 000000000014b62c /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::TimedWait(art::Thread*, long, int)+168)
F/.imsunil.peopl(31137): runtime.cc:630] native: #02 pc 000000000040c0f8 /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, long, int, bool, art::ThreadState)+640)
F/.imsunil.peopl(31137): runtime.cc:630] native: #03 pc 000000000040db44 /apex/com.android.runtime/lib64/libart.so (art::Monitor::Wait(art::Thread*, art::ObjPtr<art::mirror::Object>, long, int, bool, art::ThreadState)+284)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Thread.sleep(Native method)
F/.imsunil.peopl(31137): runtime.cc:630] - sleeping on <0x0c558fb3> (a java.lang.Object)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Thread.sleep(Thread.java:440)
F/.imsunil.peopl(31137): runtime.cc:630] - locked <0x0c558fb3> (a java.lang.Object)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Thread.sleep(Thread.java:356)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$FinalizerWatchdogDaemon.sleepForMillis(Daemons.java:388)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:416)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal(Daemons.java:328)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$Daemon.run(Daemons.java:142)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Thread.run(Thread.java:919)
F/.imsunil.peopl(31137): runtime.cc:630]
F/.imsunil.peopl(31137): runtime.cc:630] "HeapTaskDaemon" prio=10 tid=12 WaitingForGcToComplete
F/.imsunil.peopl(31137): runtime.cc:630] | group="" sCount=1 dsCount=0 flags=1 obj=0x12c00308 self=0x7197712c00
F/.imsunil.peopl(31137): runtime.cc:630] | sysTid=31151 nice=4 cgrp=default sched=0/0 handle=0x70a8e9ed50
F/.imsunil.peopl(31137): runtime.cc:630] | state=S schedstat=( 7529784650 1145399312 4822 ) utm=640 stm=112 core=7 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x70a8d9c000-0x70a8d9e000 stackSize=1039KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read(art::gc::Heap::WaitForGcToCompleteLocked(art::gc::GcCause, art::Thread*)+444)
F/.imsunil.peopl(31137): runtime.cc:630] native: #03 pc 00000000002504dc /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::WaitForGcToComplete(art::gc::GcCause, art::Thread*)+412)
F/.imsunil.peopl(31137): runtime.cc:630] native: #04 pc 000000000025bf9c /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::ConcurrentGC(art::Thread*, art::gc::GcCause, bool)+68)
F/.imsunil.peopl(31137): runtime.cc:630] native: #05 pc 0000000000261bb0 /apex/com.android.runtime/lib64/libart.so (art::gc::Heap::ConcurrentGCTask::Run(art::Thread*)+36)
F/.imsunil.peopl(31137): runtime.cc:630] native: #06 pc 000000000028f8b0 /apex/com.android.runtime/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+64)
F/.imsunil.peopl(31137): runtime.cc:630] at dalvik.system.VMRuntime.runHeapTasks(Native method)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$HeapTaskDaemon.runInternal(Daemons.java:528)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Daemons$Daemon.run(Daemons.java:142)
F/.imsunil.peopl(31137): runtime.cc:630] at java.lang.Thread.run(Thread.java:919)
F/.imsunil.peopl(31137): runtime.cc:630]
F/.imsunil.peopl(31137): runtime.cc:630] "Binder:31137_1" prio=10 tid=13 Native
F/.imsunil.peopl(31137): runtime.cc:630] | group="" sCount=1 dsCount=0 flags=1 obj=0x12c00380 self=0x70f4b4b800
F/.imsunil.peopl(31137): runtime.cc:630] | sysTid=31155 nice=0 cgrp=default sched=0/0 handle=0x70a897cd50
F/.imsunil.peopl(31137): runtime.cc:630] | state=S schedstat=( 6275306 17591983 80 ) utm=0 stm=0 core=6 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x70a8886000-0x70a8888000 stackSize=991KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read /proc/self/task/31155/stack)
F/.imsunil.peopl(31137): runtime.cc:630] native: #00 pc 00000000000d3124 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
F/.imsunil.peopl(31137): runtime.cc:630] native: #01 pc 000000000008bbd8 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
F/.imsunil.peopl(31137): runtime.cc:630] native: #02 pc 0000000000059e58 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244)
F/.imsunil.peopl(31137): runtime.cc:630] native: #03 pc 000000000005a034 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
F/.imsunil.peopl(31137): runtime.cc:630] native: #04 pc 000000000005a80c /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+80)
F/.imsunil.peopl(31137): runtime.cc:630] native: #05 pc 0000000000080990 /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
F/.imsunil.peopl(31137): runtime.cc:630] native: #06 pc 00000000000135f0 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+328)
F/.imsunil.peopl(31137): runtime.cc:630] native: #07 pc 00000000000c4ac0 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)
F/.imsunil.peopl(31137): runtime.cc:630] native: #08 pc 00000000000e8930 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
F/.imsunil.peopl(31137): runtime.cc:630] native: #09 pc 0000000000085094 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
F/.imsunil.peopl(31137): runtime.cc:630] (no managed stack frames)
F/.imsunil.peopl(31137): runtime.cc:630]
F/.imsunil.peopl(31137): runtime.cc:630] "Binder:31137_2" prio=10 tid=14 Native
F/.imsunil.peopl(31137): runtime.cc:630] | group="" sCount=1 dsCount=0 flags=1 obj=0x12c003f8 self=0x710527e000
F/.imsunil.peopl(31137): runtime.cc:630] | sysTid=31156 nice=0 cgrp=default sched=0/0 handle=0x70a387fd50
F/.imsunil.peopl(31137): runtime.cc:630] | state=S schedstat=( 19512649 30759737 112 ) utm=1 stm=0 core=3 HZ=100
F/.imsunil.peopl(31137): runtime.cc:630] | stack=0x70a3789000-0x70a378b000 stackSize=991KB
F/.imsunil.peopl(31137): runtime.cc:630] | held mutexes=
F/.imsunil.peopl(31137): runtime.cc:630] kernel: (couldn't read /proc/self/task/31156/stack)
F/.imsunil.peopl(31137): runtime.cc:630] native: #00 pc 00000000000d3124 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
F/.imsunil.peopl(31137): runtime.cc:630] native: #01 pc 000000000008bbd8 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
F/.imsunil.peopl(31137): runtime.cc:630] native: #02 pc 0000000000059e58 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244)
F/libc (31137): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 31137 (.imsunil.people), pid 31137 (.imsunil.people)
Process name is com.imsunil.people, not key_process
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Realme/RMX1851/RMX1851:10/QKQ1.190918.001/1590390095:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2020-07-21 20:35:13+0530
pid: 31137, tid: 31137, name: .imsunil.people >>> com.imsunil.people <<<
uid: 10377
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'JNI DETECTED ERROR IN APPLICATION: JNI CallObjectMethodV called with pending exception java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw an exception; no stack trace available
(Throwable with no stack trace)
in call to CallObjectMethodV
from void android.os.MessageQueue.nativePollOnce(long, int)'
x0 0000000000000000 x1 00000000000079a1 x2 0000000000000006 x3 0000007ff94b0430
x4 fefeff7093863f97 x5 fefeff7093863f97 x6 fefeff7093863f97 x7 7f7f7f7fffff7fff
x8 00000000000000f0 x9 c9437a093e9bd480 x10 0000000000000001 x11 0000000000000000
x12 fffffff0fffffbdf x13 ffffffffffffffff x14 0000000000000004 x15 ffffffffffffffff
x16 00000071939008c8 x17 00000071938dc9a0 x18 0000007197db4000 x19 00000000000079a1
x20 00000000000079a1 x21 00000000ffffffff x22 000000707eb46700 x23 0000007111118625
x24 000000711113a189 x25 0000000000000001 x26 000000711173b258 x27 00000071976d16d0
x28 0000007111643338 x29 0000007ff94b04d0
sp 0000007ff94b0410 lr 000000719388c5ec pc 000000719388c618
As you see the exception, you get the idea that your application is consuming plenty of RAM of the device.
You need to manage that memory leak in your flutter application.
Android and iOS OS allocate every application a limited amount of RAM in order to manage all processes at the same time.
If any of the applications use more RAM than their allocation, OS stops all processes of that application. and we see it as a crash.
In your case, you are playing multiple videos in your application, and all videos are caught videos. As they are caught videos, they are temporarily saved in RAM, and as you see more and more videos, you are using more and more RAM.
You need to optimize your application, you can clear video after page changes.
With that, you can control your memory leak.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With