Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

抖音模式使用ExoVideoView内存溢出 #826

Open
NewHuLe opened this issue Apr 19, 2023 · 0 comments
Open

抖音模式使用ExoVideoView内存溢出 #826

NewHuLe opened this issue Apr 19, 2023 · 0 comments

Comments

@NewHuLe
Copy link

NewHuLe commented Apr 19, 2023

使用版本号:最新的3.3.7
使用场景:抖音播放模式,参考TikTok2Activity实现,如果有2个页面都采用抖音的播放模式,并且播放的核心是ExoVideoView,打开一个页面播放滑动几下,然后打开另外一个页面滑动播放几下,内存溢出概率很高,然而使用VideoView就没有这个问题。
我想咨询一下大佬:1.抖音模式适合使用Exo么 2.内存溢出是Exo内部问题么 3.为啥推荐使用Exo
错误日志如下:
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw an exception; no stack trace available A java_vm_ext.cc:594] JNI DETECTED ERROR IN APPLICATION: JNI NewObjectV called with pending exception java.lang.OutOfMemoryError: Failed to allocate a 40 byte allocation with 4984 free bytes and 4984B until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC. java_vm_ext.cc:594] at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2) java_vm_ext.cc:594] at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:335) java_vm_ext.cc:594] at boolean android.os.Looper.loopOnce(android.os.Looper, long, int) (Looper.java:161) java_vm_ext.cc:594] at void android.os.Looper.loop() (Looper.java:288) java_vm_ext.cc:594] at void android.os.HandlerThread.run() (HandlerThread.java:67) java_vm_ext.cc:594] java_vm_ext.cc:594] in call to NewObjectV java_vm_ext.cc:594] from void android.os.MessageQueue.nativePollOnce(long, int) A runtime.cc:675] Runtime aborting... runtime.cc:675] Dumping all threads without mutator lock held runtime.cc:675] All threads: runtime.cc:675] DALVIK THREADS (120): runtime.cc:675] "ExoPlayer:FrameReleaseChoreographer" prio=5 tid=34 Runnable runtime.cc:675] | group="" sCount=0 ucsCount=0 flags=0 obj=0x12ccb160 self=0xb4000072acdf1fb0 runtime.cc:675] | sysTid=10048 nice=0 cgrp=default sched=1073741824/0 handle=0x70b3b9bcb0 runtime.cc:675] | state=R schedstat=( 268049003 12168304 270 ) utm=25 stm=1 core=6 HZ=100 runtime.cc:675] | stack=0x70b3a98000-0x70b3a9a000 stackSize=1039KB runtime.cc:675] | held mutexes= "abort lock" "mutator lock"(shared held) runtime.cc:675] native: #00 pc 00000000005374cc /apex/com.android.art/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+128) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #01 pc 00000000006f0d94 /apex/com.android.art/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+236) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #02 pc 00000000006fe620 /apex/com.android.art/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+208) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #03 pc 00000000003641d4 /apex/com.android.art/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+440) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #04 pc 00000000006fcdc0 /apex/com.android.art/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool)+280) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #05 pc 00000000006d7d94 /apex/com.android.art/lib64/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+212) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #06 pc 00000000006d29f4 /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+1016) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #07 pc 0000000000016ea8 /apex/com.android.art/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+80) (BuildId: b77c57f68a484ed93d5a7eda59d83bf9) runtime.cc:675] native: #08 pc 0000000000016450 /apex/com.android.art/lib64/libbase.so (android::base::LogMessage::~LogMessage()+352) (BuildId: b77c57f68a484ed93d5a7eda59d83bf9) runtime.cc:675] native: #09 pc 0000000000445024 /apex/com.android.art/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1612) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #10 pc 00000000003292b8 /apex/com.android.art/lib64/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+108) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #11 pc 000000000048d39c /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...) (.__uniq.99033978352804627313491551960229047428)+144) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #12 pc 000000000045373c /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*) (.__uniq.99033978352804627313491551960229047428)+4244) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) runtime.cc:675] native: #13 pc 000000000057c50c /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::NewObjectV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list) (.__uniq.99033978352804627313491551960229047428.llvm.5591279935177935698)+224) (BuildId: 97fdb979efb7d2b596fa4fceabaad95b) A runtime.cc:675] native: #14 pc 00000000000c0718 /system/lib64/libandroid_runtime.so (_JNIEnv::NewObject(_jclass*, _jmethodID*, ...)+120) (BuildId: fbcdbadbe2eb1e8f8ff78894f151cdf6) runtime.cc:675] native: #15 pc 0000000000125ac4 /system/lib64/libandroid_runtime.so (android::createJavaVsyncEventData(_JNIEnv*, android::gui::VsyncEventData)+116) (BuildId: fbcdbadbe2eb1e8f8ff78894f151cdf6) runtime.cc:675] native: #16 pc 0000000000125964 /system/lib64/libandroid_runtime.so (android::NativeDisplayEventReceiver::dispatchVsync(long, android::PhysicalDisplayId, unsigned int, android::gui::VsyncEventData)+228) (BuildId: fbcdbadbe2eb1e8f8ff78894f151cdf6) runtime.cc:675] native: #17 pc 00000000000ba4d4 /system/lib64/libgui.so (android::DisplayEventDispatcher::handleEvent(int, int, void*)+276) (BuildId: 36faafc4971ad8ac2ae708b9cf40f21f) runtime.cc:675] native: #18 pc 0000000000018224 /system/lib64/libutils.so (android::Looper::pollInner(int)+1060) (BuildId: 10aac5d4a671e4110bc00c9b69d83d8a) runtime.cc:675] native: #19 pc 0000000000017da0 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: 10aac5d4a671e4110bc00c9b69d83d8a) runtime.cc:675] native: #20 pc 000000000015f4bc /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44) (BuildId: fbcdbadbe2eb1e8f8ff78894f151cdf6) runtime.cc:675] at android.os.MessageQueue.nativePollOnce(Native method) runtime.cc:675] at android.os.MessageQueue.next(MessageQueue.java:335) runtime.cc:675] at android.os.Looper.loopOnce(Looper.java:161) runtime.cc:675] at android.os.Looper.loop(Looper.java:288) runtime.cc:675] at android.os.HandlerThread.run(HandlerThread.java:67) runtime.cc:675] runtime.cc:675] "main" prio=10 tid=1 Blocked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant