[Cts-Verifier]waiver-Camera-ITS-Test

4512 ワード

【問題の説明】


ツール:Cts-Verifier-9.0-R 11.apkがCamera ITS Testをテストする場合、このテスト項目をクリックするとverifier apkがフラッシュバックします.再開後、この項目はpassで緑になりません.

【問題の結論】


AuthBlog:秋城https://www.cnblogs.com/houser0323


最新の結論:waiver項です.Google-waiver IDを入手しました:https://partnerissuetracker.corp.google.com/issues/150153190verifierツールの問題を疑うr 8ツールは問題なく、r 11に問題があります.r 11工具は送検に成功した箱にも問題がある.

【分析詳細】


1.crashログ:
03-04 14:34:36.977  8091  8091 D AndroidRuntime: Shutting down VM
--------- beginning of crash
03-04 14:34:36.987  8091  8091 E AndroidRuntime: FATAL EXCEPTION: main
03-04 14:34:36.987  8091  8091 E AndroidRuntime: Process: com.android.cts.verifier, PID: 8091
03-04 14:34:36.987  8091  8091 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.cts.verifier/com.android.cts.verifier.camera.its.ItsTestActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.cts.verifier.TestListAdapter.getCount()' on a null object reference
。。。。。。
03-04 14:34:36.987  8091  8091 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.cts.verifier.TestListAdapter.getCount()' on a null object reference
03-04 14:34:36.987  8091  8091 E AndroidRuntime:        at com.android.cts.verifier.PassFailButtons$TestListActivity.getHistoryCollection(PassFailButtons.java:294)
03-04 14:34:36.987  8091  8091 E AndroidRuntime:        at com.android.cts.verifier.PassFailButtons$TestListActivity.setTestResultAndFinish(PassFailButtons.java:282)
03-04 14:34:36.987  8091  8091 E AndroidRuntime:        at com.android.cts.verifier.camera.its.ItsTestActivity.onCreate(ItsTestActivity.java:347)
03-04 14:34:36.987  8091  8091 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7144)
03-04 14:34:36.987  8091  8091 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:7135)
03-04 14:34:36.987  8091  8091 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
03-04 14:34:36.987  8091  8091 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2894)
03-04 14:34:36.987  8091  8091 E AndroidRuntime:        ... 11 more
03-04 14:34:37.000  3184  4971 W ActivityManager:   Force finishing activity com.android.cts.verifier/.camera.its.ItsTestActivity
03-04 14:34:37.003  3184  4971 W ActivityManager:   Force finishing activity com.android.cts.verifier/.CtsVerifierActivity
03-04 14:34:37.009  2988  3123 W libc    : Unable to set property "sys.vsync.type" to "": error code: 0x18
03-04 14:34:37.010  8091  8091 I Process : Sending signal. PID: 8091 SIG: 9

2.遡及ソースコードを比較した場合、r 8はcrashしません.r 8ツールはr 11ツールのコードと異なり、getHistoryCollection()を呼び出す関数が追加されました.
camera/its/ItsTestActivity.java +347
342         if (mToBeTestedCameraIds.size() == 0) {
343             showToast(R.string.all_exempted_devices);
344             ItsTestActivity.this.getReportLog().setSummary(
345                     "PASS: all cameras on this device are exempted from ITS"
346                     , 1.0, ResultType.NEUTRAL, ResultUnit.NONE);// pass。crash , , apk 。
347             setTestResultAndFinish(true);//
348         }

=============================================
ItsTestActivity.java:347
@@ -171,25 +160,19 @@
         @Override
         public void setTestResultAndFinish(boolean passed) {
             PassFailButtons.setTestResultAndFinishHelper(
+                    this, getTestId(), getTestDetails(), passed, getReportLog(),
+                    getHistoryCollection());// , 。
-                    this, getTestId(), getTestDetails(), passed, getReportLog());
         }

=============================================
PassFailButtons.java:294
288         /**
289          * Get existing test history to aggregate.
290          */
291         @Override
292         public TestResultHistoryCollection getHistoryCollection() {
293             List histories =
294                 IntStream.range(0, mAdapter.getCount())// mAdapter null, crash 。  
295                 .mapToObj(mAdapter::getHistoryCollection)
296                 .collect(Collectors.toList());


以上の294のように、apkをテストするコードに問題があるため、空のポインタが異常crashになりました.