When removing an Zigbee network device that is online (go into device view, click the "wrench" in the top-right corner, click "Remove network" button) nymea dies. I've attached the backtrace and the log messages that happen right after the button click.
Haven't had the time to go into debugging this more extensively but I've poked around a bit. This seems suspicious:
(gdb) up 13
nymea/nymea-plugins-zigbee#13 0x000055555556fed8 in QDebug::operator<< (this=0x7fffffffdc00, t=...) at /usr/include/qt5/QtCore/qdebug.h:161
161 inline QDebug &operator<<(const QString & t) { putString(t.constData(), uint(t.length())); return maybeSpace(); }
(gdb) p t.length()
$1 = 21840
(gdb) p t
$2 = (const QString &) @0x7fffffffdb70: {d = 0x55555587e380}
(gdb) up
nymea/nymea-plugins-zigbee#14 0x00007ffff76570e4 in operator<< (debug=..., node=0x55555599ec20) at zigbeenode.cpp:1067
1067 debug.nospace().noquote() << ", " << node->manufacturerName() << " (" << ZigbeeUtils::convertUint16ToHexString(node->nodeDescriptor().manufacturerCode) << ")";
(gdb) p node->manufacturerName()
$3 = {d = 0x55555587e380}
So the QString that's crashing nymea is ZigbeeNode::m_manufacturerName and it has a weird length.
Very wild guess: Destructors are being called in an order that this string has already been destroyed. That guess came up when looking at the backtrack. Specifically:
nymea/nymea-plugins-zigbee#15 0x00007ffff763d522 in ZigbeeNodeEndpoint::~ZigbeeNodeEndpoint (this=0x5555559fe1c0, __in_chrg=<optimized out>) at zigbeenodeendpoint.cpp:176
nymea/nymea-plugins-zigbee#16 0x00007ffff763d5e0 in ZigbeeNodeEndpoint::~ZigbeeNodeEndpoint (this=0x5555559fe1c0, __in_chrg=<optimized out>) at zigbeenodeendpoint.cpp:177
[...]
nymea/nymea-plugins-zigbee#19 0x00007ffff7696216 in ZigbeeNode::~ZigbeeNode (this=0x55555599ec20, __in_chrg=<optimized out>)
at /home/wagnerflo/coding/nymea/nymea-zigbee/libnymea-zigbee/zigbeenode.h:44
nymea/nymea-plugins-zigbee#20 0x00007ffff7696232 in ZigbeeNode::~ZigbeeNode (this=0x55555599ec20, __in_chrg=<optimized out>)
at /home/wagnerflo/coding/nymea/nymea-zigbee/libnymea-zigbee/zigbeenode.h:44
Feel free to send me instructions on what gdb commands to throw at the issue.
network-remove.log
network-remove.backtrace.txt
When removing an Zigbee network device that is online (go into device view, click the "wrench" in the top-right corner, click "Remove network" button) nymea dies. I've attached the backtrace and the log messages that happen right after the button click.
Haven't had the time to go into debugging this more extensively but I've poked around a bit. This seems suspicious:
So the QString that's crashing nymea is
ZigbeeNode::m_manufacturerNameand it has a weird length.Very wild guess: Destructors are being called in an order that this string has already been destroyed. That guess came up when looking at the backtrack. Specifically:
Feel free to send me instructions on what gdb commands to throw at the issue.
network-remove.log
network-remove.backtrace.txt