×

Discussion Board

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

    Async Web Services bug?

    Hi,

    I've used wsdl2cpp to create a web service.

    I'm using the async method of the generated service object to start it up.

    Then, when the observer's callback is called with the response, I delete the service object.

    I can see the destructor is called with no problem, but after that I get a mysterious crash (KERN-EXEC 3).

    I've managed to solve this by avoiding the synchronous deletion. Instead, I use a timer, asking it to pop after 0 microseconds. When RunL is called, I delete the service object, and now everything seems to be fine.

    Although problem seems to be solved, I'm curious: Is it a bug, or should I have expected this?

    Thanks,
    Nadav

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,567

    Re: Async Web Services bug?

    Deleting an object from its own callback method can easily lead to KERN-EXEC 3: when your callback returns, a method of the given (deleted) object continues to run, and if it tries to access invalid pointers (including the this pointer), that can be a problem.
    Having a timer is a possible workaround, or a self-triggering active object can also do the job.

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

    Re: Async Web Services bug?

    Yes, this is what I've suspected. I do think the design should have prevented this by making the destructor protected and supply a public Release method, which performs a delayed deletion.

    Thanks,
    Nadav

  4. #4
    Registered User
    Join Date
    Jun 2008
    Posts
    15

    Re: Async Web Services bug?

    I am having the same problem. My app hits several Web services... at the begining i didnt have any problem, but the more data i send or receive, the longer the connection stays open and the more problems i have when i delete my service/observer. So, anyone know how do i know when is totally safe to popanddestroy the services/observers? Nadav70, when you say 0 microsenconds.. after what? the setstatus? Could be more specific, please?

Similar Threads

  1. HTTP headers for S60 3rd Ed. Browser
    By Nokia Ron in forum Mobile Web Site Development
    Replies: 16
    Last Post: 2009-09-22, 14:28
  2. N81 BUG: Web Services Parser an question marks???
    By masterchief2004 in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-07, 17:59
  3. Mobile web server and web services
    By landerluu in forum Mobile Web Server
    Replies: 1
    Last Post: 2008-01-03, 06:36
  4. Any tips - Web services on phone
    By rossmckinnon in forum Symbian C++
    Replies: 2
    Last Post: 2007-10-15, 13:37
  5. web services on symbian...problem won't be resolved!!!
    By ashrafabdoh in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2005-09-16, 14:59

Posting Permissions

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