ekryski / caress-server

NodeJS TUIO translator and event emitter
http://caressjs.com
MIT License
58 stars 11 forks source link

Infrequent argument error #11

Open amosk opened 10 years ago

amosk commented 10 years ago

I get this error at random times with the PQ Labs G4S 2-point. I can't replicate this reliably but it can happen several times an hour.

How can I help debug this error?

Socket.io Client Connected

buffer.js:82
      return this.asciiSlice(start, end);
                  ^
TypeError: Bad argument.
    at SlowBuffer.toString (buffer.js:82:19)
    at decodeString (/home/sidewalk/caress/node_modules/caress-server/lib/tuio-packet.js:291:19)
    at decode (/home/sidewalk/caress/node_modules/caress-server/lib/tuio-packet.js:213:17)
    at Packet.toJSON (/home/sidewalk/caress/node_modules/caress-server/lib/tuio-packet.js:93:17)
    at Socket.<anonymous> (/home/sidewalk/caress/node_modules/caress-server/lib/caress-server.js:60:57)
    at Socket.emit (events.js:70:17)
    at UDP.onMessage [as onmessage] (dgram.js:345:10)
ekryski commented 10 years ago

@amosk Sorry this issue slipped by my radar. I don't have a PQ labs overlay but I can try and look into the error handling. I think the buffertools dependency might be out of date which may be causing some weird issues. I'll try and take a look this week. Cheers!