Closed si5haoa closed 2 years ago
Looks like an Android internal issue, not an issue in this library. is it reproducible?
appear inevitably 。 I have used usbSerial. jar with the same device before and did not find this problem
have you tried rebooting your Android device?
The same thing happens after restarting the device Getting messages is getting slower and slower and then crashes
did the App already recieved a lot of data? This example app simple adds everything to the TextView, which gets significantly slower the more data is shown. Maybe you simply ran into timeout or out-of-memory issue.
Thank you, I will remove the relevant part of the UI and test it, and simply send and receive data to test
Thank you very much, I will delete the UI and receive the data, no problem
run UsbSerialExamples set baudRate = 115200 Usb device:50HZ/1s 64bytes/packet
The data received was subcontracted run 5min
2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] DALVIK THREADS (16): 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] "SerialInputOutputManager" prio=10 tid=16 Runnable 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] | group="" sCount=0 dsCount=0 obj=0x12de31f0 self=0x7d7fc95200 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] | sysTid=13705 nice=-19 cgrp=default sched=0/0 handle=0x7d72005450 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] | state=R schedstat=( 19998802097 1685853068 53323 ) utm=1389 stm=610 core=5 HZ=100 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] | stack=0x7d71f03000-0x7d71f05000 stackSize=1037KB 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] | held mutexes= "mutator lock"(shared held) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #00 pc 000000000047ef3c /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+220) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #01 pc 000000000047ef38 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+216) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #02 pc 0000000000452fc4 /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+480) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #03 pc 000000000046ab4c /system/lib64/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+832) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #04 pc 0000000000453f28 /system/lib64/libart.so (_ZN3art6Thread21RunCheckpointFunctionEv+192) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #05 pc 0000000000100084 /system/lib64/libart.so (_ZN3art27ScopedObjectAccessUncheckedD2Ev+580) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #06 pc 000000000010b474 /system/lib64/libart.so (_ZN3art8CheckJNI23SetPrimitiveArrayRegionEPKcNS_9Primitive4TypeEP7_JNIEnvP7_jarrayiiPKv+1156) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #07 pc 0000000000144bf0 /system/lib64/libandroid_runtime.so (???) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] native: #08 pc 0000000000e340ac /data/dalvik-cache/arm64/system@framework@boot.oat (Java_android_hardware_usb_UsbRequest_native_1dequeue_1array___3BIZ+168) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] at android.hardware.usb.UsbRequest.native_dequeue_array(Native method) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] at android.hardware.usb.UsbRequest.dequeue(UsbRequest.java:159) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] at android.hardware.usb.UsbDeviceConnection.requestWait(UsbDeviceConnection.java:245) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] at com.hoho.android.usbserial.driver.CommonUsbSerialPort.read(CommonUsbSerialPort.java:192) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] at com.hoho.android.usbserial.driver.CommonUsbSerialPort.read(CommonUsbSerialPort.java:159) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] at com.hoho.android.usbserial.util.SerialInputOutputManager.step(SerialInputOutputManager.java:225) 2022-02-21 16:51:18.003 13616-13616/com.hoho.android.usbserial.examples A/art: art/runtime/runtime.cc:422] at com.hoho.android.usbserial.util.SerialInputOutputManager.run