Problem with CLogViewEvent and CLogFilter cleanup
| Fri, 2005-02-18 16:12 | |
|
hello everybody
I have a little problem: application crashes when destroying log objects after CLogViewEvent object is initialized (with SetFilterL). If SetFilterL is not called - everything is cleaned fine. If call to SetFilterL is made - application crashes when exiting. what can be the problem? some code here: Code: //declarations from header file CLogFilter *m_pLogFilter; CLogClient *m_pLogClient; CLogViewEvent *m_pLogView; CLogEvent *m_pEvent; RFs iFs; //some functions bodies from source file void CCallLog::ConstructL() { m_pEvent = CLogEvent::NewL(); iFs.Connect(); m_pLogClient = CLogClient::NewL(iFs); m_pLogView = CLogViewEvent::NewL(*m_pLogClient,CActive::EPriorityStandard ); m_pLogFilter = CLogFilter::NewL(); } void CCallLog::Refresh(int _type) { switch(_type) { case CALL_LOG_TYPE_INCOMING: m_pLogFilter->SetDirection(_L("Incoming")); break; case CALL_LOG_TYPE_OUTGOING: m_pLogFilter->SetDirection(_L("Outgoing")); break; case CALL_LOG_TYPE_MISSED: m_pLogFilter->SetDirection(_L("Missed")); break; }; m_pLogView->Cancel(); m_pLogView->SetFilterL(*m_pLogFilter, iStatus); SetActive(); } void CCallLog::RunL() { if( iStatus == KErrNone) { m_pEvent = (CLogEvent*)&m_pLogView->Event(); } } CCallLog::~CCallLog() { m_pLogView->Cancel(); m_pLogClient->Cancel(); CActive::Cancel(); m_pCB=0; if(m_pEvent) {delete m_pEvent;} m_pEvent=0; if(m_pLogFilter) delete m_pLogFilter; m_pLogFilter=0; if(m_pLogView) delete m_pLogView; m_pLogView=0; if(m_pLogClient) {delete m_pLogClient;} m_pLogClient=0; iFs.Close(); } generally everything works.. I get log events what i need. but that crash is a pain. Maybe there are some rules - to destroy CLogViewEvent and not to destroy CLogFilter or smothing like this. I couldnt find anything on it in documentation. and everything I tried doesn't help. Thanks Tssp |
|






Forum posts: 34
I try to test your code but when I start CallLog and I make one missed call application never go to RUNL
with iStatus == KErrorNone. When it go in RunL status is != kErrorNone and event from CLogEvent is empty! Wath is wrong. So I cann't reproduce your error
Dilian
Forum posts: 21
For example it is "Missed call" and not "Missed"
series60.ch