Re: Panic KERN-EXEC 3 Error
You have not allocated the memory for iTelephony object, you have simply declared it in header.
Write the following in ConstructL(): iTelephony = CTelephony::NewL();
Re: Panic KERN-EXEC 3 Error
hi vineet.jain,
Thanks for the solution... Now its working...
You know What happen to my application when a call gets active..? It might terminate????
Re: Panic KERN-EXEC 3 Error
[QUOTE=vshnuforu@yahoo.co.in;792705]hi vineet.jain,
Thanks for the solution... Now its working...
You know What happen to my application when a call gets active..? It might terminate????[/QUOTE]
What do you mean by that ? Basically it depends on your logic and what you do there. Anf if your application suddenly terminates, then do check what panic code you get, and see whwther you can find the code part that causes the panic.
Re: Panic KERN-EXEC 3 Error
hi sir,
I meant what happened to my application when an incoming call in progress.. will it closed or will it notify???
please help
Re: Panic KERN-EXEC 3 Error
You should really test that by yourself, and see how it behaves. It appears to be monitoring call and then notifying the state changes, though you should re-start the monitoring in RunL, so it would also get more than one event..
Re: Panic KERN-EXEC 3 Error
[QUOTE=symbianyucca;792754]You should really test that by yourself, and see how it behaves. It appears to be monitoring call and then notifying the state changes, though you should re-start the monitoring in RunL, so it would also get more than one event..[/QUOTE]
thank you very much mr sumbianycca...
i understood it...thanks again..
i developed this using s60 5th edition sdk and carabide c++ ide, but i have only nokia E65 device on testing.... how can i test ..please help me again sir?
Re: Panic KERN-EXEC 3 Error
well compile your project for phone release, make a sis file for it & install it in your device.
Re: Panic KERN-EXEC 3 Error
I would strongly suggest using 3rd ed MR SDK with the E65 device, since it is original 3rd ed MR device. The 5th edition SDK is basically meant for building for 5th ed touch devices.
Re: Panic KERN-EXEC 3 Error
hi sir,
now its seems working..but cant able to fetch the dialed /incoming number using the following code....Please help ..
the source file for the CallMonitor Active object is shown under
[QUOTE]
#include "CallsMonitor.h"
CCallMonitor* CCallMonitor::NewLC(MCallCallBack& aObserver)
{
CCallMonitor* self = new (ELeave) CCallMonitor(aObserver);
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
CCallMonitor* CCallMonitor::NewL(MCallCallBack& aObserver)
{
CCallMonitor* self = CCallMonitor::NewLC(aObserver);
CleanupStack::Pop(); // self;
return self;
}
CCallMonitor::CCallMonitor(MCallCallBack& aCallBack)
:CActive(EPriorityStandard),iCallBack(aCallBack),iCurrentStatusPckg(iCurrentStatus)
{
CActiveScheduler::Add(this);
}
CCallMonitor::~CCallMonitor()
{
Cancel();
delete iTelephony;
}
void CCallMonitor::ConstructL(void)
{
iTelephony = CTelephony::NewL();
StartListening();
}
void CCallMonitor::CancelOperation(void)
{
Cancel();
}
void CCallMonitor::DoCancel()
{
iTelephony->CancelAsync(CTelephony::EVoiceLineStatusChangeCancel);
}
[COLOR="Purple"][B]void CCallMonitor::RunL()
{
if( iCurrentStatus.iStatus == CTelephony::EStatusDialling )
{
//Incoming Call is detected here
GetCallDetails(ETrue);
//iCallBack.CallStatusChangedL(iCurrentStatus.iStatus,iStatus.Int());
}
if(iCurrentStatus.iStatus == CTelephony::EStatusRinging)
{
if(iLastInformedLineStatus != CTelephony::EStatusDialling)
{
//Outgoing call is detected here
GetCallDetails(EFalse);
//iCallBack.CallStatusChangedL(iCurrentStatus.iStatus,iStatus.Int());
}
}
iLastInformedLineStatus = iCurrentStatus.iStatus;
if(iStatus != KErrCancel)
StartListening();
}
void CCallMonitor::StartListening()
{
Cancel();
iCurrentStatus.iStatus = CTelephony::EStatusUnknown;
iLastInformedLineStatus = CTelephony::EStatusUnknown;
iTelephony->NotifyChange(iStatus,CTelephony::EVoiceLineStatusChange,iCurrentStatusPckg);
SetActive();
}
void CCallMonitor::GetCallDetails(TBool aIsInCall)
{
CTelephony::TCallInfoV1 callInfoV1;
CTelephony::TCallInfoV1Pckg callInfoV1Pckg( callInfoV1 );
CTelephony::TCallSelectionV1 callSelectionV1;
CTelephony::TCallSelectionV1Pckg callSelectionV1Pckg( callSelectionV1 );
CTelephony::TRemotePartyInfoV1 remotePartyInfoV1;
CTelephony::TRemotePartyInfoV1Pckg remotePartyInfoV1Pckg( remotePartyInfoV1 );
callSelectionV1.iLine = CTelephony::EVoiceLine;
callSelectionV1.iSelect = CTelephony::EInProgressCall;
iTelephony->GetCallInfo( callSelectionV1Pckg, callInfoV1Pckg, remotePartyInfoV1Pckg );
if( remotePartyInfoV1.iRemoteNumber.iTelNumber.Length() > 0 )
{
iCallBack.CallStatusChangedL(iCurrentStatus.iStatus,iStatus.Int(),8,remotePartyInfoV1.iRemoteNumber.iTelNumber,callInfoV1.iStartTime,callInfoV1.iDuration);
// Incoming call number can be read from
//remotePartyInfoV1.iRemoteNumber.iTelNumber;
return;
}
if( callInfoV1.iDialledParty.iTelNumber.Length() > 0 )
{
iCallBack.CallStatusChangedL(iCurrentStatus.iStatus,iStatus.Int(),9,callInfoV1.iDialledParty.iTelNumber,callInfoV1.iStartTime,callInfoV1.iDuration);
// Outgoing call number can be read from
// callInfoV1.iDialledParty.iTelNumber;
return;
}
iCallBack.CallStatusChangedL(iCurrentStatus.iStatus,iStatus.Int(),10,callInfoV1.iDialledParty.iTelNumber,callInfoV1.iStartTime,callInfoV1.iDuration);
/*if(aIsInCall)
{
if( remotePartyInfoV1.iRemoteIdStatus == CTelephony::ERemoteIdentityAvailable )
{
if( remotePartyInfoV1.iRemoteNumber.iTelNumber.Length() > 0 )
{
iCallBack.CallStatusChangedL(iCurrentStatus.iStatus,iStatus.Int(),1,remotePartyInfoV1.iRemoteNumber.iTelNumber,callInfoV1.iStartTime,callInfoV1.iDuration);
// Incoming call number can be read from
//remotePartyInfoV1.iRemoteNumber.iTelNumber;
}
}
}else
{
if( callInfoV1.iDialledParty.iTelNumber.Length() > 0 )
{
iCallBack.CallStatusChangedL(iCurrentStatus.iStatus,iStatus.Int(),0,callInfoV1.iDialledParty.iTelNumber,callInfoV1.iStartTime,callInfoV1.iDuration);
// Outgoing call number can be read from
// callInfoV1.iDialledParty.iTelNumber;
}
}*/
}[/B]
[/COLOR]
[/QUOTE]
Re: Panic KERN-EXEC 3 Error
where is the implementation of CallStatusChangedL method?
Re: Panic KERN-EXEC 3 Error
here is it. the red colored portion is what you've asked...
[CODE]
CHelloWorldContainer::CHelloWorldContainer()
{
// [[[ begin generated region: do not modify [Generated Contents]
iListBox = NULL;
// ]]] end generated region [Generated Contents]
}
/**
* Destroy child controls.
*/
CHelloWorldContainer::~CHelloWorldContainer()
{
// begin by chen
delete iCallMonitor;
// end by chen
// [[[ begin generated region: do not modify [Generated Contents]
delete iListBox;
iListBox = NULL;
// ]]] end generated region [Generated Contents]
}
CHelloWorldContainer* CHelloWorldContainer::NewL(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver )
{
CHelloWorldContainer* self = CHelloWorldContainer::NewLC(
aRect,
aParent,
aCommandObserver );
CleanupStack::Pop( self );
return self;
}
CHelloWorldContainer* CHelloWorldContainer::NewLC(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver )
{
--------
}
void CHelloWorldContainer::ConstructL(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver )
{
if ( aParent == NULL )
{
CreateWindowL();
}
else
{
SetContainerWindowL( *aParent );
}
iFocusControl = NULL;
iCommandObserver = aCommandObserver;
InitializeControlsL();
SetRect( aRect );
ActivateL();
// [[[ begin generated region: do not modify [Post-ActivateL initializations]
// ]]] end generated region [Post-ActivateL initializations]
// begin by chen
iCallMonitor = CCallMonitor::NewL(*this);
// end by chen
}
void CHelloWorldContainer::InitializeControlsL()
{
iListBox = new ( ELeave ) CAknSingleStyleListBox;
iListBox->SetContainerWindowL( *this );
{
TResourceReader reader;
iEikonEnv->CreateResourceReaderLC( reader, R_HELLO_WORLD_CONTAINER_LIST_BOX );
iListBox->ConstructFromResourceL( reader );
CleanupStack::PopAndDestroy(); // reader internal state
}
// the listbox owns the items in the list and will free them
iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
// setup the icon array so graphics-style boxes work
SetupListBoxIconsL();
// add list items
iListBox->SetFocus( ETrue );
iFocusControl = iListBox;
}
// ]]] end generated function
void CHelloWorldContainer::Draw( const TRect& aRect ) const
{
// [[[ begin generated region: do not modify [Generated Contents]
CWindowGc& gc = SystemGc();
gc.Clear( aRect );
// ]]] end generated region [Generated Contents]
}
// [[[ begin generated function: do not modify
void CHelloWorldContainer::AddListBoxItemL(
CEikTextListBox* aListBox,
const TDesC& aString )
{
CTextListBoxModel* model = aListBox->Model();
CDesCArray* itemArray = static_cast< CDesCArray* > ( model->ItemTextArray() );
itemArray->AppendL( aString );
aListBox->HandleItemAdditionL();
}
// ]]] end generated function
// [[[ begin generated function: do not modify
RArray< TInt >* CHelloWorldContainer::GetSelectedListBoxItemsLC( CEikTextListBox* aListBox )
{
CAknFilteredTextListBoxModel* model =
static_cast< CAknFilteredTextListBoxModel *> ( aListBox->Model() );
if ( model->NumberOfItems() == 0 )
return NULL;
// get currently selected indices
const CListBoxView::CSelectionIndexArray* selectionIndexes =
aListBox->SelectionIndexes();
TInt selectedIndexesCount = selectionIndexes->Count();
if ( selectedIndexesCount == 0 )
return NULL;
// copy the indices and sort numerically
RArray<TInt>* orderedSelectedIndices =
new (ELeave) RArray< TInt >( selectedIndexesCount );
// push the allocated array
CleanupStack::PushL( orderedSelectedIndices );
// dispose the array resource
CleanupClosePushL( *orderedSelectedIndices );
// see if the search field is enabled
CAknListBoxFilterItems* filter = model->Filter();
if ( filter != NULL )
{
// when filtering enabled, translate indices back to underlying model
for ( TInt idx = 0; idx < selectedIndexesCount; idx++ )
{
TInt filteredItem = ( *selectionIndexes ) [ idx ];
TInt actualItem = filter->FilteredItemIndex ( filteredItem );
orderedSelectedIndices->InsertInOrder( actualItem );
}
}
else
{
// the selection indices refer directly to the model
for ( TInt idx = 0; idx < selectedIndexesCount; idx++ )
orderedSelectedIndices->InsertInOrder( ( *selectionIndexes ) [ idx ] );
}
return orderedSelectedIndices;
}
// ]]] end generated function
// [[[ begin generated function: do not modify
void CHelloWorldContainer::DeleteSelectedListBoxItemsL( CEikTextListBox* aListBox )
{
CAknFilteredTextListBoxModel* model =
static_cast< CAknFilteredTextListBoxModel *> ( aListBox->Model() );
if ( model->NumberOfItems() == 0 )
return;
RArray< TInt >* orderedSelectedIndices = GetSelectedListBoxItemsLC( aListBox );
if ( !orderedSelectedIndices )
return;
// Delete selected items from bottom up so indices don't change on us
CDesCArray* itemArray = static_cast< CDesCArray* > ( model->ItemTextArray() );
TInt currentItem = 0;
for ( TInt idx = orderedSelectedIndices->Count(); idx-- > 0; )
{
currentItem = ( *orderedSelectedIndices )[ idx ];
itemArray->Delete ( currentItem );
}
// dispose the array resources
CleanupStack::PopAndDestroy();
// dispose the array pointer
CleanupStack::PopAndDestroy( orderedSelectedIndices );
// refresh listbox's cursor now that items are deleted
AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(
aListBox, currentItem, ETrue );
}
// ]]] end generated function
// [[[ begin generated function: do not modify
CAknSingleStyleListBox* CHelloWorldContainer::ListBox()
{
return iListBox;
}
// ]]] end generated function
// [[[ begin generated function: do not modify
void CHelloWorldContainer::CreateListBoxItemL( TDes& aBuffer,
const TDesC& aMainText )
{
_LIT ( KStringHeader, "\t%S" );
aBuffer.Format( KStringHeader(), &aMainText );
}
// ]]] end generated function
// [[[ begin generated function: do not modify
void CHelloWorldContainer::AddListBoxResourceArrayItemL( TInt aResourceId )
{
CDesCArray* array = iCoeEnv->ReadDesCArrayResourceL( aResourceId );
CleanupStack::PushL( array );
// This is intended to be large enough, but if you get
// a USER 11 panic, consider reducing string sizes.
TBuf<512> listString;
CreateListBoxItemL( listString, ( *array ) [ 0 ] );
AddListBoxItemL( iListBox, listString );
CleanupStack::PopAndDestroy( array );
}
// ]]] end generated function
// [[[ begin generated function: do not modify
void CHelloWorldContainer::SetupListBoxIconsL()
{
CArrayPtr< CGulIcon >* icons = NULL;
if ( icons != NULL )
{
iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons );
}
}
// ]]] end generated function
/
[COLOR="Red"][B]void CHelloWorldContainer::CallStatusChangedL(CTelephony::TCallStatus& aStatus, TInt aError,TInt aIsInCall,const TDesC& aRemoteCaller,const TDateTime aDateTime,const TTimeIntervalSeconds aDurationInSeconds)
{
TBuf<250> buf;
TBuf<512> listString;
if(aError==KErrNone)
{
buf.AppendNum(TInt(aStatus));
buf.Append(aRemoteCaller);
}
else
{
buf.AppendNum(aError);
}
CreateListBoxItemL( listString, buf );
AddListBoxItemL( iListBox, listString );
iListBox->SetCurrentItemIndexAndDraw(iListBox->Model()->NumberOfItems()-1);
}[/B][/COLOR]
[/CODE]
Re: Panic KERN-EXEC 3 Error
[QUOTE=mekal2002;794248]where is the implementation of CallStatusChangedL method?[/QUOTE]
i posted what you have asked..please give me a solution..its really urgent..
Thanks in Advance
Re: Panic KERN-EXEC 3 Error
your code seems ok but i suspect the following lines
CreateListBoxItemL( listString, buf );
AddListBoxItemL( iListBox, listString );
iListBox->SetCurrentItemIndexAndDraw(iListBox->Model()->NumberOfItems()-1);
I want to veryfy that the caller no. is coming in call back method or not, I suspect that the Item are not getting updated in your UI,
Now to check that whether you are receiving the caller no. in correct format , write some file log insilde the CallStatusChangedL() method. and try to write buf into the log file.
Re: Panic KERN-EXEC 3 Error
also try this
instead of
iListBox->SetCurrentItemIndexAndDraw(iListBox->Model()->NumberOfItems()-1);
call
iLiiListBox->HandleItemAdditionL();