×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    HTTPSession crash on close

    Hi,

    Quite often (but not always) my code gets crashed on RHTTPSession::Close().

    This happens when I use HTTP POST, which gets an HTTP failure code 500 (it doesn't happen when a good, code 200 response arrives).

    I've taken the WebClientEngine class from the YahooImagesSearch example, and modified it a bit.

    The most significant modification I made was to close the session each time I cancel the transaction.

    The flow of events:
    CWebClientEngine::MHFRunL() gets called with following events:
    THTTPEvent::EGotResponseHeaders (with HTTP code 500)
    THTTPEvent::EGotResponseBodyData (x3)
    THTTPEvent::EResponseComplete
    THTTPEvent::EFailed


    This last event leads to my code calling iSession.Close, which sometimes crashes. When it does, any one of the following errors can occur: USER 30, USER 42, KERN-EXEC 3.

    Any ideas?

    Thanks,
    Nadav

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Posts
    596

    Re: HTTPSession crash on close

    Quote Originally Posted by nadav70 View Post
    Hi,

    Quite often (but not always) my code gets crashed on RHTTPSession::Close().

    This happens when I use HTTP POST, which gets an HTTP failure code 500 (it doesn't happen when a good, code 200 response arrives).

    I've taken the WebClientEngine class from the YahooImagesSearch example, and modified it a bit.

    The most significant modification I made was to close the session each time I cancel the transaction.

    The flow of events:
    CWebClientEngine::MHFRunL() gets called with following events:
    THTTPEvent::EGotResponseHeaders (with HTTP code 500)
    THTTPEvent::EGotResponseBodyData (x3)
    THTTPEvent::EResponseComplete
    THTTPEvent::EFailed


    This last event leads to my code calling iSession.Close, which sometimes crashes. When it does, any one of the following errors can occur: USER 30, USER 42, KERN-EXEC 3.

    Any ideas?

    Thanks,
    Nadav
    if there is no problem can u show ur code for saving ur datas (EGotResponseBodyData ).

    what i guess from ur error codes it might be a memory aloc or dealoc pb or string length.....check ur code for that.

    another thing be sure that you have close yur transaction and active scheduler before closing ur session.


    Thanks

  3. #3
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    159

    Re: HTTPSession crash on close

    Quote Originally Posted by kishore84 View Post
    if there is no problem can u show ur code for saving ur datas (EGotResponseBodyData ).

    what i guess from ur error codes it might be a memory aloc or dealoc pb or string length.....check ur code for that.

    another thing be sure that you have close yur transaction and active scheduler before closing ur session.


    Thanks
    Hi kishore84,

    Thanks for your reply.

    Problem is probably solved (fingers crossed...). When I run the HTTP code inside a simple test program crash never seems to happen.

    However, my program is responsible for starting an IAP. I started the HTTP request in the same CActiveScheduler callback where I also "told" the infrastucture that the IAP is ready to use. Then, occasionally, I got the crash later on.

    When I've changed that, adding a timer with 0 seconds, so that the HTTP Code starts to run in the next CActiveScheduler iteration, I saw no problem.

    This seems a bit like a witchcraft, I admit. After all, the crash used to happen several iterations later, not when inside the potentially risky iteration. Nevertheless, I didn't get crashes after that. I hope it would not crash at the Test House nor on users phones.

    Thanks a lot,
    Nadav

Similar Threads

  1. E65 apps crash on memory full error
    By Sam Vimes in forum General Development Questions
    Replies: 4
    Last Post: 2008-04-24, 09:43
  2. HTTP Post close crash
    By s4028469 in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2007-10-07, 11:05
  3. programmatically close an CAknForm
    By strike_noir in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-09-11, 09:41
  4. Bluetooth connection slow to close
    By scole96 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2004-10-22, 16:26
  5. close command in 6600
    By judyj2x in forum Mobile Java General
    Replies: 0
    Last Post: 2004-05-25, 15:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×