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

请教:使用FrameAnimation引发的FileMAP:OOM #52

Open
PXzyn opened this issue Jul 1, 2023 · 2 comments
Open

请教:使用FrameAnimation引发的FileMAP:OOM #52

PXzyn opened this issue Jul 1, 2023 · 2 comments

Comments

@PXzyn
Copy link

PXzyn commented Jul 1, 2023

你好,使用FrameAnimation有一些问题想要请教下您,可能加个qq啊,方便沟通

当前遇到的问题:
出现了FileMAP:OOM
代码中写:
1、framAnimation与OnStop绑定(动画暂停),是不是不合适呢
2、一个frameAnimation控件,不断加载不同的Asset文件

这种写法是不是不太对

烦请您加一个qq(2857035110),感谢

@PXzyn
Copy link
Author

PXzyn commented Jul 1, 2023

dvm_lock_sample: [com.jac.app.energycenter,0,FA-3DecodeThread,143,AssetManager.java,754,java.io.InputStream android.content.res.AssetManager.open(java.lang.String, int),-,754,java.io.InputStream android.content.res.AssetManager.open(java.lang.String, int),28]
06-30 07:26:28.711 6835 29956 E filemap : mmap(475136,12830) failed: Out of memory
06-30 07:26:28.711 6835 29956 E pp.energycente: Failed to mmap file 'assets/right_tire_day/righttire_day_dynamics__00000.png' in APK '/product/app/EnergyCenter/EnergyCenter.apk'
06-30 07:26:28.712 6835 29956 W System.err: java.io.FileNotFoundException: right_tire_day/righttire_day_dynamics__00000.png
06-30 07:26:28.712 6835 29956 W System.err: at android.content.res.AssetManager.nativeOpenAsset(Native Method)
06-30 07:26:28.713 6835 29956 W System.err: at android.content.res.AssetManager.open(AssetManager.java:756)
06-30 07:26:28.713 6835 29956 W System.err: at android.content.res.AssetManager.open(AssetManager.java:733)
06-30 07:26:28.713 6835 29956 W System.err: at com.yuyashuai.frameanimation.io.BitmapDecoderImpl.decodeAssetBitmap(BitmapDecoderImpl.kt:38)
06-30 07:26:28.713 6835 29956 W System.err: at com.yuyashuai.frameanimation.io.BitmapDecoderImpl.decodeBitmap(BitmapDecoderImpl.kt:20)
06-30 07:26:28.713 6835 29956 W System.err: at com.yuyashuai.frameanimation.io.BitmapPoolImpl$decodeBitmap$1.run(BitmapPoolImpl.kt:176)
06-30 07:26:28.713 6835 29956 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-30 07:26:28.713 6835 29956 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-30 07:26:28.713 6835 29956 W System.err: at java.lang.Thread.run(Thread.java:764)
06-30 07:26:28.713 6835 29758 E filemap : mmap(499712,12803) failed: Out of memory

@PXzyn
Copy link
Author

PXzyn commented Jul 3, 2023

你好,好像是引用错误,就是playAnimationFromAssets不断引用同一资源,代码中未做过滤,是这种不当操作导致的吗

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