And, how does your test code look like? Did you make sure you have initialized OsclBase, Error, Memory, and Scheduler?
-Ravi On Aug 17, 10:59 pm, shadow <yuri.bul...@gmail.com> wrote: > Yes, other allocation of arrays or/and objects work. > > -- > Best regards. > > On 18 авг, 10:48, RaviY <yend...@pv.com> wrote: > > > 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 -~----------~----~----~----~------~----~------~--~---