You Are Here:

Community: Wiki

This page was last modified on 6 September 2009, at 09:55.

Active Object Pitfalls

From Forum Nokia Wiki

Reviewer Approved   

A stray-event panic from the Active Scheduler ( E32USER-CBASE 46 error ) is a most common problem with an Active Objects. This is ussually caused by one ( or more ) of the following:

  • You forgot to call CActiveScheduler::Add() before starting the Active Object.
  • You dont call SetActive() after issuing an async request.
  • Passing the same iStatus to two service providers at the same time ( multiple requests outstanding on the same Active Object ).

Do not invoke DoCancel() directly - it should be private - always call Cancel(). Note that Cancel() should be always be called in the destructor of your derived class.

Other related pitfalls (triggering other panics):

  • Using your own TRequestStatus variable, instead of using the one provided by CActive.
  • Passing automatic variables when doing an asynchronous request.


Careless use of active objects can degrade the response time of UI in case of:

  • Priority of active object is higher than it is necessary
  • Method RunL() works too long

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
User Rating: qfnZuserE5FratingQNx2E2E0000X