在似乎工作了一段时间后,cloudrail 2.7.0 现在反复崩溃并出现以下问题:
Fatal Exception: java.lang.RuntimeException: ServiceCode Error in function selfTest at 26
at com.cloudrail.si.servicecode.Interpreter.run(Unknown Source)
at com.cloudrail.si.servicecode.Interpreter.callFunction(Unknown Source)
at com.cloudrail.si.servicecode.InitSelfTest.execute(Unknown Source)
at com.cloudrail.si.servicecode.InitSelfTest.initTest(Unknown Source)
at com.cloudrail.si.statistics.InitSelfTestTask.run(Unknown Source)
Caused by java.lang.NullPointerException
at com.cloudrail.si.servicecode.commands.http.RequestCall.execute(Unknown Source)
at com.cloudrail.si.servicecode.Interpreter.run(Unknown Source)
at com.cloudrail.si.servicecode.Interpreter.callFunction(Unknown Source)
at com.cloudrail.si.servicecode.InitSelfTest.execute(Unknown Source)
at com.cloudrail.si.servicecode.InitSelfTest.initTest(Unknown Source)
at com.cloudrail.si.statistics.InitSelfTestTask.run(Unknown Source)
我尝试单步执行代码,但看不到原因。我可以看到,在 InitSelfTest 中,以下行未包含在 try/catch 块中,因此可能假设 appContext.getPackageName() 不为空?
ip.callFunction("selfTest", new Object[]{interpreterStorage, appContext.getPackageName(), appInfo1.className, appVersionName, appVersionCode});