RTimer kern-exec error

Login to reply to this topic.
Mon, 2005-08-15 13:03
Joined: 2005-08-15
Forum posts: 3
Hi

When I call iTimer.After(iStatus, 300000) I get a kern-exec (error code 0) error when running the app in the emulator.

Does anyone have any idea what could be causing this? I am using the UIQ 2.1 SDK

Cheers

Toby

Mon, 2005-08-15 13:41
Joined: 2003-05-08
Forum posts: 135
Re: RTimer kern-exec error
Please show your initialization code of the timer object.  Looks like you forgot to call all the correct initialization functions.

The box said 'Windows 98 or better'. Why is it not working on Linux?

Mon, 2005-08-15 13:52
Joined: 2005-08-15
Forum posts: 3
Re: RTimer kern-exec error
Full code below ...

#include "HelloWorld.h"

CDelayedHello* CDelayedHello::NewL()
{
   CDelayedHello* self = new (ELeave) CDelayedHello();
   CleanupStack::PushL(self);
   self->ConstructL;
   CleanupStack::Pop(self);
   return self;
}

CDelayedHello::~CDelayedHello()
{
   Cancel();
   iTimer.Close();
}

void CDelayedHello::SetHello(TTimeIntervalMicroSeconds32 aDelay)
{
   _LIT(KDelayedHelloPanic, "DelayedHelloPanic");
   __ASSERT_ALWAYS(!IsActive(), User::Panic(KDelayedHelloPanic, 1));
   iTimer.After(iStatus, aDelay);
   SetActive();
}

CDelayedHello::CDelayedHello() : CActive(CActive::EPriorityStandard)
{
   CActiveScheduler::Add(this);
}

void CDelayedHello::ConstructL()
{
   iEnv = CEikonEnv::Static();
   User::LeaveIfError(iTimer.CreateLocal());
}

void CDelayedHello::RunL()
{
   iEnv->InfoMsg(R_DELAYED_HELLO_TEXT);   
}

void CDelayedHello::DoCancel()
{
   iTimer.Cancel();
}

TInt CDelayedHello::RunError(TInt aError)
{
   return KErrNone;
}
Tue, 2005-08-16 07:12
Joined: 2003-05-08
Forum posts: 135
Re: RTimer kern-exec error
If your code is as indicated (self->ConstructL;), then that is your problem.  You are never calling the ConstructL function.

The box said 'Windows 98 or better'. Why is it not working on Linux?

Tue, 2005-08-16 11:21
Joined: 2005-07-03
Forum posts: 37
Re: RTimer kern-exec error
Dear /*Name*/

Can u tell me where u have called the SetHello().
In SetHello() function You are setting the timer for ur class. Until and unless u call SetHello(). nothing will work.

Try
Tue, 2005-08-16 12:08
Joined: 2005-08-15
Forum posts: 3
Re: RTimer kern-exec error
Yes I am calling self->ConstructL, not self->ConstructL(). I am now a little embarassed!

Thanks for your help

Toby
  • Login to reply to this topic.