要求熟悉,应用的包名。也就是说那个应用包出现问题,该属于那个模块,应用包名是判断依据。
空指针异常主要是有NullPointerException异常提示,在Monkey测试过程中,该信息一般记录在plog.log (locat中也有该信息)中。
如果Monkey命令被中断,说明有异常信息并且有对应的打印信息,可以看到如下信息,说明几个问题:
//at com.android.launcher.LauncherAnimator.ScrollAnimate3dRotate.drawFrame(ScrollAnimate3dRotate.java:275)
// CRASH: android.process.acore (pid 1339)
// Short Msg: java.lang.NullPointerException
// Long Msg: java.lang.NullPointerException
// Build Label: android:FIH/msm7627_surf/msm7627_surf/F0X:1.6/DONUT/0001_0_020:e
ng/release-keys
// Build Changelist: -1
// Build Time: 1271397239
// ID:
// Tag: AndroidRuntime
// java.lang.NullPointerException:
// at com.android.launcher.LauncherAnimator.ScrollAnimate3dRotate.drawFrame(ScrollAnimate3dRotate.java:275)
// at com.android.launcher.Workspace.dispatchDraw(Workspace.java:605)
// at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
// at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
// at com.android.launcher.DragLayer.dispatchDraw(DragLayer.java:258)
// at android.view.ViewGroup.drawChild(ViewGroup.java:1524)
// at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
// at android.view.View.draw(View.java:6329)
// at android.widget.FrameLayout.draw(FrameLayout.java:352)
// at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
// at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
// at android.view.View.draw(View.java:6329)
// at android.widget.FrameLayout.draw(FrameLayout.java:352)
// at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1901)
// at android.view.ViewRoot.draw(ViewRoot.java:1333)
// at android.view.ViewRoot.performTraversals(ViewRoot.java:1098)
// at android.view.ViewRoot.handleMessage(ViewRoot.java:1618)
// at android.os.Handler.dispatchMessage(Handler.java:99)
// at android.os.Looper.loop(Looper.java:123)
// at android.app.ActivityThread.main(ActivityThread.java:4203)
// at java.lang.reflect.Method.invokeNative(Method.java:-2)
// at java.lang.reflect.Method.invoke(Method.java:521)
// at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
// at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
// at dalvik.system.NativeStart.main(NativeStart.java:-2)
** System appears to have crashed at event 7908 of 5000000 using seed 0
———————————————————————————————————————————
debug异常主要是由于应用程序本身的错误导致的异常。在Monkey测试过程中,该信息同样记录在plog.log (locat中也有该信息)中。一般情况下,出现的该问题,很可能在手动测试时也可以测试到。
// CRASH: com.android.browser (pid 5683)
// Short Msg: Connection is not open
// Long Msg: java.lang.IllegalStateException: Connection is not open
// Build Label: android:FIH/msm7627_surf/msm7627_surf/F0X:1.6/DONUT/0001_0_020:eng/release-keys
// Build Changelist: -1
// Build Time: 1271397239
// ID:
// Tag: AndroidRuntime
// java.lang.IllegalStateException: Connection is not open
// at android.net.http.AndroidHttpClientConnection.assertOpen(AndroidHttpClien
tConnection.java:153)
// at android.net.http.AndroidHttpClientConnection.setSocketTimeout(AndroidHtt
pClientConnection.java:195)
// at android.net.http.Connection.openHttpConnection(Connection.java:364)
// at android.net.http.Connection.processRequests(Connection.java:225)
// at android.net.http.ConnectionThread.run(ConnectionThread.java:116)
** System appears to have crashed at event 34155 of 5000000 using seed 0**
———————————————————————————————————————————
低内存异常一般情况下,主要表现在出现OutOfMemoryError异常或者提示Out of memory,其后果同样表现为抛出OutOfMemoryError异常或者是通过kill process 来杀掉部分进程以释放内存空间,当然如果被kill点关键的进程的话,也就可能导致部分应用会自动的退出。出现该情况时,主要是在进行频繁的进行大量的操作导致的,所以使用手动的方式也是可能进行重现的。
// CRASH: com.android.elastos.backup (pid 1581)
// Short Msg: bitmap size exceeds VM budget
// Long Msg: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
// Build Label: android:FIH/msm7627_surf/msm7627_surf/F0X:1.6/DONUT/0001_0_020:eng/release-keys
// Build Changelist: -1
// Build Time: 1271397239
// ID:
// Tag: AndroidRuntime
// java.lang.OutOfMemoryError: bitmap size exceeds VM budget
// at android.graphics.Bitmap.nativeCreate(Bitmap.java:-2)
// at android.graphics.Bitmap.createBitmap(Bitmap.java:464)
// at android.graphics.Bitmap.createBitmap(Bitmap.java:431)
// at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:336)
// at android.widget.AbsListView.preScaleBitmapBG(AbsListView.java:2354)
// at android.widget.AbsListView.draw(AbsListView.java:2365)
// at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
// at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
// at android.view.View.draw(View.java:6329)
// at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
// at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
// at android.view.View.draw(View.java:6329)
// at android.widget.FrameLayout.draw(FrameLayout.java:352)
// at android.view.ViewGroup.drawChild(ViewGroup.java:1526)
// at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256)
// at android.view.View.draw(View.java:6329)
// at android.widget.FrameLayout.draw(FrameLayout.java:352)
// at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1901)
// at android.view.ViewRoot.draw(ViewRoot.java:1333)
// at android.view.ViewRoot.performTraversals(ViewRoot.java:1098)
// at android.view.ViewRoot.handleMessage(ViewRoot.java:1618)
// at android.os.Handler.dispatchMessage(Handler.java:99)
// at android.os.Looper.loop(Looper.java:123)
// at android.app.ActivityThread.main(ActivityThread.java:4203)
// at java.lang.reflect.Method.invokeNative(Method.java:-2)
// at java.lang.reflect.Method.invoke(Method.java:521)
// at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
// at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
// at dalvik.system.NativeStart.main(NativeStart.java:-2)
** System appears to have crashed at event 143290 of 100000000 using seed 0#
<3>[56351.640641] Out of memory: kill process 14177 (app_process) score 247872 or a child
<3>[56351.641121] Killed process 14177 (app_process)
———————————————————————————————————————————
操作无响应的问题,主要表现在Monkey运行过程中,出现某功能无响应,提示是否“强制关闭“或“等待“,同时会打印出相应的log信息,如下:
// NOT RESPONDING: com.android.soundrecorder (pid 1931)
ANR in process: com.android.soundrecorder (last in com.android.soundrecorder)
Annotation: keyDispatchingTimedOut
CPU usage:
Load: 8.24 / 8.41 / 8.25
CPU usage from 35911ms to 83ms ago:
com.android.soundrecorder: 4% = 3% user + 0% kernel / faults: 997 minor 43 maj
or
mediaserver: 2% = 2% user + 0% kernel / faults: 267 minor 3 major
android.process.media: 2% = 0% user + 1% kernel / faults: 563 minor 194 major
system_server: 1% = 1% user + 0% kernel / faults: 1279 minor 5 major
com.cootek.touchpal: 0% = 0% user + 0% kernel / faults: 180 minor 1 major
sensorserver_ya: 0% = 0% user + 0% kernel / faults: 47 minor 1 major
mmcqd: 0% = 0% user + 0% kernel
app_process: 0% = 0% user + 0% kernel / faults: 203 minor 1 major
com.fihtdc.brservice: 0% = 0% user + 0% kernel / faults: 29 minor
kswapd0: 0% = 0% user + 0% kernel
com.android.settings: 0% = 0% user + 0% kernel / faults: 266 minor
port-bridge: 0% = 0% user + 0% kernel / faults: 19 minor
rpcrouter: 0% = 0% user + 0% kernel
com.android.mms: 0% = 0% user + 0% kernel / faults: 135 minor 8 major
TOTAL: 13% = 8% user + 4% kernel + 0% iowait
procrank:
PID Vss Rss Pss Uss cmdline
1209 35368K 25376K 15283K 14036K system_server
1342 32788K 24596K 14899K 14136K android.process.acore
……
// procrank status was 0
anr traces:
// meminfo status was 0
** System appears to have crashed at event 59034 of 5000000 using seed 0
———————————————————————————————————————————
1、 运行过程中,存在异常手机被自动重启
2、 手机在运行过程中,进入设置中的恢复出场设置,导致手机重启
3、 其他原因,如果手机后盖移动等