Problem during selecting contact from Log
Hi All,
I have created a VOIP application in which i have to select recent dialed calls or received call from log. When i select the any number, number get selected and appeares to application home screen.
But after this application got crashed.
Here is the code please suggest me if i am doing any thing wrong.
Thanks.
=========================================================================================================
TBool CMobileDialerCallHistoryView::HandleControlPaneLeftSoftKeyPressedL( TInt aCommand )
{
CAknSingleStyleListBox* iListBox = new(ELeave) CAknSingleStyleListBox;
iListBox = (CAknSingleStyleListBox*)iMobileDialerCallHistory->ComponentControl(0);
TInt Count = iListBox->Model()->ItemTextArray()->MdcaCount();
if(iListBox->Model()->NumberOfItems()==0)
{
CAknInformationNote* note = new ( ELeave ) CAknInformationNote();
HBufC* noteText ;
TBufC<50> note1(_L("No Item Found"));
noteText = note1.AllocL();
note->ExecuteLD( *noteText );
}
else
{
CTextListBoxModel* model = iListBox->Model();
CDesCArray* desArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());
CleanupStack::PushL(desArray);
TInt index = iListBox->CurrentItemIndex();
TInt desArraySize = desArray->MdcaCount() -1;
for(TInt i=0 ;i<=desArraySize ;i++)
{
if(index == i)
{
HBufC* item = HBufC::NewLC(30);
item = (HBufC*)(*desArray)[i].AllocLC();
const TUid KCustomMessageUid= {2};
TBuf<100> name ;
_LIT ( KStringHeader, "%S" );
name.Format(KStringHeader , item);
name.Trim();
HBufC8* items = CnvUtfConverter::ConvertFromUnicodeToUtf8L(name);
AppUi()->ActivateLocalViewL(TUid::Uid(EMobileDialerContainerViewId),
KCustomMessageUid ,*items );
}
}
CleanupStack::Pop();
}
return EFalse;
}
=========================================================================================================
Re: Problem during selecting contact from Log
Number of items popping out of the CleanUpStack in the [B]else [/B] part of the code is less then the number of items pushed onto it(CleanupStack::PushL(desArray),HBufC* item = HBufC::NewLC(30), item = (HBufC*)(*desArray)[i].AllocLC() -> 3 items pushed, popped only 1)
Anyways you first need to mention about the crash message you get.
Re: Problem during selecting contact from Log
I can not see the error message, because using Carbide and don't know how to debug.
Could you tell me any other way..
Re: Problem during selecting contact from Log
You must be trying the app in device i suppose, so you can see the crash messages using : [url]http://www.developer.nokia.com/Community/Wiki/Extended_panic_code[/url]
Simple install the sis file(ErrRd.sis) as given in above link.
Re: Problem during selecting contact from Log
I am getting the error
App Closed
Softphone:
KERN-EXEC 3
Please suggest me, what i can do in this case.
Re: Problem during selecting contact from Log
Every time carbide is giving error in these lines "internal error occured" in this-> (EMobileDialerContainerViewId)
AppUi()->ActivateLocalViewL(TUid::Uid(EMobileDialerContainerViewId),KCustomMessageUid ,*items );
please suggest me. How can i solve it.