CODA: Creator crashed when more than one debugging session is launched

The problem here is in the callback mechanism. When CodaGdbAdapter is closed
it tries to close the application on the mobile. If the CodaGdbAdapter is destroyed
short afterwards the response is propagated to an invalid object.

Task-number: QTCREATORBUG-4713
This commit is contained in:
Pawel Polanski
2011-05-04 11:23:54 +02:00
parent b8e6fd2b66
commit 6364c9366f

View File

@@ -163,6 +163,9 @@ void CodaGdbAdapter::setupTrkDeviceSignals()
CodaGdbAdapter::~CodaGdbAdapter()
{
if (m_codaDevice)
SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaDevice);
cleanup();
logMessage("Shutting down.\n");
}
@@ -1222,6 +1225,8 @@ void CodaGdbAdapter::cleanup()
m_gdbServer = 0;
if (m_codaDevice) {
// Ensure process is stopped after being suspended.
// This cannot be used when the object is deleted
// as the responce will return to a not existing object
sendRunControlTerminateCommand();
disconnect(m_codaDevice.data(), 0, this, 0);
SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaDevice);