Active object Stray Signal (E32User-Cbase 46)
Login to reply to this topic.
lun, 2008-06-30 10:56
Joined: 2007-11-07
Forum posts: 17

void CReadFile::ReadfileL()
    {
    if( !IsActive())
      {
      .........................
      User::LeaveIfError(iFileSession.Connect());
      iFile.Open( iSession, KFile8, EFileShareReadersOrWriters ));
      TBuf8<40> Test;
      iFile.Read( 0, Test, iStatus);
      SetActive();
      .......................
      .......................
      }

CReadFile::CReadFile()
: CActive( CActive::EPriorityStandard )
   {
       
   }

void CReadFile::ConstructL()
   {
   CActiveScheduler::Add(this);
   }

CReadFile class is an Active object which do an asyn read request to fileserver. but control never comes to RunL() before that I am getting Stray signal CBase 46 which means "This panic is raised by an active scheduler".
Need help .....


lun, 2008-06-30 11:07
Joined: 2003-12-05
Forum posts: 822

You must use the iStatus inherited from CActive, not your own. The Active Scheduler is using the one in CActive.

lun, 2008-06-30 11:08
Joined: 2004-11-29
Forum posts: 1419

the problem is this line:

      TRequestStatus iStatus;

You must use the request status of your active object, and not declare your own.
by declaring your own iStatus, you disconnect the request from your active object, and the active scheduler then can't find what ao is handling the request (which is not strange, because then infact there is no active object handling it)

"Stray Signal" simply means "I couldn't find any AO that is set to handle the request"

lun, 2008-06-30 11:28
Joined: 2007-11-07
Forum posts: 17

I have checked that also.... sorry for the TRequestStatus iStatus (i will change that), actually i was checking all possiblities of iStatus (local and CActive)

lun, 2008-06-30 11:53
Joined: 2004-11-29
Forum posts: 1419

Ok then, if it still not works with the above code, its a tougher problem Smiling

There should only be three ways you could get a stray signal panic

1. You have not added your Active Object to the AS
2. You have forgot to SetActive your AO
3. You you issue a request to a TRequestStatus not connected to an AO, and return back to the AS loop without waiting for the request to complete (User::WaitForRequest)

Since you seem to do these things right, I'm suspecting the problem might not be with this AO at all, but maybe there is some other request you issue?

lun, 2008-06-30 12:03
Joined: 2007-09-24
Forum posts: 95

hi
I think ,Either You are calling SetActive() function twice for Only One Asynchronous Request OR calling Only One SetActive() for two or more Asynchronous Request , Check your code again If you couldn't figure out the problem post you code here
Thanks and Regard
Praveen

lun, 2008-06-30 12:25
Joined: 2007-01-17
Forum posts: 101

The Panics Description given in docs is as follows "This panic is raised by an active scheduler, a CActiveScheduler. It is caused by a stray signal. "
As praveen said it might be due to calling SetActive() twice or in case of timers calling After() twice.


Shashi Kiran G M

lun, 2008-06-30 12:27
Joined: 2007-01-17
Forum posts: 101

i think you have forgotten to add this statement in your constructor

CActiveScheduler::Add(this);


Shashi Kiran G M

lun, 2008-06-30 12:44
Joined: 2003-12-05
Forum posts: 822

gmsk19: didn't you read his original question?! Add call is in the ConstructL.

cheers: you are calling your ConstructL, are you?

lun, 2008-06-30 13:03
Joined: 2007-09-24
Forum posts: 95

hi all

E32USER-CBase 46 panic is raised by the Active Scheduler due to a stray signal. A stray signal is a technical term for a situation when the Active Scheduler is signalled upon an outstanding asynchronous request having been completed, but it (i.e. the Active Scheduler) cannot find any active objects ready for handling the request.
I think It is the most appropriate explanation for stray signal , Just try to figure out error where is it in your code ,if couldn't post your whole code here
Thanks and Regard
Praveen Kumar Sharma

lun, 2008-06-30 13:14
Joined: 2004-11-29
Forum posts: 1419

Actually, calling SetActive twice should give another specific "Don't call setactive twice"-panic, and the "IsActive" check is supposed to make sure a request isn't issued twice...

So that shouldn't be the problem either.

praveen:
Please don't just re-iterate stuff the original poster obviously already know, and/or that has already been said in other posts.

lun, 2008-06-30 15:22
Joined: 2008-03-26
Forum posts: 3

cheers: whenever you make a asynchronous call, please make sure that the variable holding the result
remain valid until you have been notified that the request is completed. In this case, you shouldn't use
the local variable TBuf8<40> Test, although this might not fix your Stray Signal problem.

mar, 2008-07-01 05:26
Joined: 2008-01-16
Forum posts: 231

Also Checkout this:-
http://www.newlc.com/forum/regarding-e32user-cbase-46


Thanks & Regards,
Md.Khalid Ahmad

mar, 2008-07-01 05:30
Joined: 2007-01-17
Forum posts: 101

My bad i did not see his ConstructL() Andreas...


Shashi Kiran G M


copyright 2003-2009 NewLC SARL