Closed faizshukri closed 8 years ago
I got the same issue and using your suggestion the project built correctly but it fails during nfc reading:
xan@xan-K52Jc:~/newhtdocs/nfc-test/node-nfc$ node test.js
version: { name: 'libnfc', version: '1.7.1' }
devices: { 'acr122_usb:002:008':
{ name: 'ACS / ACR122U PICC Interface',
info:
{ chip: 'PN532 v1.6',
'initator mode modulations':
{ 'ISO/IEC 14443A': [ '106 kbps' ],
FeliCa: [ '424 kbps', '212 kbps' ],
'ISO/IEC 14443-4B': [ '106 kbps' ],
'Innovision Jewel': [ '106 kbps' ],
'D.E.P.': [ '424 kbps', '212 kbps', '106 kbps' ] },
'target mode modulations':
{ 'ISO/IEC 14443A': [ '106 kbps' ],
FeliCa: [ '424 kbps', '212 kbps' ],
'D.E.P.': [ '424 kbps', '212 kbps', '106 kbps' ] } } } }
{ deviceID: 'acr122_usb:002:008',
name: 'ACS / ACR122U PICC Interface' }
{ deviceID: 'acr122_usb:002:008',
name: 'ACS / ACR122U PICC Interface',
uid: 'f4:20:35:76',
type: 4,
tag: 'mifare-classic',
data: <Buffer 00 00 00 00 00 00 00 00 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 73 62 3a 30 30 32 3a 30 30 38 00 00 00 00 00 00 35 00 00 00 00 00 00 00 00 00 ... >,
offset: 64 }
[]
stopped
*** Error in `node': free(): invalid pointer: 0x00007fbb0c000a30 ***
Aborted (core dumped)
Any suggestion? cc @jeroenvollenbrock Thank you in advance
@xantrix: Could you try applying the fix to this fork: https://github.com/athombv/node-nfc ?
@jeroenvollenbrock I applied your fix at https://github.com/athombv/node-nfc/pull/1/files and it works like a charm! Thanks a lot!
Good to hear, i'll prepare a pull request.
Fixed in #18
It seem to work if I cast
offset
fromNan::New<Int32>(offset))
intoNan::New<Int32>((int)offset))