Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum call stack size exceeded error #2

Open
ceremcem opened this issue Aug 25, 2015 · 6 comments
Open

Maximum call stack size exceeded error #2

ceremcem opened this issue Aug 25, 2015 · 6 comments
Milestone

Comments

@ceremcem
Copy link

Sometimes it runs for minutes, sometimes it doesn't even start and throws the following error:

buffer.js:277
Buffer.isBuffer = function isBuffer(b) {
                                   ^
RangeError: Maximum call stack size exceeded

source is as follows:

// Generated by LiveScript 1.3.1
(function(){
  console.log("Reader started...");

  var llrp = require('llrp');

  var reader = new llrp({
      ipaddress: '192.168.1.100'
  });

  reader.connect();

  reader.on('timeout', function () {
      console.log('timeout');
  });

  reader.on('disconnect', function () {
      console.log('disconnect');
  });

  reader.on('error', function (error) {
      console.log('error: ' + JSON.stringify(error));
  });

  /* 
  reader.on('didSeeTag', function (tag) {
      console.log('TAG: ' + tag.tagID);
  });
  */

  reader.on('didSeeTag', function(tag){
    if (in$("19b2", tag.tagID)) {
      console.log("we found what we looking for: ", tag.tagID);
    } else {
      console.log("---------------------------", tag.tagID);
    }
  });
  function in$(x, xs){
    var i = -1, l = xs.length >>> 0;
    while (++i < l) if (x === xs[i]) return true;
    return false;
  }
}).call(this);
@GlennGeenen
Copy link

I'm aware of this problem. The package was a test and isn't ready for any serious use. The reader sends all data it can see to node with the tagdata attached, so node explodes. Normally you want the reader to notify you for changes and to read all tags every x milliseconds instead of the reader sending you everything. I still use LLRP toolkit (http://www.llrp.org) until I have time to write a good implementation in node. It's on my todo list.

@GlennGeenen GlennGeenen added this to the 1.0.0 milestone Aug 25, 2015
@ceremcem
Copy link
Author

If I understand correctly, this is caused by very big/fast data blocks sent by the reader. I'm trying to dig this a bit.

@GlennGeenen
Copy link

Yes the reader sends more events / data to node than node can handle. I have set myself the goal to have a proper node implementation by the end of the year.

@meneva
Copy link

meneva commented Mar 19, 2018

Hello... I am trying to implement this module with FX7500(zebra motorolla RFID reader) . can we stop the counting once it finished reading all tags in range ? now it's just keep counting ...

@GlennGeenen
Copy link

That's how an RFID reader works, it reads till you tell it to stop reading. This library was a test, I do not intend to fix anything since I use other solutions (not LLRP), Zebra provides you with an SDK for your reader.

@meneva
Copy link

meneva commented Mar 20, 2018

Hello Glenngeenen thanks for this nice LLRP implementation. I found it useful to test my RFID reader(fx7500). it was reading the tags nicely... but now suddenly it does not count anything. nodejs just running and timeout. can u pls suggest me what can be the reason ? it will be really helpful for me. thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants