Giter Site home page Giter Site logo

Comments (17)

mint-dewit avatar mint-dewit commented on June 23, 2024

Hi,

What firmware version is the device running? We've developed this library against firmware 7.2 and I would expect the TVS to run fine. (IIRC someone in our team runs one as well)

The specific error is that the Atem is trying to tell us its logoRate is set to 0 frames, where we would expect to have at least 1 frame. This is similar to the implementation in LibAtem on which our command parsing is largely based.

from sofie-atem-connection.

JonStaleCarlsen avatar JonStaleCarlsen commented on June 23, 2024

Hi
Thank You for a swift reply!
We are running firmware 7.1.2, so that might very well be the case. I will test tomorrow and post the results.

from sofie-atem-connection.

JonStaleCarlsen avatar JonStaleCarlsen commented on June 23, 2024

Have now updated the TVS to firmware 7.2, but the error in node is identical.
When using the applest-atem library, everything works.
Any suggestions?

from sofie-atem-connection.

nytamin avatar nytamin commented on June 23, 2024

Are you trying to connect to the new Television Studio HD?

I'm connecting to the old Television Studio and that's working good.
EDIT: I was wrong, see my reply further down

from sofie-atem-connection.

jesperstarkar avatar jesperstarkar commented on June 23, 2024

But @baltedewit has the new one too....

from sofie-atem-connection.

jesperstarkar avatar jesperstarkar commented on June 23, 2024

Without looking at the code, and totally from the sideline here: Could it be that a setting (DVE transition time or something) has a valid value of 0 on the mixer of @JonStaleCarlsen, but we have a false check for this that requires it to be positive that needs to be changed? Easy test would be to manually change such a value on the mixer @JonStaleCarlsen and try again.

Disclaimer: I don't know what I'm talking about here...

from sofie-atem-connection.

nytamin avatar nytamin commented on June 23, 2024

My mistake, I accidently tested with an older version of atem-connection.
I get the same error on my Television Studio (the old one) on the current version (0.5.0).

from sofie-atem-connection.

Julusian avatar Julusian commented on June 23, 2024

Have you tried registering an error handler?

myAtem.on('error', (e) => console.log('error', e))

If I comment out the error handler in our usage I get a similar crash to do with MixEffectKeyFlyKeyframeGetCommand on my 1me
https://github.com/nrkno/tv-automation-state-timeline-resolver/blob/f46883e1710501c289a07c8d8a898b285108ce83/src/devices/atem.ts#L91

from sofie-atem-connection.

nytamin avatar nytamin commented on June 23, 2024

The rawCommand deserializeed in MixEffects/Transition/TransitionDVECommand is
<Buffer 00 02 00 04 00 00 00 01 00 00 01 00 00 00 00 00 00 0c 00 00>
it looks like rawCommand[2] (logoRate) is zero, which doesn't satisfy the 1 <= x <= 250 criteria

from sofie-atem-connection.

Julusian avatar Julusian commented on June 23, 2024

@nytamin does the TVS have a DVE?
The atem does send out commands filled with random data for features not supported, so this error is potentially 'expected'. Or if it does have a DVE it could be that it does not support that effect so the value is always set to 0. Which would pose a bit of a problem for validation as 0 is not valid in normal usage

from sofie-atem-connection.

JonStaleCarlsen avatar JonStaleCarlsen commented on June 23, 2024

I am on an old TVS for the time beeing, but I will use this code on the TVS HD and ME1 and ME2 as well.
When using
myAtem.on('error', (e) => console.log('error', e))
i get the following:

error Error: Number too small: 0 < 1
at Object.parseNumberBetween ( - - - \node_modules\atem-connection\dist\lib\atemUtil.js:23:19)
at TransitionDVECommand.deserialize ( - - - \node_modules\atem-connection\dist\commands\MixEffects\Transition\TransitionDVECommand.js:17:32)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:162:21)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._receivePacket ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:130:18)
at Socket._socket.on ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:110:60)
at emitTwo (events.js:126:13)
error Error: Number too big: 117440512 > 99990
at Object.parseNumberBetween ( - - - \node_modules\atem-connection\dist\lib\atemUtil.js:21:19)
at MixEffectKeyDVECommand.deserialize ( - - - \node_modules\atem-connection\dist\commands\MixEffects\Key\MixEffectKeyDVECommand.js:14:29)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:162:21)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
error Error: Number too big: 107 > 3
at Object.parseNumberBetween ( - - - \node_modules\atem-connection\dist\lib\atemUtil.js:21:19)
at MixEffectKeyFlyKeyframeGetCommand.deserialize ( - - - \node_modules\atem-connection\dist\commands\MixEffects\Key\MixEffectKeyFlyKeyframeGetCommand.js:11:35)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:162:21)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
error Error: Number too big: 73 > 3
at Object.parseNumberBetween ( - - - \node_modules\atem-connection\dist\lib\atemUtil.js:21:19)
at MixEffectKeyFlyKeyframeGetCommand.deserialize ( - - - \node_modules\atem-connection\dist\commands\MixEffects\Key\MixEffectKeyFlyKeyframeGetCommand.js:11:35)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:162:21)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
at AtemSocket._parseCommand ( - - - \node_modules\atem-connection\dist\lib\atemSocket.js:171:18)
ProgramInputCommand {
flag: 0,
rawName: 'PrgI',
mixEffect: 0,
properties: { source: 5 },
resolve: [Function],
reject: [Function] }

from sofie-atem-connection.

nytamin avatar nytamin commented on June 23, 2024

@Julusian yep, that's probably it. It doesn't have a DVE.

If I temporarily remove the validations, I get validation errors in several of the other parsers as well:
commands\MixEffects\Key\MixEffectKeyDVECommand
commands\MixEffects\Key\MixEffectKeyFlyPropertiesGetCommand
commands\MixEffects\Key\MixEffectKeyFlyKeyframeGetCommand

from sofie-atem-connection.

mint-dewit avatar mint-dewit commented on June 23, 2024

When using the applest-atem library, everything works.

Yes, that would be because the applest-atem library doesn't do any validation on the incoming data. (We've seen weird things like a 63rd MixEffect popping up)

If I temporarily remove the validations, I get validation errors in several of the other parsers as well:

Yeah, looks like @JonStaleCarlsen is seeing those same errors in the error log he posted before.

I'm not sure how to approach this, exactly. I'm worried that if we fail silently and still parse the rest of the command we might end up with undefined properties in the state. But dropping TVS support doesn't sound like a valid option either.

from sofie-atem-connection.

nytamin avatar nytamin commented on June 23, 2024

Yeah I think that failing silently is a bad strategy in the long run, it's better to throw errors and force us to improve the library.
We could perfaps filter out these garbage-filled messages based on state.info.capabilities.DVEs === 0?

from sofie-atem-connection.

JonStaleCarlsen avatar JonStaleCarlsen commented on June 23, 2024

Could the errors be caused by the original TVS lack of DVE? Then the same errors would apply to the Production Studio 4K as well.

from sofie-atem-connection.

JonStaleCarlsen avatar JonStaleCarlsen commented on June 23, 2024

Tested with a 2 M/E now, and that works as expected.
I cant to find an easy way to get the current tally status from the state on stateChanged. Any tip?

from sofie-atem-connection.

Julusian avatar Julusian commented on June 23, 2024

A prerelease of v2.0.0 has just been pushed to npm under the nightly tag yarn add atem-connection@nightly that should resolve this, along with other problems.
The parsing has been made a lot less picky on values to avoid errors like this, and any out of range ids are now debug warnings rather than errors.

We are happy that v2.0.0 should be stable, but want to spend a bit more time giving it some realistic testing before doing a proper release of it.

from sofie-atem-connection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.