Nevermind, that will probably not help. Can you get a stack trace of
your crash? Did you try allocating something else? Say, a char buffer.
Does that work?

-Ravi

On Aug 17, 10:34 pm, RaviY <yend...@pv.com> wrote:
> Can you try
>
> OSCL_TRY(err,
>          m_pMyTimer = OSCL_NEW ( OsclTimer<OsclMemAllocator>,
> ("MyTimer", 1000) );
>
> -Ravi
>
> On Aug 17, 9:40 pm, shadow <yuri.bul...@gmail.com> wrote:
>
> > 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: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to