qt 5.9.2读写串口,利用QModbusClient类,频繁读写时,运行一定时间后(20分钟、1小时……)串口发不出去数据,加上手动给它重连后经常会报异常,然后就是直接退出,debug最后的信息是
qt.modbus: (Client) Device is not connected
"in SerialModbus::sendModbusRawRequestBlock_test: Device not connected."
ASSERT failure in processQueue: "send timer active", file qmodbusrtuserialmaster_p.h, line 290
Debugging has finished
qt5.12.10 modbus 读写串口操作
两种崩溃情况,做下记录免得后来者继续踩坑
assert failure in processqueue unexpected state
assert failure in processqueue response timer active
解决方案:
5.13 的qt版本修复了这个问题
装上Qt5.13 .0后这个问题不再出现