SetStatus() method of MUINotifier panics in sockets engine with KERN-EXEC 3
Hi !
I have a Sockets engine class in my application . I create the engine object in the AppUi with the following code .
[code]
void CMyAppAppUi::ConstructL()
{
...
// Create socket engine
iSocketsEngine = CSocketsEngine::NewL(*iappMyAppView,iLog);
}
[/code]
The functions that get called as a result of the call to NewL() are as follows :
[code]
CSocketsEngine* CSocketsEngine::NewL(MUINotifier& aConsole,RFileLogger & aLog)
{
aLog.Write(_L("Entered NewL() of socketsengine..."));
CSocketsEngine* self = CSocketsEngine::NewLC(aConsole,aLog);
aLog.Write(_L("1"));
CleanupStack::Pop(self);
aLog.Write(_L("Exiting NewL() of socketsengine..."));
return self;
}
[/code]
[code]
CSocketsEngine* CSocketsEngine::NewLC(MUINotifier& aConsole,RFileLogger & aLog)
{
aLog.Write(_L("Entered NewLC() of socketsengine..."));
CSocketsEngine* self = new (ELeave) CSocketsEngine(aConsole);
aLog.Write(_L("1"));
CleanupStack::PushL(self);
aLog.Write(_L("2"));
self->ConstructL(aLog);
aLog.Write(_L("Exiting NewLC() of socketsengine..."));
return self;
}
[/code]
[code]
void CSocketsEngine::ConstructL(RFileLogger & aLog)
{
sLog = aLog ;
sLog.Write(_L("Entered ConstructL() of socketsengine..."));
ChangeStatus(ENotConnected);
....
}
[/code]
Now, ChangeStatus() is defined as follows :
[code]
void CSocketsEngine::ChangeStatus(TSocketsEngineState aNewStatus)
{
sLog.Write(_L("Entered ChangeStatus() of socketsengine.."));
// Update the status (and the status display)
switch (aNewStatus)
{
case ENotConnected:
sLog.Write(_L("ENotConnected"));
[COLOR=Red] [b] iConsole.SetStatus(KStrNotConnected); //Panics here [/b] [/COLOR]
break;
case EConnecting:
sLog.Write(_L("ENotConnecting"));
iConsole.SetStatus(KStrConnecting);
break;
case EConnected:
sLog.Write(_L("ENotConnected"));
iConsole.SetStatus(KStrConnected);
break;
case ELookingUp:
sLog.Write(_L("ELookingUp"));
iConsole.SetStatus(KStrLookingUp);
break;
default:
User::Panic(KPanicSocketsEngine, ESocketsBadStatus);
break;
}
sLog.Write(_L("Out of switch..."));
iEngineStatus = aNewStatus;
sLog.Write(_L("Exiting ChangeStatus() of socketsengine.."));
}
[/code]
Now , when I run my application , it panics with [b] KERN-EXEC 3 [/b] . Looking at the logs i see that ENotConnected gets printed , however the code panicked while executing iConsole.SetStatus(KStrNotConnected) .
Could you tell me whats wrong ? . Id be glad to share more code in case you need some more information to fix this.
Please help.
Thanks a lot :)