bitfocus / companion-module-studiocoast-vmix

Studiocoast vMix module for Bitfocus Companion
MIT License
32 stars 10 forks source link

Bug: Cannot read properties of null (reading 'number') #201

Closed Julusian closed 1 year ago

Julusian commented 1 year ago

Describe the bug

This line is problematic, and is ignoring the fact that input can be null. This causes the feedback to throw an error, which is handled but could cause the state to get stuck to an incorrect value.

https://github.com/bitfocus/companion-module-studiocoast-vmix/blob/6e8a852fe50b0e602c7f7ae1c38a74db7df0ba13/src/feedback.ts#L625

To Reproduce Steps to reproduce the behaviour:

Not entirely sure, I am using a database from a user to look into some other issues.

Expected behaviour A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

System (please complete the following information):

Additional context

Feedback check failed: {"id":"ZooVxGudgu","controlId":"bank:60-4","feedbackId":"overlayStatus","options":{"input":"TEST","overlay":"1","fg":16777215,"bgPreview":65280,"bgProgram":16711680},"disabled":false,"image":{"width":72,"height":72},"page":60,"bank":4,"referencedVariables":null} - Cannot read properties of null (reading 'number') TypeError: Cannot read properties of null (reading 'number')
    at /home/julus/Projects/companion2a/module-local-dev/companion-module-studiocoast-vmix/dist/feedback.js:148:66
    at Array.map (<anonymous>)
    at Object.callback (/home/julus/Projects/companion2a/module-local-dev/companion-module-studiocoast-vmix/dist/feedback.js:148:45)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /home/julus/Projects/companion2a/module-local-dev/companion-module-studiocoast-vmix/node_modules/@companion-module/base/dist/internal/feedback.js:227:35
thedist commented 1 year ago

Fixed in v3.1.1