Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.0
-
None
-
Ubuntu 14.04 GCC 4.8.4
-
If536f9cf5cbc1b813d3642bdf9be0867e06368e8
Description
Function QSerialPort::close() was called after receiving QSerialPort::ResourceError (occurs due to ejecting device: Profilic Technology 2303, Silicon Labs ea60) crashs application with output:
ASSERT: "m_buf" in file /opt/Qt5.7/5.7/gcc_64/include/QtCore/5.7.0/QtCore/private/qiodevice_p.h, line 102.
qserialport_unix.cpp
bool QSerialPortPrivate::readNotification() { ... if (readBytes <= 0) { QSerialPortErrorInfo error = getSystemError(); if (error.errorCode != QSerialPort::ResourceError) error.errorCode = QSerialPort::ReadError; else setReadNotificationEnabled(false); setError(error); buffer.chop(bytesToRead); // <-------- PLACE OF CRASH return false; } ... return true; }
Attachments
For Gerrit Dashboard: QTBUG-55847 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
170601,3 | Fix crash after closing of ejected device on Linux | 5.7 | qt/qtserialport | Status: MERGED | +2 | 0 |