program crash at CActiveScheduler::Start()

Login to reply to this topic.
Tue, 2008-01-01 18:31
Joined: 2007-12-01
Forum posts: 10

Hello everyone,

I am making an HttpClient application on S60 which will communicates with the HTTP server.
I am using CHttpExampleClient as given in Examples of
S60 2nd edition FP3 SDK for reference.

I have code which request by submitting a transaction
& then after getting default response the cycle repeats.
But when server sends hdrs then program crashes at
CActiveSchduler::Start()....
Code snippet is...

iTrans = iSess.OpenTransactionL(uri, *iTransObs, aMethod);
RHTTPHeaders hdr = iTrans.Request().GetHeaderCollection();

///Hdrs setting----stuff removed

if (iHasARequestBody) //Used with post request only
{
// Content type header
TBuf8 contTypeBuf;
contTypeBuf.Copy(_L8("text/plain"));
//contTypeBuf.Copy(iReqBodyContentType);

RStringF contTypeStr = iSess.StringPool().OpenFStringL(contTypeBuf);
THTTPHdrVal contType(contTypeStr);
hdr.SetFieldL(iSess.StringPool().StringF(HTTP::EContentType,RHTTPSession::GetTable()), contType);
contTypeStr.Close();
iUtils->Test().Printf(_L("\nHeaders ok.... method"));
//User::After(1000000);

MHTTPDataSupplier* dataSupplier = this;
if (iManualPost)
{
dataSupplier = iFormEncoder;
}
iTrans.Request().SetBody(*dataSupplier);
}

iTrans.SubmitL();// submit the transaction

CActiveScheduler::Start();//Program Crashes when server sends some hdrs

My application is poling to the HttpServer by repeatedly calling above code and it works well with
CActiveScheduler::Start() & calls Event handler i.e MHFRunL()

But when server sends some hdrs in second time then Sad program crashes at CActiveScheduler::Start().
My application is console application and i have already installed Active Scheduler.
I am unable to resolve this issue. Any suggestions are welcome.

With Thanks & Regards,
Parveen Bhatia.


Wed, 2008-01-02 06:20
Joined: 2007-09-20
Forum posts: 95
Re: program crash at CActiveScheduler::Start()

Hi,

What error you are getting. What is the Panic reason. Is suppose it is caused due to a stray signal.
Check that you are calling SetActive() method of the active object before issuing any request.


Chao,
Raghav

Fri, 2008-01-04 14:37
Joined: 2007-12-01
Forum posts: 10
Re: program crash at CActiveScheduler::Start()

Thanks raghav for suggestions,

There is not any active object which i am implementing in HTTPclient & not any stray signal issue.
I am able to know the reason of panic by enabling JIT debugging frm emulator tools->preferences.
The panic was arising due to StringPool .
I was using istrpool.OpenL() on StringPool and try to get RStringF frm it.
But when i used aTransaction.Session().StringPool() instead
of istrpool.OpenL() then that panic removed.

  • Login to reply to this topic.