help! crash on UIQ3

Login to reply to this topic.
Wed, 2007-08-15 12:43
Joined: 2007-08-15
Forum posts: 3

I wrote following C++ code on UIQ3:
RHTTPSession rSession;
rSession.OpenL();
I compile the code to "ARMV5 UREL" and run it on smart phone,
rSession.OpenL() crash with error code KERN-EXEC 3.
When I put them in different place, sometimes crash, sometimes not.
When I compile the code to "WINSCW UDEB" , it won't crash.

Could anyone tell me how to fix it? thanks very much.


Wed, 2007-08-15 14:38
Joined: 2003-09-22
Forum posts: 27
Re: help! crash on UIQ3

Kern-exec 3 is normally a null pointer exception or something similar.
What could be happening is that your call to OpenL is leaving and that something else that you have created is not getting cleaned up as it is not on the cleanupstack at the time of the leave. Try to see if this is the case and see what error code is returned from your OpenL function.

Thu, 2007-08-16 10:38
Joined: 2007-08-15
Forum posts: 3
Re: help! crash on UIQ3

Thanks for your reply.
My code like following:
class CHttpClient : public CBase, public MHTTPDataSupplier, public MTimeOutNotifier, MUserCancelNotifier,public MHTTPAuthenticationCallback
{
....
private:
RHTTPSession iSess;
....
};

void CHttpClient::ConstructL(const TDesC& aSource, const TDesC& aFilename)
{
iUtils = CHttpClientUtils::NewL(KHttpExampleClientTestName);

// Open the RHTTPSession
iSess.OpenL();

// Install this class as the callback for authentication requests
InstallAuthenticationL(iSess);

User::LeaveIfError(iFileServ.Connect());

// Start a timer
iTimer = CTimeOutTimer::NewL(EPriorityHigh, *this);

iCancelHandle = CUserCancel::NewL(EPriorityHigh, *this);
UserCancelSet_t ucs;
ucs.handle = TM_AU_HTTP_User_Cancel;
ucs.status = &(iCancelHandle->iStatus);
if(!DoCallback(iDownloaderCfg->tls(), Tmu_SET_USER_CANCEL_HANDLE, (TAny* )&ucs))
{
User::Leave(TM_CHTTPCLIENT_USER_CANCEL);
}
iTransObs = CHttpEventHandler::NewL(*iUtils, iTimer, iDownloaderCfg);
iSource.Copy(aSource);
iTransObs->SetFileName(aFilename);
}

There is no return value for RHTTPSession::OpenL(). It crashes before return. Do you have any way to get last error?
Thanks.

Thu, 2007-08-16 10:46
Joined: 2003-09-22
Forum posts: 27
Re: help! crash on UIQ3

put a temporary TRAP around the OpenL to find the error. Also are you deleting iUtils in your destructor?
~b

Thu, 2007-08-16 12:08
Joined: 2004-05-21
Forum posts: 286
Re: help! crash on UIQ3

Are you sure that OpenL is leaving? Where is the iDownloaderCfg getting initialised?

Cheers,
Sri

Fri, 2007-08-17 09:30
Joined: 2007-08-15
Forum posts: 3
Re: help! crash on UIQ3

Thanks for your kindly help.
I change nothing, but it is OK now.

  • Login to reply to this topic.