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

ANR in MMKV #454

Closed
Jack6Wolf opened this issue May 13, 2020 · 17 comments
Closed

ANR in MMKV #454

Jack6Wolf opened this issue May 13, 2020 · 17 comments

Comments

@Jack6Wolf
Copy link

The language of MMKV

Java

The version of MMKV

v1.1.0

The platform of MMKV

Android

The installation of MMKV

Maven

ANR Input dispatching timed out (Waiting because no window has focus but there is a focused application that may eventually add a window when it finishes starting up.)

1 com.tencent.mmkv.MMKV.long getMMKVWithID(java.lang.String,int,java.lang.String,java.lang.String)(Native Method)

2 com.tencent.mmkv.MMKV.com.tencent.mmkv.MMKV mmkvWithID(java.lang.String)(MMKV.java:155)
3 com.star.util.mmkv.MMKVUtil.void (java.lang.String)(MMKVUtil.java:39)

@lingol
Copy link
Collaborator

lingol commented May 13, 2020

Logs please.

@Jack6Wolf
Copy link
Author

#1 main

Input dispatching timed out

ANR Input dispatching timed out (Waiting because no window has focus but there is a focused application that may eventually add a window when it finishes starting up.)

1 com.tencent.mmkv.MMKV.long getMMKVWithID(java.lang.String,int,java.lang.String,java.lang.String)(Native Method)

2 com.tencent.mmkv.MMKV.com.tencent.mmkv.MMKV mmkvWithID(java.lang.String)(MMKV.java:155)
3 com.star.util.mmkv.MMKVUtil.void (java.lang.String)(MMKVUtil.java:39)
4 com.star.mobile.video.okhttpdns.HttpDnsHelper.com.star.mobile.video.okhttpdns.IpModelBean getIpModelBean(java.lang.String)(HttpDnsHelper.java:162)
5 com.star.mobile.video.androidServices.BackupServices.void handleAction4Login(java.lang.String,java.lang.String,com.star.cms.model.ums.LoginRequest,int)(BackupServices.java:262)
6 com.star.mobile.video.androidServices.BackupServices.void startAction4Login(boolean)(BackupServices.java:138)
7 com.star.mobile.video.activity.WelcomeActivity$1.void onDeviceIdRetrieved(java.lang.String)(WelcomeActivity.java:372)
8 com.star.mobile.video.sharePrefrernces.DeviceSharePre$1.void run()(DeviceSharePre.java:119)
9 android.os.Handler.handleCallback(Handler.java:790)
10 android.os.Handler.dispatchMessage(Handler.java:99)
11 android.os.Looper.loop(Looper.java:164)
12 android.app.ActivityThread.main(ActivityThread.java:6549)
13 java.lang.reflect.Method.invoke(Native Method)
14 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
15 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888)

@lingol
Copy link
Collaborator

lingol commented May 13, 2020

I mean Logs from Logcat.

@Jack6Wolf
Copy link
Author

抱歉!这是我们线上Bugly平台反馈的!只有这么多信息!

@lingol
Copy link
Collaborator

lingol commented May 13, 2020

Well, I can't help you with that limited info.

@Jack6Wolf
Copy link
Author

好吧,你需要的是还原这个bug的所有Logcat日志信息是吧?

@lingol
Copy link
Collaborator

lingol commented May 13, 2020

That would be very helpful.

@Jack6Wolf
Copy link
Author

目前我们自己无法还原,我们尽量尝试吧!后续有最新情况会回复您的!谢谢!

@lingol
Copy link
Collaborator

lingol commented May 25, 2020

Hi, have you collected helpful logs yet?

@Jack6Wolf
Copy link
Author

Jack6Wolf commented May 25, 2020 via email

@lingol
Copy link
Collaborator

lingol commented Jun 15, 2020

Still no updates?

@lingol
Copy link
Collaborator

lingol commented Jun 22, 2020

If there's still no more information, I will have to close this inactive issue.

@lingol lingol closed this as completed Jun 30, 2020
@JackliJ
Copy link

JackliJ commented Mar 9, 2022

抱歉,目前仍然没有! On 5/13/2020 13:58,Guo Ling[email protected] wrote: Logs please. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

我也遇到了这个问题 由bugly反馈 你有解决方案吗

@lingol
Copy link
Collaborator

lingol commented Mar 9, 2022

抱歉,目前仍然没有! On 5/13/2020 13:58,Guo Ling[email protected] wrote: Logs please. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

我也遇到了这个问题 由bugly反馈 你有解决方案吗

The requirement is still the same. We need logs from MMKV when this ANR happens, to further diagnose the problem.

@xxrlzzz
Copy link

xxrlzzz commented Sep 27, 2022

Any prefix of mmkv log or ways make mmkv to print more log? Sadly I can't find any log printed from mmkv expect anr stack

@mikelhm
Copy link

mikelhm commented Mar 12, 2023

https://blog.csdn.net/xiaobaaidaba123/article/details/127834494?spm=1001.2014.3001.5501
4. com.tencent.mmkv.MMKV.getMMKVWithID ANR

this helps me : preload can avoid om.tencent.mmkv.MMKV.long getMMKVWithID anr

@beefeng
Copy link

beefeng commented Jul 17, 2024

We also encounter similar issues. are these logs sufficient? The file size is not large, but it seems to occur more easily when high CPU load and there are muti mmkv files to open, such as during a cold launch.

The language of MMKV
Java

The version of MMKV
v1.2.12

The platform of MMKV
Android

"main" prio=5 tid=1 Native
| group="main" sCount=1 ucsCount=0 flags=1 obj=0x715af0c8 self=0xb4000070e7a8bc00
| sysTid=13702 nice=-10 cgrp=default sched=0/0 handle=0x718c9874f8
| state=S schedstat=( 1266727187 524768432 1665 ) utm=63 stm=62 core=3 HZ=100
| stack=0x7fd6532000-0x7fd6534000 stackSize=8188KB
| held mutexes=
native: #00 pc 0000000000088270 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32) Retrace Result: ()
native: #1 pc 000000000028dc74 /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+152) Retrace Result: ()
native: #2 pc 00000000004abc28 /apex/com.android.art/lib64/libart.so (art::JNI::NewStringUTF(_JNIEnv*, char const*)+696) Retrace Result: ()
native: #3 pc 00000000000094d8 /data/app/~~mnoaCV6ygWNYwnSdMAQEMg==/com.android.lark-BgOzZjlUV9t5VuaSLSGHsQ==/lib/arm64/libmmkv.so (???) Retrace Result: ()
native: #4 pc 000000000001b5b0 /data/app/~~mnoaCV6ygWNYwnSdMAQEMg==/com.android.lark-BgOzZjlUV9t5VuaSLSGHsQ==/lib/arm64/libmmkv.so (???) Retrace Result: ()
native: #5 pc 0000000000020504 /data/app/~~mnoaCV6ygWNYwnSdMAQEMg==/com.android.lark-BgOzZjlUV9t5VuaSLSGHsQ==/lib/arm64/libmmkv.so (???) Retrace Result: ()
native: #6 pc 00000000000219f8 /data/app/~~mnoaCV6ygWNYwnSdMAQEMg==/com.android.lark-BgOzZjlUV9t5VuaSLSGHsQ==/lib/arm64/libmmkv.so (???) Retrace Result: ()
native: #7 pc 00000000000220a0 /data/app/~~mnoaCV6ygWNYwnSdMAQEMg==/com.android.lark-BgOzZjlUV9t5VuaSLSGHsQ==/lib/arm64/libmmkv.so (???) Retrace Result: ()
native: #8 pc 0000000000013ed8 /data/app/~~mnoaCV6ygWNYwnSdMAQEMg==/com.android.lark-BgOzZjlUV9t5VuaSLSGHsQ==/lib/arm64/libmmkv.so (???) Retrace Result: ()
native: #9 pc 0000000000014730 /data/app/~~mnoaCV6ygWNYwnSdMAQEMg==/com.android.lark-BgOzZjlUV9t5VuaSLSGHsQ==/lib/arm64/libmmkv.so (???) Retrace Result: ()
native: #10 pc 000000000000633c /data/app/~~mnoaCV6ygWNYwnSdMAQEMg==/com.android.lark-BgOzZjlUV9t5VuaSLSGHsQ==/lib/arm64/libmmkv.so (???) Retrace Result: ()
at com.tencent.mmkv.MMKV.getMMKVWithID(MMKV.java)
at com.tencent.mmkv.MMKV.mmkvWithID(MMKV.java:328)
at com.tencent.mmkv.MMKV.getMMKVWithID(MMKV.java)
at com.tencent.mmkv.MMKV.mmkvWithID(MMKV.java:328)

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

6 participants