Closed berdroid closed 4 years ago
I think the exception was caused by a race condition between the onReceiveData()
method and the onCancel
method setting m_EventSink
to null.
Possible fix: before actually calling m_EventSink.success(arg0)
(line 67) the run()
method should check for m_EventSink != null
again, as it may have been set to null in the mean time.
This seems to be easily provoked by plugging/unplugging a USB serial adapter several times
Running on Android 6.0.1 my app was closed by the system.
Android LogCat showed an null-reference exception at UsbSerialPortAdapter.java:67: