We are creating an active object for our application , the code is as below,
The error(KERN_EXEC 3) comes when it executes the Start function of the scheduler.
iActiveEncoder = ActiveEncoder::NewLC();
iActiveEncoder->IssueRequest(iActiveEncoder->iStatus);
CActiveScheduler::Start();
CleanupStack::PopAndDestroy(1);
ActiveEncoder::ActiveEncoder() :CActive(EPriorityStandard)
{
}
ActiveEncoder* ActiveEncoder::NewLC()
{
ActiveEncoder* self=new (ELeave) ActiveEncoder(); CleanupStack::PushL(self);
self->ConstructL();
return self;
}
void ActiveEncoder::ConstructL()
{
CActiveScheduler::Add(this);
}
void ActiveEncoder::IssueRequest(TRequestStatus& aStatus)
{
aStatus = KRequestPending;
1. some memory allocation is happening.
2. Loads Ldd Pdd and opens the logical channel for the device driver
3. Calls �Initialize()� another function of this Active Object.
}
void ActiveEncoder::Initialize()
{
Do some processing
SetActive();
TRequestStatus* status = &iStatus ;
User::RequestComplete(status, KErrNone) ;
}
void ActiveEncoder::RunL()
{
if(flag)
calls one function; in this function we call Stop function of scheduler
else
DummyRequest(iStatus); //This does nothing
}