camme / node-nfc

A first try at binding libnfc to node. This project is right now not good enough to use.
68 stars 39 forks source link

Pointer being freed was not allocated #17

Closed faizshukri closed 8 years ago

faizshukri commented 8 years ago

After compile the code, I try to run the test file. However, I got an error about pointer being freed was not allocated.

Here the full output.

version: { name: 'libnfc', version: '1.7.0' }
devices: { 'acr122_pcsc:ACS ACR122U':
   { name: 'ACS ACR122U / ACR122U214',
     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_pcsc:ACS ACR122U',
  name: 'ACS ACR122U / ACR122U214' }
{ deviceID: 'acr122_pcsc:ACS ACR122U',
  name: 'ACS ACR122U / ACR122U214',
  uid: '04:99:84:6a:43:2f:80',
  type: 68,
  tag: 'mifare-ultralight',
  data: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 84 01 01 00 00 00 50 5b 84 01 01 00 00 00 02 00 52 31 32 32 55 00 80 02 16 10 00 00 07 00 01 00 ... >,
  offset: 16 }
[]
stopped
node(28605,0x7fff790d2000) malloc: *** error for object 0x101600b20: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
[1]    28605 abort      node test.js

Reader: ACR122U Tag: Mifare Ultralight OS: OSX El Capitan Node: 4.2.1

faizshukri commented 8 years ago

I try with Node v0.10 and v0.12, both work fine. The error occurs for v4

jeroenvollenbrock commented 8 years ago

fixed in #18