×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    11

    S60Ex\WebClient CONE 36 on exit

    Hi,

    I used the "S60Ex\WebClient" sample as the basis for some http code I'm adding to an application. Subsequently my application started generating "CONE 36" [Open handles were found during application shutdown] on exit in the emulator. I'm using S60_3rd_FP1 SDK. After sometime spent trying to isolate the cause of the error, I tested the WebClient sample and realised it was suffering from the same issue.

    Googling the problem revealed: http://discussion.forum.nokia.com/fo...ad.php?t=76778.

    As a result I modified my code to look like:

    Code:
    RHTTPSession iSession;
    RHTTPTransaction iTransaction;
    RSocketServ iSocketServ;
    RConnection iConnection;
    .
    .
    .
    User::LeaveIfError(iSocketServ.Connect());
    User::LeaveIfError(iConnection.Open(iSocketServ));
    User::LeaveIfError(iConnection.Start());
    iSession.OpenL();
    RStringPool stringPool = iSession.StringPool();
    RHTTPConnectionInfo connInfo = iSession.ConnectionInfo();
    connInfo.SetPropertyL(stringPool.StringF(HTTP::EHttpSocketServ, RHTTPSession::GetTable()), THTTPHdrVal(iSocketServ.Handle()));
    TInt connPtr = reinterpret_cast<TInt>(&iConnection); 
    connInfo.SetPropertyL(stringPool.StringF(HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), THTTPHdrVal(connPtr));
    .
    .
    .
    iTransaction.SubmitL();
    .
    .
    .
    iTransaction.Close();
    iSession.Close();
    iConnection.Close();
    iSocketServ.Close();
    Is this the cononical way to create an HTTP session? If so is there any decent documentation describing this mad mess of code?
    I've noticed that iConnection.Start() blocks for a couple of seconds. Any idea why? I could convert to the asynchronous form, but I'd like to know if there is a way to reduce the delay.

    Can someone from Symbian/Nokia make sure the WebClient sample is "CONE 36" free and save future developers potential confusion.

    Thanks in advance

    Nick

  2. #2
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: S60Ex\WebClient CONE 36 on exit

    RConnection with Http Client API is generally used to provide the connection preferences, now as far as cone 36 error is concerned, first try it on real device i think it should work fine.

  3. #3
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Berlin
    Posts
    59

    Re: S60Ex\WebClient CONE 36 on exit

    Hello Nick,

    I had a similar problem. The webclient example compiled and run fine in the emulator. (There was just a problem that cbsserver crashes always when the emulators comes up. But that's not related to the webclient and it only happens when I'm working as normal user while the SDK was installed by an administrator account).

    I changed the program because I didn't want to type the long url every time I start the application, I defined a resource for the url string, added a new menu entry beside the "enter url" and copied the function where the dialog to enter the url is called. I deleted this part in the copy and replaced it by just reading the url from the resource.

    Well, when I use the webclient in the emulator and use the enter url function everything runs fine. But when I use the existing url function and end the webclient then the CONE 36 is shown.

    There was nothing changed related to creating or using the http session. Isn't it crazy?

    Karsten

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    11

    Re: S60Ex\WebClient CONE 36 on exit

    hello vasant21
    Yes WebClient works on the device and on the emulator, but generates CONE 36 on exit on the emulator. I'm working under the assumption that this is because the emulator displays panics whereas on the device applications fail silently, From the emulator documentation:
    When a thread is panicked, the debugger provides comprehensive information about the panic
    Therefore an absence of an error message when testing an application on the device wouldn't necessarily mean that error is non-existant and can therefore be ignored. Is there some floor in my understanding?
    Last edited by nickager; 2007-07-29 at 21:51.

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,740

    Re: S60Ex\WebClient CONE 36 on exit

    You can get the message on the target device too: http://www.forum.nokia.com/document/...r_messages.htm (ErrRd also makes the panic-box displayed on devices where it is disabled by default)

  6. #6
    Registered User
    Join Date
    Jul 2007
    Posts
    11

    Re: S60Ex\WebClient CONE 36 on exit

    Hi Karsten,

    Thanks for the reply. I think you might be onto something as the CONE error messages state that CONE panics are:
    User Interface Control Framework panics
    why then would my and your modified code not report the panic? Is there any way to understand more about the underlying cause of a panic? Bizarre.
    I'll do some more digging and post if I come to a conclusion.

  7. #7
    Registered User
    Join Date
    Jul 2007
    Posts
    11

    Re: S60Ex\WebClient CONE 36 on exit

    Hi wizard_hu,

    Thanks for the link. I've downloaded "Errrd" and verified that the panic-box is now being displayed on my N95 by manually causing a panic in a test application. However I don't see the panic from WebClient on the device that I see on the emulator. Could this be a spurious emulator error? Any thoughts?

  8. #8
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    50

    Re: S60Ex\WebClient CONE 36 on exit

    Quote Originally Posted by nickager View Post
    Hi,

    Can someone from Symbian/Nokia make sure the WebClient sample is "CONE 36" free and save future developers potential confusion.

    Thanks in advance

    Nick
    Yep, WebClient example will be "CONE 36"-free in 3rd FP2 SDK.

    -- ile

  9. #9
    Registered User
    Join Date
    Jul 2007
    Posts
    11

    Re: S60Ex\WebClient CONE 36 on exit

    Hi ile,

    Yep, WebClient example will be "CONE 36"-free in 3rd FP2 SDK
    So is the problem with the WebClient example code, or is it a bug in the SDK? In other words, does the WebClient code represent a bug free example of HTTP download, or is there some other example I should study?

    Thanks in advance

    Nick

  10. #10
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    50

    Re: S60Ex\WebClient CONE 36 on exit

    Quote Originally Posted by nickager View Post
    Hi ile,


    So is the problem with the WebClient example code, or is it a bug in the SDK? In other words, does the WebClient code represent a bug free example of HTTP download, or is there some other example I should study?

    Thanks in advance

    Nick
    The problem is not strictly speaking in WebClient-code; instead, RHttpTransaction appears to leave some handles open. WebClient will be modified in the same fashion as instructed in mentioned thread: http://discussion.forum.nokia.com/fo...ad.php?t=76778

    I'd think that also Forum Nokia's HTTP Client API example has the same workaround implemented.

    (Whether that RHttpTransaction-issue should be considered as a bug in Symbian or "undocumented behaviour", is a matter of discussion... ;)

    -- ile

  11. #11
    Registered User
    Join Date
    Jul 2007
    Posts
    11

    Re: S60Ex\WebClient CONE 36 on exit

    Good to know the WebClient example will be fixed/have a workaround added!

Similar Threads

  1. why my does not exit on N73 when i push exit soft key?
    By byronlilu in forum Mobile Java General
    Replies: 2
    Last Post: 2007-06-28, 21:29
  2. Removing default exit button
    By jmdeveloper in forum Mobile Java General
    Replies: 9
    Last Post: 2006-11-07, 16:30
  3. N70 Reset bug
    By sebboB in forum General Development Questions
    Replies: 2
    Last Post: 2005-12-28, 23:09
  4. UNDESIRED Exit command key.
    By tektronic in forum Mobile Java General
    Replies: 4
    Last Post: 2005-05-13, 18:27
  5. Replies: 2
    Last Post: 2004-10-12, 12:07

Posting Permissions

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