Hello,
In the following piece of code, used to work. Now i was debugging something else (in debug mode) and i see an issue:
Code:
const auto& sDecouplingId = ulDlDecoupcells.m_bIsMultiplePair ? "NR cell decoupled more than once" : cpTddCell->GetID();
const auto& bEnableDecoupling = true;
pTddCopyCellCarrier->SetDecouplingId(sDecouplingId);
pTddCopyCellCarrier->SetDecouplingEnabled(bEnableDecoupling);
EnterCriticalSection(&m_CriticalSectionDB);
if (!BusinessObjects::BO_DBHelper::instance().Apply(pTddCopyCell.get(), pTddCopyCell.get()))
{
AI_Message::instance()->Add("Database Error. Failed to update cell: %s", pTddCopyCell->GetID());
LeaveCriticalSection(&m_CriticalSectionDB);
return;
}
LeaveCriticalSection(&m_CriticalSectionDB);
pSulCopyCellCarrier->SetDecouplingId(sDecouplingId);
pSulCopyCellCarrier->SetDecouplingEnabled(bEnableDecoupling);
The local variable "sDecouplingId " is having some garbage value after the LeaveCriticalSection() function !!!.
As it is release is closing, i found a shortcut and found and did the following change to it work
Code:
pSulCopyCellCarrier->SetDecouplingId(pTddCopyCellCarrier->GetDecouplingId());
pSulCopyCellCarrier->SetDecouplingEnabled(bEnableDecoupling);
I want to know, why the earlier code started to behave like that ?
I have not run in Release mode . Is it because of the debug mode ?
thanks
Pdk