sidorares/dbus-native

Dbus-native RPi and OMXPlayer - 64 Bit integers not supported

arntzy opened this issue · 6 comments

Hi all,

I'm trying to use dbus-native with nodejs to control my raspberry pi's native omxplayer. It keeps throwing the following error:

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: 64 Bit integers not supported
    at Object.MakeSimpleMarshaller.marshaller.check (/home/cactus/omxplayer/node_modules/dbus-native/lib/marshallers.js:181:23)
    at Object.MakeSimpleMarshaller.marshaller.marshall [as marshall] (/home/cactus/omxplayer/node_modules/dbus-native/lib/marshallers.js:184:22)
    at writeSimple (/home/cactus/omxplayer/node_modules/dbus-native/lib/marshall.js:112:20)
    at write (/home/cactus/omxplayer/node_modules/dbus-native/lib/marshall.js:92:14)
    at writeStruct (/home/cactus/omxplayer/node_modules/dbus-native/lib/marshall.js:32:5)
    at module.exports (/home/cactus/omxplayer/node_modules/dbus-native/lib/marshall.js:17:13)
    at Object.marshallMessage [as marshall] (/home/cactus/omxplayer/node_modules/dbus-native/lib/message.js:83:16)
    at EventEmitter.<anonymous> (/home/cactus/omxplayer/node_modules/dbus-native/index.js:126:29)
    at EventEmitter.g (events.js:291:16)
    at emitNone (events.js:86:13)

from reading the source, it appears to be trying to check the signature of the data and failing because 64bit isn't supported.

The video continues to play, as i'm using dbus-native to control the player, and the player itself doesn't crash, but my nodejs app does.

hi! In your case commenting out 64bit check function call might be enough. Can you try that?

Hi @sidorares, thanks for the swift response. I'm working on this issue with @arntzy. If I comment out the check like so:

        case 'x':
            //INT64
                marshaller.check = function(data) {
                throw new Error("64 Bit integers not supported");
            };
            marshaller.marshall = function(ps,data) {
                // this.check(data);
                // while the check method will throw an error - this code is left here
                // for when 64 bits will become supported
                ps.word64le(data);
                ps._offset += 8;
            };
            break;

The node app runs for a few more frames before crashing again, this time I get a broken pipe. I added a console log inside of marshallers.js to check when the function was called and what the signature was:

[marshallers.js] inside MakeSimpleMarshaller
y
[marshallers.js] inside MakeSimpleMarshaller
g
[marshallers.js] inside MakeSimpleMarshaller
s
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1022:11)
    at WriteWrap.afterWrite (net.js:801:14)

I probably need to try to reproduce locally
Can you post 1) steps to install OMXPlayer ( I have ubuntu machine at home ) 2) simple script to reproduce problem ?

Hi @sidorares,

I'm running Debian Jessie Lite on a Raspberry Pi 3 B+. The reasons for the issues I was experienced are explained here: sy1vain/omxplayer#1 (comment)

Just adding a note here. Release 0.2.3 should have full 64 bit support that is backwards compatible to previous versions.
https://github.com/sidorares/node-dbus#note-on-int64-x-and-uint64-t

couldn't this bug be closed now?