[webnfc]Crash occurs when tap an NFC tag to device many times
Reported by
canx....@intel.com,
Apr 21 2017
|
|||||
Issue descriptionSteps to reproduce the problem: Test Case: https://github.com/thewebera/web-test-suite/blob/gh-pages/web-nfc/nfc/nfc_push_arraybuffer-manual.https.html 1.Run the test case 2.Tap an NFC tag to the test device with NFC support 3.repeat the step 1 and 2. What is the expected behavior? All the function works fine, no crash. What went wrong? Repeat the steps to reproduce many times over, the browser crash happened. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 60.0.3074.0 Channel: canary OS Version: Nexus 7(Android 5.1) Flash Version: Shockwave Flash 25.0 r0 The reappearance rate of crash was low, about run test case 10 times, the crash happened once. Crash log please refer to attachment.
,
Apr 21 2017
,
Apr 26 2017
Looks like tag is disconnected during read operation, https://developer.android.com/reference/android/nfc/tech/Ndef.html#getNdefMessage() should not throw IllegalStateException according to API documentation. I will try catching it to fix this issue.
,
Apr 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2dd2610dc05678f182b268412a63150b5fd8eacb commit 2dd2610dc05678f182b268412a63150b5fd8eacb Author: alexander.shalamov <alexander.shalamov@intel.com> Date: Thu Apr 27 06:55:06 2017 [webnfc] Handle IllegalStateException during read / write operations Accodring to Android documentation [1] read and write operations for Ndef technology, should not throw IllegalStateException, however, those operations do throw exception that must be handled. Unit tests are updated to check that exception is handled and correct error reported to caller. [1] https://developer.android.com/reference/android/nfc/tech/Ndef.html BUG= 714039 Review-Url: https://codereview.chromium.org/2845463004 Cr-Commit-Position: refs/heads/master@{#467610} [modify] https://crrev.com/2dd2610dc05678f182b268412a63150b5fd8eacb/device/nfc/android/java/src/org/chromium/device/nfc/NfcImpl.java [modify] https://crrev.com/2dd2610dc05678f182b268412a63150b5fd8eacb/device/nfc/android/java/src/org/chromium/device/nfc/NfcTagHandler.java [modify] https://crrev.com/2dd2610dc05678f182b268412a63150b5fd8eacb/device/nfc/android/junit/src/org/chromium/device/nfc/NFCTest.java
,
Apr 27 2017
,
May 4 2017
canx.cao@ Could you please verify? Thanks.
,
May 4 2017
I verified this issue in chrome 60.0.3087.3, it is blocked by https://bugs.chromium.org/p/chromium/issues/detail?id=717899 . I will verified it when the Issue#717899 is fixed.
,
May 4 2017
If you want to avoid releasing NFC adapter to system. Just add watch for 'any'.
Something like:
navigator.nfc.watch((message) => { console.log(JSON.stringify(message)); })
function testPush() {
navigator.nfc.push("Test " + Date.now()).then(testPush);
}
,
May 4 2017
function testPush() {
navigator.nfc.push("Test " + Date.now()).then(testPush);
}
navigator.nfc.watch((message) => { console.log(JSON.stringify(message)); })
navigator.nfc.push("Test " + Date.now()).then(testPush);
,
May 8 2017
I verified this issue in chrome 60.0.3089.0. Repeat the steps to reproduce more than 50 times,no crash occurs. Close.
,
Jun 17 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by canx....@intel.com
, Apr 21 2017