OpenZWave / node-openzwave-shared

OpenZWave addon for Node.js (all versions) including management and security functions
Other
199 stars 113 forks source link

Segmentation fault when setting a value #350

Closed Be2daErtin closed 4 years ago

Be2daErtin commented 4 years ago

Hi,

I'm getting segmentation fault running test2.js and trying to set nodeID 7.

I can set node 4 - FGD211 But not node 7 - FGD212

Please see below: `> console.log(nodes[4]) { manufacturer: 'FIBARO System', manufacturerid: '0x010f', product: 'FGD211 Universal Dimmer 500W', producttype: '0x0100', productid: '0x0109', type: 'Multilevel Power Switch', name: '', loc: '', classes: { '38': { '0': [Object], '1': [Object], '2': [Object], '3': [Object], '4': [Object] }, '39': { '0': [Object] }, '43': { '0': [Object], '1': [Object] }, '112': { '1': [Object], '6': [Object], '7': [Object], '8': [Object], '9': [Object], '10': [Object], '11': [Object], '12': [Object], '13': [Object], '14': [Object], '15': [Object], '16': [Object], '17': [Object], '18': [Object], '19': [Object], '20': [Object], '30': [Object], '39': [Object], '40': [Object], '41': [Object] }, '114': { '0': [Object], '1': [Object], '2': [Object], '3': [Object], '4': [Object] }, '115': { '0': [Object], '1': [Object], '2': [Object], '3': [Object], '4': [Object], '5': [Object], '6': [Object], '7': [Object], '8': [Object], '9': [Object] }, '134': { '0': [Object], '1': [Object], '2': [Object] } }, ready: true } undefined

console.log(nodes[7]) { manufacturer: 'FIBARO System', manufacturerid: '0x010f', product: 'FGD212 Dimmer 2', producttype: '0x0102', productid: '0x1000', type: 'Light Dimmer Switch', name: '', loc: '', classes: { '38': { '0': [Object], '1': [Object], '2': [Object], '3': [Object], '4': [Object], '5': [Object], '6': [Object], '7': [Object], '8': [Object] }, '39': { '0': [Object] }, '43': { '0': [Object], '1': [Object] }, '49': { '4': [Object] }, '50': { '0': [Object], '8': [Object], '32': [Object], '33': [Object] }, '94': { '0': [Object], '1': [Object], '2': [Object] }, '112': { '1': [Object], '2': [Object], '3': [Object], '4': [Object], '5': [Object], '6': [Object], '7': [Object], '8': [Object], '9': [Object], '10': [Object], '11': [Object], '13': [Object], '14': [Object], '15': [Object], '16': [Object], '19': [Object], '20': [Object], '21': [Object], '22': [Object], '23': [Object], '24': [Object], '25': [Object], '26': [Object], '27': [Object], '28': [Object], '29': [Object], '30': [Object], '31': [Object], '32': [Object], '33': [Object], '34': [Object], '35': [Object], '37': [Object], '38': [Object], '39': [Object], '40': [Object], '41': [Object], '42': [Object], '43': [Object], '44': [Object], '45': [Object], '46': [Object], '47': [Object], '48': [Object], '49': [Object], '50': [Object], '52': [Object], '53': [Object], '54': [Object], '58': [Object], '59': [Object] }, '113': { '4': [Object], '8': [Object], '9': [Object], '256': [Object] }, '114': { '0': [Object], '1': [Object], '2': [Object], '3': [Object], '4': [Object] }, '115': { '0': [Object], '1': [Object], '2': [Object], '3': [Object], '4': [Object], '5': [Object], '6': [Object], '7': [Object], '8': [Object], '9': [Object] }, '117': { '0': [Object] }, '134': { '0': [Object], '1': [Object], '2': [Object] } }, ready: true } undefined zwave.setValue(4,38,1,0,50); 2019-10-10 19:51:07.456 Info, Node004, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 50 2019-10-10 19:51:07.456 Info, Node004, SwitchMultilevel::Set - Setting to level 50 2019-10-10 19:51:07.456 Detail, Node004, Queuing (Send) SwitchMultilevelCmd_Set (Node=4): 0x01, 0x0a, 0x00, 0x13, 0x04, 0x03, 0x26, 0x01, 0x32, 0x25, 0x99, 0x48 2019-10-10 19:51:07.456 Detail, Node004, Queuing (Send) SwitchMultilevelCmd_Get (Node=4): 0x01, 0x09, 0x00, 0x13, 0x04, 0x02, 0x26, 0x02, 0x25, 0x9a, 0x78 2019-10-10 19:51:07.456 Detail, 2019-10-10 19:51:07.456 Info, Node004, Sending (Send) message (Callback ID=0x99, Expected Reply=0x13) - SwitchMultilevelCmd_Set (Node=4): 0x01, 0x0a, 0x00, 0x13, 0x04, 0x03, 0x26, 0x01, 0x32, 0x25, 0x99, 0x48 2019-10-10 19:51:07.456 Info, Node004, Encrypted Flag is 0 undefined 2019-10-10 19:51:07.461 Detail, Node004, Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8 2019-10-10 19:51:07.461 Detail, Node004, ZW_SEND_DATA delivered to Z-Wave stack 2019-10-10 19:51:07.496 Detail, Node004, Received: 0x01, 0x05, 0x00, 0x13, 0x99, 0x00, 0x70 2019-10-10 19:51:07.496 Detail, Node004, ZW_SEND_DATA Request with callback ID 0x99 received (expected 0x99) 2019-10-10 19:51:07.496 Info, Node004, Request RTT 39 Average Request RTT 53 2019-10-10 19:51:07.496 Detail, Expected callbackId was received 2019-10-10 19:51:07.496 Detail, Expected reply was received 2019-10-10 19:51:07.496 Detail, Message transaction complete 2019-10-10 19:51:07.496 Detail, 2019-10-10 19:51:07.496 Detail, Node004, Removing current message 2019-10-10 19:51:07.496 Detail, 2019-10-10 19:51:07.496 Info, Node004, Sending (Send) message (Callback ID=0x9a, Expected Reply=0x04) - SwitchMultilevelCmd_Get (Node=4): 0x01, 0x09, 0x00, 0x13, 0x04, 0x02, 0x26, 0x02, 0x25, 0x9a, 0x78 2019-10-10 19:51:07.496 Info, Node004, Encrypted Flag is 0 2019-10-10 19:51:07.501 Detail, Node004, Received: 0x01, 0x04, 0x01, 0x13, 0x01, 0xe8 2019-10-10 19:51:07.501 Detail, Node004, ZW_SEND_DATA delivered to Z-Wave stack 2019-10-10 19:51:07.538 Detail, Node004, Received: 0x01, 0x05, 0x00, 0x13, 0x9a, 0x00, 0x73 2019-10-10 19:51:07.538 Detail, Node004, ZW_SEND_DATA Request with callback ID 0x9a received (expected 0x9a) 2019-10-10 19:51:07.538 Info, Node004, Request RTT 41 Average Request RTT 47 2019-10-10 19:51:07.538 Detail, Expected callbackId was received 2019-10-10 19:51:07.577 Detail, Node004, Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x04, 0x03, 0x26, 0x03, 0x32, 0xe2 2019-10-10 19:51:07.577 Detail, 2019-10-10 19:51:07.577 Info, Node004, Response RTT 80 Average Response RTT 93 2019-10-10 19:51:07.577 Info, Node004, Received SwitchMultiLevel report: level=50 2019-10-10 19:51:07.577 Detail, Node004, Refreshed Value: old value=99, new value=50, type=byte 2019-10-10 19:51:07.577 Detail, Node004, Changes to this value are not verified 2019-10-10 19:51:07.577 Detail, Node004, Expected reply and command class was received 2019-10-10 19:51:07.577 Detail, Node004, Message transaction complete 2019-10-10 19:51:07.577 Detail, 2019-10-10 19:51:07.577 Detail, Node004, Removing current message 2019-10-10 19:51:07.577 Detail, Node004, Notification: ValueChanged node4: changed: 38:Level:99->50 zwave.setValue(7,38,1,0,50); 2019-10-10 19:51:20.719 Info, Node007, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 50 2019-10-10 19:51:20.719 Info, Node007, SwitchMultilevel::Set - Setting to level 50 zsh: segmentation fault node

`

robertsLando commented 4 years ago

@Be2daErtin What hardware/OS are you using? What version of openzwave? Could you also append the code ?

Be2daErtin commented 4 years ago

Hi,

Openzwave: 1.6 OS: Mac OSX (Mojave and High Sierra)

The code above is from running .load test2.js

robertsLando commented 4 years ago

@Fishwaldo Any idea?

Be2daErtin commented 4 years ago

I can control version 1 (FGD211) of the dimmer but not version 2 (FGD211). FGD211 results in a segment fault....

Fishwaldo commented 4 years ago

Known issue. Work around is to restart after adding a a multichannel device with a dimmer.

robertsLando commented 4 years ago

@Fishwaldo Thanks.

Be2daErtin commented 4 years ago

I will test this and feedback. I think I did restart but will have to try this again and will let you know.

Be2daErtin commented 4 years ago

Ok so a restart did not work.

zwave.setValue(7,38,1,0,50); 2019-10-14 20:17:00.173 Info, Node007, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 50 2019-10-14 20:17:00.173 Info, Node007, SwitchMultilevel::Set - Setting to level 50 Segmentation fault: 11

fredolphin commented 4 years ago

Hello,

I have the same issue with a Qubino "ZMNHJD1 Flush Dimmer Pilot Wire"on Raspberry 3 and a Razberry.

Even after multiple restart, The issue still appears Intermittenly.

I've never got this error with Openzwave 1.4.x and node-openzwave 1.4.y

Thank you

Be2daErtin commented 4 years ago

Any ideas yet?

fredolphin commented 4 years ago

Look at the workaround detailed here : https://github.com/OpenZWave/open-zwave/issues/1981

It doesn't fix the root cause, but meanwhile it get fixed, this workaround is working fine for me. No more crash.

ekarak commented 4 years ago

closing old issue