ResolveInfo.loadIcon导致ANR keyDispatchingTimedOut

时间:2013-06-12 13:18:39

标签: android android-package-managers

我的一个班级检索设备上安装的活动列表及其图标。这在很多手机上运行得非常好,但是我的一个使用Nexus 7的用户得到了ANR:

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)

"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x410a39a0 self=0x400d3010
| sysTid=15890 nice=0 sched=0/0 cgrp=apps handle=1075213276
| state=D schedstat=( 2274319000 316147000 1599 ) utm=146 stm=81 core=0
#00 pc 00016d78 /system/lib/libc.so (read+12)
#01 pc 00012b3f /system/lib/libutils.so (android::ZipFileRO::mapCentralDirectory()+114)
#02 pc 00012fe7 /system/lib/libutils.so (android::ZipFileRO::open(char const*)+126)
#03 pc 0001765d /system/lib/libandroidfw.so (android::AssetManager::SharedZip::SharedZip(android::String8 const&, long)+92)
#04 pc 00018129 /system/lib/libandroidfw.so (android::AssetManager::SharedZip::get(android::String8 const&)+232)
#05 pc 000181e9 /system/lib/libandroidfw.so (android::AssetManager::ZipSet::getZipResourceTableAsset(android::String8 const&)+32)
#06 pc 00018a6d /system/lib/libandroidfw.so (android::AssetManager::getResTable(bool) const+124)
#07 pc 0006451f /system/lib/libandroid_runtime.so
#08 pc 0001e290 /system/lib/libdvm.so (dvmPlatformInvoke+112)
#09 pc 0004d411 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+396)
#10 pc 000276a0 /system/lib/libdvm.so
#11 pc 0002b57c /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#12 pc 0005ff07 /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
#13 pc 00066f95 /system/lib/libdvm.so
#14 pc 000276a0 /system/lib/libdvm.so
#15 pc 0002b57c /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#16 pc 0005ff07 /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
#17 pc 000677e1 /system/lib/libdvm.so
#18 pc 000276a0 /system/lib/libdvm.so
#19 pc 0002b57c /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
#20 pc 0005fc31 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
#21 pc 000499fb /system/lib/libdvm.so
#22 pc 00046871 /system/lib/libandroid_runtime.so
#23 pc 00047533 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
#24 pc 00000db7 /system/bin/app_process
#25 pc 0001271f /system/lib/libc.so (__libc_init+38)
#26 pc 00000ae8 /system/bin/app_process
at android.content.res.AssetManager.getStringBlockCount(Native Method)
at android.content.res.AssetManager.makeStringBlocks(AssetManager.java:257)
at android.content.res.AssetManager.ensureStringBlocks(AssetManager.java:249)
at android.content.res.Resources.<init>(Resources.java:189)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1705)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1734)
at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:746)
at android.app.ApplicationPackageManager.getDrawable(ApplicationPackageManager.java:636)
at android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:140)
at android.content.pm.ComponentInfo.loadDefaultIcon(ComponentInfo.java:161)
at android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:145)
at android.content.pm.ResolveInfo.loadIcon(ResolveInfo.java:186)

当我尝试检索活动图标时,似乎ANR是由ResolveInfo.loadIcon引起的...... 知道为什么它可能是在一台设备而不是其他设备上造成的?也许他的一个应用程序没有正确安装或类似的东西...... 谢谢你的时间。

0 个答案:

没有答案