Android API Version:
api-level : 22 android5.1
Android 手机型号&ROM(Phone model & ROM):
Vivo X6Plus D, Funtouch OS_2.5
Logcat上下文 Logcat context
02-01 10:57:36.024 14171-14171/com.xunlei.downloadprovider E/Tinker.TinkerUncaughtExceptionHandler: uncaughtException:Attempt to invoke virtual method 'int org.json.JSONObject.optInt(java.lang.String)' on a null object reference
02-01 10:57:36.025 14171-14171/com.xunlei.downloadprovider W/Tinker.TinkerUncaughtExceptionHandler: tinker is not loaded
02-01 10:57:36.025 14171-14171/com.xunlei.downloadprovider E/Tinker.UncaughtHandler: TinkerUncaughtHandler catch exception:java.lang.NullPointerException: Attempt to invoke virtual method 'int org.json.JSONObject.optInt(java.lang.String)' on a null object reference
at com.qihoo360.replugin.model.PluginInfo.getVersion(PluginInfo.java:296)
问题详细描述 Detailed description of the problem
宿主升级2.2.2版本,然后测试插件升级流程。2.2.2版本宿主携带一个低版本的2.2.1版本的内置插件, 然后再升级到高版本的2.2.1版本的插件,插件安装后获取pendingUpdate的version,空指针崩溃了
复现问题步骤 Steps to reproduce the problem
PluginInfo curRunInfo = RePlugin.getPluginInfo(mPluginPackageName); PluginInfo pendingInfo = curRunInfo.getPendingUpdate(); if (pendingInfo != null) { int pendingVersion = pendingInfo.getVersion(); // getVersion里面崩溃了 ...... }
其它重要信息 Other important information
replugin-host-lib/gradle Version: 2.2.2 rePlugin-plugin-lib/gradle Version: 2.2.1
Android API Version: api-level : 22 android5.1 Android 手机型号&ROM(Phone model & ROM): Vivo X6Plus D, Funtouch OS_2.5
Logcat上下文 Logcat context
02-01 10:57:36.024 14171-14171/com.xunlei.downloadprovider E/Tinker.TinkerUncaughtExceptionHandler: uncaughtException:Attempt to invoke virtual method 'int org.json.JSONObject.optInt(java.lang.String)' on a null object reference 02-01 10:57:36.025 14171-14171/com.xunlei.downloadprovider W/Tinker.TinkerUncaughtExceptionHandler: tinker is not loaded 02-01 10:57:36.025 14171-14171/com.xunlei.downloadprovider E/Tinker.UncaughtHandler: TinkerUncaughtHandler catch exception:java.lang.NullPointerException: Attempt to invoke virtual method 'int org.json.JSONObject.optInt(java.lang.String)' on a null object reference at com.qihoo360.replugin.model.PluginInfo.getVersion(PluginInfo.java:296)