MiEcosystem / NewXmPluginSDK

xiaomi smarthome app plugin sdk
Apache License 2.0
176 stars 81 forks source link

偶尔弹出Toast崩溃 #129

Closed bairubing007 closed 4 years ago

bairubing007 commented 5 years ago

before issue:(不用回答)

APK 请使用最新版apk验证是否已经修复了此问题?

Check 文档了吗?

是否尝试搜索issue?


环境

插件 model 是什么: mxiang.cateye.mdb10 使用的哪个方法 请分享设备或绑定设备到 346378191,方便复现问题。

现象

简单明了地描述一下实际的现象。

偶尔弹出Toast 会崩溃

期望

简单明了地描述一下期望的表现。

其他的上下文/日志/截图

ager: getConnectedDevices 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=40:EF:4C:80:27:AF, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=00:9E:C8:73:F4:F8, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=4E:46:46:03:21:C7, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=E8:07:BF:CD:7D:79, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=BA:98:76:11:72:5A, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=00:15:A1:05:EE:83, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=E9:08:EF:6F:09:03, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=00:12:B7:10:20:39, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=88:0F:10:95:18:42, type=2 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=4C:49:E3:4B:03:57, type=1 08-21 13:35:17.535 1856-16823/? D/BtGatt.GattService: getDeviceType() - device=E8:B4:C8:95:DD:51, type=3 08-21 13:35:17.655 19351-19430/com.xiaomi.smarthome:core D/BootRequestCheck: 1566365717655 SmartHomeRc4Api.sendRequest Request{method=POST, url=https://api.io.mi.com/app/device/batchdevicedatas, tag=lZb70sHSs6g52p13/WjkGw==} com.xiaomi.smarthome:core 08-21 13:35:17.678 19351-19691/com.xiaomi.smarthome:core D/MIIO: host:api.io.mi.com prefix:nullpath:/device/batchdevicedatas method:POST params:[data:[{"did":"292198389","props":["prop.is_can_open_video"]}]] 08-21 13:35:17.678 19351-19691/com.xiaomi.smarthome:core D/MIIO: {"code":0,"message":"ok","result":{"292198389":{"prop.is_can_open_video":"\"0\""}}} 08-21 13:35:17.680 19776-19776/com.xiaomi.smarthome:plugin0 D/EquipmentProperty: voiceAlarm: start alarm 3 08-21 13:35:17.680 19776-19776/com.xiaomi.smarthome:plugin0 D/EquipmentProperty: onSuccess: door bell is ready0 08-21 13:35:17.743 1033-1033/? W/wificond: Skip scan ssid for single scan: mo_000116 08-21 13:35:17.838 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE 08-21 13:35:17.838 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK OFF 08-21 13:35:17.865 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD 08-21 13:35:17.865 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK ON 08-21 13:35:17.865 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Writing IBS_WAKE_ACK 08-21 13:35:18.054 19351-19430/com.xiaomi.smarthome:core D/BootRequestCheck: 1566365718054 SmartHomeRc4Api.sendRequest Request{method=POST, url=https://api.io.mi.com/app/device/batchdevicedatas, tag=lZb70sHSs6g52p13/WjkGw==} com.xiaomi.smarthome:core 08-21 13:35:18.085 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE 08-21 13:35:18.085 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK OFF 08-21 13:35:18.088 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD 08-21 13:35:18.088 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK ON 08-21 13:35:18.088 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Writing IBS_WAKE_ACK 08-21 13:35:18.151 19351-19687/com.xiaomi.smarthome:core D/MIIO: host:api.io.mi.com prefix:nullpath:/device/batchdevicedatas method:POST params:[data:[{"did":"292198389","props":["prop.is_can_open_video"]}]] 08-21 13:35:18.151 19351-19687/com.xiaomi.smarthome:core D/MIIO: {"code":0,"message":"ok","result":{"292198389":{"prop.is_can_open_video":"\"0\""}}} 08-21 13:35:18.153 19776-19776/com.xiaomi.smarthome:plugin0 D/EquipmentProperty: voiceAlarm: start alarm 3 08-21 13:35:18.155 19776-19776/com.xiaomi.smarthome:plugin0 D/EquipmentProperty: onSuccess: door bell is ready0 08-21 13:35:18.165 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE 08-21 13:35:18.165 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK OFF 08-21 13:35:18.166 19776-19776/com.xiaomi.smarthome:plugin0 W/ResourceType: For resource 0x7f0c0194, entry index(404) is beyond type entryCount(39) 08-21 13:35:18.166 19776-19776/com.xiaomi.smarthome:plugin0 W/ResourceType: Failure getting entry for 0x7f0c0194 (t=11 e=404) (error -75) 08-21 13:35:18.167 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: android.content.res.Resources$NotFoundException: String resource ID #0x7f0c0194 08-21 13:35:18.168 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.content.res.Resources.getText(Resources.java:350) 08-21 13:35:18.169 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.content.res.Resources.getString(Resources.java:444) 08-21 13:35:18.169 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.widget.ToastInjector.addAppName(ToastInjector.java:49) 08-21 13:35:18.169 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.widget.Toast.makeText(Toast.java:284) 08-21 13:35:18.170 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.widget.Toast.makeText(Toast.java:267) 08-21 13:35:18.170 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at com.meetvr.doorbell.android.util.ToastUtil.showMessage(ToastUtil.java:101) 08-21 13:35:18.170 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at com.meetvr.doorbell.android.activity.base.BaseActivity.showToast(BaseActivity.java:453) 08-21 13:35:18.171 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at com.meetvr.doorbell.android.activity.base.BaseActivity$5.result(BaseActivity.java:276) 08-21 13:35:18.171 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at com.meetvr.doorbell.android.EquipmentProperty$2.onSuccess(EquipmentProperty.java:297) 08-21 13:35:18.172 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD 08-21 13:35:18.172 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK ON 08-21 13:35:18.172 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Writing IBS_WAKE_ACK 08-21 13:35:18.172 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at com.meetvr.doorbell.android.EquipmentProperty$2.onSuccess(EquipmentProperty.java:284) 08-21 13:35:18.172 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at com.xiaomi.smarthome.frame.plugin.host.PluginHostApi$5.run(PluginHostApi.java:322) 08-21 13:35:18.172 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.os.Handler.handleCallback(Handler.java:793) 08-21 13:35:18.173 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98) 08-21 13:35:18.173 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.os.Looper.loop(Looper.java:173) 08-21 13:35:18.173 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6698) 08-21 13:35:18.173 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at java.lang.reflect.Method.invoke(Native Method) 08-21 13:35:18.173 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 08-21 13:35:18.174 19776-19776/com.xiaomi.smarthome:plugin0 W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782) 08-21 13:35:18.190 19776-19776/com.xiaomi.smarthome:plugin0 I/Toast: Show toast from OpPackageName:com.xiaomi.smarthome, PackageName:com.xiaomi.smarthome 08-21 13:35:18.206 894-1020/? I/ThermalEngine: handle_thresh_sig: HIS Id HISTORY-CPU4 Sensor tsens_tz_sensor8 Temp 61000 08-21 13:35:18.209 894-1020/? I/ThermalEngine: handle_thresh_sig: HIS Id HISTORY-CPU4 Sensor tsens_tz_sensor8 Temp 59000 08-21 13:35:18.234 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE 08-21 13:35:18.234 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK OFF 08-21 13:35:18.237 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD 08-21 13:35:18.237 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK ON 08-21 13:35:18.237 534-2327/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Writing IBS_WAKE_ACK 08-21 13:35:18.260 894-1020/? I/ThermalEngine: handle_thresh_sig: HIS Id HISTORY-CPU4 Sensor tsens_tz_sensor8 Temp 61000 08-21 13:35:18.275 19776-20173/com.xiaomi.smarthome:plugin0 E/RenderScript: Failed to init thread tls key. 08-21 13:35:18.275 19776-20173/com.xiaomi.smarthome:plugin0 E/RenderScript: RsdCpuReference::create for driver hal failed. 08-21 13:35:18.275 19776-20173/com.xiaomi.smarthome:plugin0 E/RenderScript: Hal init failed, libRSDriver.so 08-21 13:35:18.278 19776-20173/com.xiaomi.smarthome:plugin0 E/RenderScript: Failed to load default runtime! 08-21 13:35:18.278 19776-20173/com.xiaomi.smarthome:plugin0 E/RenderScript: Errors during thread init (sync mode) 08-21 13:35:18.278 19776-20173/com.xiaomi.smarthome:plugin0 E/RenderScript: rsAssert failed: mExit, in frameworks/rs/rsContext.cpp at 566 08-21 13:35:18.283 19776-1713/com.xiaomi.smarthome:plugin0 A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xb74 in tid 1713 (RenderThread) 08-21 13:35:18.293 2046-2243/? I/QcrilOemhookMsgTunnel: [1]processOemHookIndication length=21 08-21 13:35:18.293 2046-2046/? D/QcrilMsgTunnelIfaceManager: handleMessage what = 0 08-21 13:35:18.296 2039-2039/? D/QC_RIL_OEM_HOOK: Received Broadcast Intent ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW 08-21 13:35:18.296 2039-2039/? D/QC_RIL_OEM_HOOK: Oem ID in QCRILHOOK UNSOL RESP is QOEMHOOK 08-21 13:35:18.297 2215-2319/? E/wpa_supplicant: eap_proxy: card_state=2 error_code=3 08-21 13:35:18.297 2215-2319/? E/wpa_supplicant: eap_proxy: card_state=1 error_code=0 08-21 13:35:18.297 2215-2323/? E/wpa_supplicant: eap_proxy: card_state=2 error_code=3 08-21 13:35:18.297 2215-2323/? E/wpa_supplicant: eap_proxy: card_state=1 error_code=0 08-21 13:35:18.298 2215-2322/? E/wpa_supplicant: eap_proxy: card_state=2 error_code=3 08-21 13:35:18.298 2215-2322/? E/wpa_supplicant: eap_proxy: card_state=1 error_code=0 08-21 13:35:18.298 2215-2318/? E/wpa_supplicant: eap_proxy: card_state=2 error_code=3 08-21 13:35:18.299 2215-2318/? E/wpa_supplicant: eap_proxy: card_state=1 error_code=0 08-21 13:35:18.300 2063-2063/? D/QC_RIL_OEM_HOOK: Received Broadcast Intent ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW 08-21 13:35:18.300 2063-2063/? D/QC_RIL_OEM_HOOK: Oem ID in QCRILHOOK UNSOL RESP is QOEMHOOK 08-21 13:35:18.300 2063-2063/? D/QC_RIL_OEM_HOOK: Received Broadcast Intent ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW 08-21 13:35:18.300 2063-2063/? D/QC_RIL_OEM_HOOK: Oem ID in QCRILHOOK UNSOL RESP is QOEMHOOK 08-21 13:35:18.316 1891-2547/? D/BluetoothController: onDeviceDeleted 08-21 13:35:18.329 1891-2547/? D/BluetoothController: updateConnected complete 08-21 13:35:18.329 1891-2547/? D/BluetoothController: onDeviceAdded 08-21 13:35:18.332 2046-2243/? I/QcrilOemhookMsgTunnel: [0]processOemHookIndication length=24 08-21 13:35:18.332 2046-2046/? D/QcrilMsgTunnelIfaceManager: handleMessage what = 0

提供更多的上下文,有日志或者截图更好。

尝试过的解决办法

尝试过哪些操作?

bairubing007 commented 5 years ago

( 6825): android.content.res.Resources$NotFoundException: String resource ID #0x7f0c01b7 08-22 16:06:02.566 I/ADB_SERVICES( 7602): post waitpid (pid=9310) status=0000 08-22 16:06:02.570 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.player" 08-22 16:06:02.578 I/BufferQueueProducer( 393): com.xiaomi.smarthome/com.xiaomi.smarthome.frame.plugin.runtime.activity.PluginHostActivityPlugin2#0 queueBuffer: fps=8.89 dur=1012.90 max=886.65 min=5.67 08-22 16:06:02.591 W/System.err( 6825): at android.content.res.Resources.getText(Resources.java:351) 08-22 16:06:02.591 W/System.err( 6825): at android.content.res.Resources.getString(Resources.java:445) 08-22 16:06:02.592 W/System.err( 6825): at android.widget.ToastInjector.addAppName(ToastInjector.java:49) 08-22 16:06:02.592 W/System.err( 6825): at android.widget.Toast.makeText(Toast.java:284) 08-22 16:06:02.592 W/System.err( 6825): at android.widget.Toast.makeText(Toast.java:267) 08-22 16:06:02.592 W/System.err( 6825): at com.meetvr.doorbell.android.util.ToastUtil.showMessage(ToastUtil.java:101) 08-22 16:06:02.592 W/System.err( 6825): at com.meetvr.doorbell.android.activity.base.BaseActivity.showToast(BaseActivity.java:453) 08-22 16:06:02.592 W/System.err( 6825): at com.meetvr.doorbell.android.activity.base.BaseActivity$5.result(BaseActivity.java:276) 08-22 16:06:02.592 W/System.err( 6825): at com.meetvr.doorbell.android.EquipmentProperty$2.onSuccess(EquipmentProperty.java:297) 08-22 16:06:02.592 W/System.err( 6825): at com.meetvr.doorbell.android.EquipmentProperty$2.onSuccess(EquipmentProperty.java:284) 08-22 16:06:02.592 W/System.err( 6825): at com.xiaomi.smarthome.frame.plugin.host.PluginHostApi$5.run(SourceFile:322) 08-22 16:06:02.592 W/System.err( 6825): at android.os.Handler.handleCallback(Handler.java:790) 08-22 16:06:02.592 W/System.err( 6825): at android.os.Handler.dispatchMessage(Handler.java:99) 08-22 16:06:02.592 W/System.err( 6825): at android.os.Looper.loop(Looper.java:171) 08-22 16:06:02.592 W/System.err( 6825): at android.app.ActivityThread.main(ActivityThread.java:6654) 08-22 16:06:02.592 W/System.err( 6825): at java.lang.reflect.Method.invoke(Native Method) 08-22 16:06:02.592 W/System.err( 6825): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) 08-22 16:06:02.592 W/System.err( 6825): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) 08-22 16:06:02.605 D/ViewRootImplToast: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false 08-22 16:06:02.614 I/Toast ( 6825): Show toast from OpPackageName:com.xiaomi.smarthome, PackageName:com.xiaomi.smarthome 08-22 16:06:02.623 W/GuiExt ( 393): Cannot find GuiExtService 08-22 16:06:02.624 I/BufferQueueConsumer( 393): unnamed-393-4667 connect(C): consumer=(393:/system/bin/surfaceflinger) controlledByApp=false 08-22 16:06:02.624 I/BufferQueueConsumer( 393): unnamed-393-4667 setConsumerName: unnamed-393-4667 08-22 16:06:02.624 I/BufferQueueConsumer( 393): Toast#0 setConsumerName: Toast#0 08-22 16:06:02.624 I/BufferQueueConsumer( 393): Toast#0 setDefaultBufferSize: width=640 height=122 08-22 16:06:02.634 D/Surface ( 6825): Surface::connect(this=0x8f47f000,api=1) 08-22 16:06:02.634 D/Surface ( 6825): Surface::allocateBuffers(this=0x8f47f000) 08-22 16:06:02.634 I/BufferQueueProducer( 393): Toast#0 connect(P): api=1 producer=(6825:com.xiaomi.smarthome:plugin2) producerControlledByApp=true 08-22 16:06:02.642 I/ADB_SERVICES( 7602): post waitpid (pid=9314) status=0000 08-22 16:06:02.647 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.securityadd" 08-22 16:06:02.649 D/GraphicBuffer( 6825): register, handle(0x800f83c0) (w:640 h:122 s:640 f:0x1 u:b00) 08-22 16:06:02.685 W//vendor/bin/mtd( 369): Waited one second for vendor.xiaomi.hardware.mlipay@1.0::IMlipayService/default. Waiting another... 08-22 16:06:02.700 I/ADB_SERVICES( 7602): post waitpid (pid=9318) status=0000 08-22 16:06:02.703 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.systemAdSolution" 08-22 16:06:02.752 I/ADB_SERVICES( 7602): post waitpid (pid=9322) status=0000 08-22 16:06:02.753 E/RenderScript( 6825): Failed to init thread tls key. 08-22 16:06:02.754 E/RenderScript( 6825): RsdCpuReference::create for driver hal failed. 08-22 16:06:02.754 E/RenderScript( 6825): Hal init failed, libRSDriver.so 08-22 16:06:02.755 E/RenderScript( 6825): Failed to load default runtime! 08-22 16:06:02.755 E/RenderScript( 6825): Errors during thread init (sync mode) 08-22 16:06:02.755 E/RenderScript( 6825): rsAssert failed: mExit, in frameworks/rs/rsContext.cpp at 566 08-22 16:06:02.756 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.userguide" --------- beginning of crash 08-22 16:06:02.756 F/libc ( 6825): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xb74 in tid 9326 (RenderThread), pid 6825 (arthome:plugin2) 08-22 16:06:02.806 I/ADB_SERVICES( 7602): post waitpid (pid=9328) status=0000 08-22 16:06:02.810 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.video" 08-22 16:06:02.857 I/ADB_SERVICES( 7602): post waitpid (pid=9333) status=0000 08-22 16:06:02.870 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.virtualsim" 08-22 16:06:02.876 W/crash_dump32( 9340): type=1400 audit(0.0:642204): avc: denied { search } for name="com.xiaomi.smarthome" dev="dm-2" ino=318529 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 08-22 16:06:02.920 I/ADB_SERVICES( 7602): post waitpid (pid=9337) status=0000 08-22 16:06:02.928 I/crash_dump32( 9340): obtaining output fd from tombstoned, type: kDebuggerdTombstone 08-22 16:06:02.933 I//system/bin/tombstoned( 542): received crash request for pid 6825 08-22 16:06:02.933 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.voiceassist" 08-22 16:06:02.936 I/crash_dump32( 9340): performing dump of process 6825 (target tid = 9326) 08-22 16:06:02.937 I/libc ( 6825): orig_dumpable: 0 08-22 16:06:02.937 F/DEBUG ( 9340): 08-22 16:06:02.938 F/DEBUG ( 9340): Build fingerprint: 'xiaomi/cactus/cactus:8.1.0/O11019/V10.0.1.0.OCBCNFH:user/release-keys' 08-22 16:06:02.938 F/DEBUG ( 9340): Revision: '0' 08-22 16:06:02.938 F/DEBUG ( 9340): ABI: 'arm' 08-22 16:06:02.938 F/DEBUG ( 9340): pid: 6825, tid: 9326, name: RenderThread >>> com.xiaomi.smarthome:plugin2 <<< 08-22 16:06:02.938 F/DEBUG ( 9340): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xb74 08-22 16:06:02.938 F/DEBUG ( 9340): Cause: null pointer dereference 08-22 16:06:02.939 F/DEBUG ( 9340): r0 00000000 r1 00000000 r2 84f7151f r3 00000000 08-22 16:06:02.939 F/DEBUG ( 9340): r4 00000000 r5 8f97b800 r6 00000100 r7 00000078 08-22 16:06:02.939 F/DEBUG ( 9340): r8 00001aa9 r9 00001c39 sl b2b52fb5 fp 0000000b 08-22 16:06:02.939 F/DEBUG ( 9340): ip 84f7dd60 sp 8447a908 lr b2b52fe5 pc 84f62358 cpsr 600d0030 08-22 16:06:02.946 F/DEBUG ( 9340): 08-22 16:06:02.946 F/DEBUG ( 9340): backtrace: 08-22 16:06:02.946 F/DEBUG ( 9340): #00 pc 00020358 /system/lib/libRS_internal.so (android::renderscript::rsi_ContextInitToClient(android::renderscript::Context*)+11) 08-22 16:06:02.985 I/ADB_SERVICES( 7602): post waitpid (pid=9343) status=0000 08-22 16:06:02.993 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.weather2" 08-22 16:06:03.043 I/ADB_SERVICES( 7602): post waitpid (pid=9347) status=0000 08-22 16:06:03.058 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.wmsvc" 08-22 16:06:03.113 I/ADB_SERVICES( 7602): post waitpid (pid=9351) status=0000 08-22 16:06:03.114 I/crash_dump( 9340): socket name: android:aee_aed, sfd: 9 08-22 16:06:03.115 D/AEE_AED ( 648): $===AEE===AEE===AEE===$ 08-22 16:06:03.116 D/AEE_AED ( 648): p 2 poll events 1 revents 1

bairubing007 commented 5 years ago

内置了miss ,使用miss 做拉流操作。

lvjie0519 commented 5 years ago

@bairubing007 调用 Toast 是插件崩溃还是 摄像头播放sdk 崩溃? Toast放主线程试试?

bairubing007 commented 5 years ago

Toast 是在主线程内部,现象是拉流的时候,容易崩溃,不好断定崩溃在哪里。: 这段日志是在插件中,但是这个日志不崩溃也会出现。 android.content.res.Resources$NotFoundException: String resource ID #0x7f0c01b7 08-22 16:06:02.566 I/ADB_SERVICES( 7602): post waitpid (pid=9310) status=0000 08-22 16:06:02.570 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.player" 08-22 16:06:02.578 I/BufferQueueProducer( 393): com.xiaomi.smarthome/com.xiaomi.smarthome.frame.plugin.runtime.activity.PluginHostActivityPlugin2#0 queueBuffer: fps=8.89 dur=1012.90 max=886.65 min=5.67 08-22 16:06:02.591 W/System.err( 6825): at android.content.res.Resources.getText(Resources.java:351) 08-22 16:06:02.591 W/System.err( 6825): at android.content.res.Resources.getString(Resources.java:445) 08-22 16:06:02.592 W/System.err( 6825): at android.widget.ToastInjector.addAppName(ToastInjector.java:49) 08-22 16:06:02.592 W/System.err( 6825): at android.widget.Toast.makeText(Toast.java:284) 08-22 16:06:02.592 W/System.err( 6825): at android.widget.Toast.makeText(Toast.java:267)

我怀疑是这段日志最终导致报错,但是看不懂。 --------- beginning of crash 08-22 16:06:02.756 F/libc ( 6825): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xb74 in tid 9326 (RenderThread), pid 6825 (arthome:plugin2) 08-22 16:06:02.806 I/ADB_SERVICES( 7602): post waitpid (pid=9328) status=0000 08-22 16:06:02.810 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.video" 08-22 16:06:02.857 I/ADB_SERVICES( 7602): post waitpid (pid=9333) status=0000 08-22 16:06:02.870 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package" "=/base.apk=com.miui.virtualsim" 08-22 16:06:02.876 W/crash_dump32( 9340): type=1400 audit(0.0:642204): avc: denied { search } for name="com.xiaomi.smarthome" dev="dm-2" ino=318529 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 08-22 16:06:02.920 I/ADB_SERVICES( 7602): post waitpid (pid=9337) status=0000 08-22 16:06:02.928 I/crash_dump32( 9340): obtaining output fd from tombstoned, type: kDebuggerdTombstone 08-22 16:06:02.933 I//system/bin/tombstoned( 542): received crash request for pid 6825 08-22 16:06:02.933 I/ADB_SERVICES( 7602): service_to_fd shell:dumpsys "package"

lvjie0519 commented 5 years ago

@bairubing007 你把你那边代码贴一下吧, 拉流是调用的哪个api? 你是怎么toast消息的?不toast消息会出现崩溃吗?

bairubing007 commented 5 years ago

public void startPlay() { if (!initial()) return; mStreamClient.setClientListener(this); mStarted = true; mFirstFrame = false; isOnPauseVideo = false; mAudioEngine.startPlay(); mStreamClient.streamStart(new IMISSListener() { @Override public void onSuccess(String s, Object o) { Log.d(TAG, "CamerPlay_startPlay _onSuccess "+s); }

        @Override
        public void onFailed(int i, String s) {
            Log.d(TAG, "CamerPlay_startPlay _onFailed"+ s);
        }

        @Override
        public void onProgress(int i) {
            Log.d(TAG, "CamerPlay_startPlay _onProgress"+ i);
        }
    });
    clearQueue();
}

toast ------------ public static void showMessage(final Context context, final String msg) { Toast toast = null; toast = Toast.makeText(context, "", Toast.LENGTH_SHORT); toast.setText(msg); toast.show(); }

不弹不会崩溃

lvjie0519 commented 5 years ago

@wangchongwhut 让liyou 来看看吧

zanetti4 commented 5 years ago

Duplicate of #115

710224800 commented 5 years ago

日志显示很明确:android.content.res.Resources$NotFoundException: String resource ID ,请排查