Closed Bug 1016294 Opened 10 years ago Closed 6 years ago

NFC: Assertion failed: (rfst != NUMBER_OF_NFC_RFSTS), function nfc_create_rf_intf_activated_ntf

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: posidron, Unassigned)

References

Details

(Keywords: assertion, crash, testcase)

Attachments

(3 files)

Attached file callstack
% ./run-emulator.sh

% telnet localhost 5554
[...]
nfc nci rf_intf_activated_ntf 0
Hi,

That comes from an invalid state. Did you switch on NFC?
No, I was running it out of the box.

Fwiw, I have used 'emulator-jb' but only because I had trouble in compiling 'emulator' and 'emulator-kk' on MacOS.
NFC is only supported by emulator-jb AFAIK. And you need to switch on NFC in the settings app first. The only thing we could improved here is the error message.
Keywords: assertion
Summary: Assertion failed: (rfst != NUMBER_OF_NFC_RFSTS), function nfc_create_rf_intf_activated_ntf → NFC: Assertion failed: (rfst != NUMBER_OF_NFC_RFSTS), function nfc_create_rf_intf_activated_ntf
Ah, roger. In that case I guess we can mark this as invalid?
Yes, but could you leave a comment in bug 1015127? We're collecting CLI problems there.
I just tested it again with NFC enabled.
Executing the command twice results in the same crash.
Blocks: 1015127
(In reply to Christoph Diehl [:cdiehl] from comment #6)
> I just tested it again with NFC enabled.
> Executing the command twice results in the same crash.

The reason is also invalid state, the first "nfc nci rf_intf_activated_ntf 0" command changes nfc to poll activate state. And in this state trigger another activated notification is not permitted in NFC spec.
Hi Christoph,

If you look into the NCI spec [1], Sec 5.2 you'll find the state machine of an NCI device. Many of the commands you enter activate transitions from one state to another. Entering a command in the wrong state, will kill the process. I know it's not pleasant to use, but helps a lot with debugging. ;)

[1] http://members.nfc-forum.org/specs/spec_dashboard/
Attached file logcat
Attached file emulator
(In reply to Christoph Diehl [:cdiehl] from comment #10)
> Created attachment 8430008 [details]
> emulator

This is a different log than the one discussed on irc.

In [1] you can see that rf_state is 0 (IDLE), which means that discovery has not been activated by nfcd before the test started.

[1] https://gist.github.com/posidron/10051214527c4b0bf2cd
Blocks: fuzzing-nfc
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: