Hi All,

   I'm facing a problem with creating active objects inside open core
node, i've a crash during constructing one and on AddToScheduler()
call inside ThreadLogon(). Here is a code example:

class Cmynode : public OsclTimerObject,
                         public PVMFNodeInterface,
                         public OsclTimerObserver,
                         ........
{
public:
Cmynode( int32 &aPriority )
: OsclTimerObject(aPriority, "MyNode")
{
    int32 err;
    OSCL_TRY(err,
                      m_pMyTimer = OSCL_NEW
( OsclTimer<OsclMemAllocator>,
                      ("MyTimer") );            // crash on
constructing

               // timer initialization
    );
}

~Cmynode() {
    //destructor code
}
        // PVMFNodeInterface implementation
public:
        virtual PVMFStatus ThreadLogon() {

                         if ( !IsAdded() ) {
                AddToScheduler();   // crash in this call
                 }

                     return PVMFSuccess;
                }

        virtual PVMFStatus ThreadLogoff() {

                 if ( IsAdded() ) {

                                Cancel();
                        RemoveFromScheduler();
                 }

                     return PVMFSuccess;
                }

// OsclTimerObject implementation
protected:
    virtual void Run() {
    }

private:
   OsclTimer<OsclMemAllocator> *m_pMyTimer;
};

--
 Best regards.

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to