This is the more complicated way.
Just use deleterLater(). It has the same effect. After the next round the
eventloop the object will be deleted.
I'm not trying to delete the serial port object, I'm just trying to close the
serial port so that I stop listening.
Sean
Closing a device within a read slot sounds dodgy anyway. In these cases, I
usually do
QTimer::singleShot(0, ...) and do the close in that slot.
I thought about doing the single shot as well.
Is there a more concrete reason (other than it sounding dodgy) that you feel
like the way I'm
Sorry, I mis-understood you and thought wanted to delete the object. This is
definitely a no-no inside the slot.
I saw you on windows which creates a thread for handling the device.
I have not looked into it, but it could be that it is trying to stop/delete
this thread when closing. This could
Seam wrote:
Sent: Friday, 31 October 2014 12:43 AM
Closing a device within a read slot sounds dodgy anyway. In these
cases, I usually do QTimer::singleShot(0, ...) and do the close in that
slot.
I thought about doing the single shot as well.
Is there a more concrete reason (other
I'm getting a weird issue where I can repeatedly cause a crash to happen in
QSerialPort if I attempt to close the serial port when I'm in a slot connected
to the readyRead() signal, and I'm just wondering if I'm doing something weird.
I've got a class that inherits from QSerialPort. I
Your version of QtSerialPort is too very old (according to call-stack).
Please update to latest (e.g. to 5.3.2/5.3.3).
I'll try to upgrade then. If that's all it is, that'd be great!
Sean
I’m getting a weird issue where I can repeatedly cause a crash to happen in
QSerialPort if I attempt
Your version of QtSerialPort is too very old (according to call-stack).
Please update to latest (e.g. to 5.3.2/5.3.3).
I'll try to upgrade then. If that's all it is, that'd be great!
Looks like that has fixed the problem. Thanks for the help!
Sean
...@qt-project.org] On Behalf Of
Murphy, Sean
Sent: Thursday, 30 October 2014 5:36 AM
To: interest@qt-project.org
Subject: [Interest] Crash in QSerialPort when closing?
I'm getting a weird issue where I can repeatedly cause a crash to happen in
QSerialPort if I attempt to close the serial port when