简体   繁体   中英

QT based Win7 app can't cope with the death of an I/O device

I'm writing a QT based native c++ app that uses QtSerialPort library under Win7. It communicates with it periodically( say every 5seconds ).
Problem is: the device that my app connects to via serial port, has power loss issues(can't change this). When this happens my app becomes hung and immortal: can't be killed by windows task manager or by process hacker ( a nice replacement for windows task manager )' termination facilities. Soft restart is the best solution at the hand.

Now how can my app cope with such device situation?

I would submit this question to Qt's interest mailing list (interest@qt-project.org). Since the QtSerialPort library is fairly new, bugs can appear when a wide user base starts using it. There is a good chance that the developers who wrote the library can give you a better solution or they find that this is a bug in their code and fix it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM