active objects problem

by shadow » Tue, 18 Aug 2009 11:11:23 GMT


Sponsored Links
 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.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



active objects problem

by RaviY » Tue, 18 Aug 2009 11:35:14 GMT


 Can you try

OSCL_TRY(err,
         m_pMyTimer = OSCL_NEW ( OsclTimer<OsclMemAllocator>,
("MyTimer", 1000) );

-Ravi



--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


active objects problem

by RaviY » Tue, 18 Aug 2009 11:49:14 GMT


 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




--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



active objects problem

by shadow » Tue, 18 Aug 2009 11:59:15 GMT


 i RaviY,

Thanks for the fast response, i've tried what you suggested, but
crash is the same here is a tracelog:

08-18 03:43:29.678: INFO/DEBUG(551): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
08-18 03:43:29.678: INFO/DEBUG(551): Build fingerprint: 'generic/
generic/generic/:1.5/CUPCAKE/eng.shadow.20090526.233815:eng/test-keys'
08-18 03:43:29.678: INFO/DEBUG(551): pid: 556, tid: 779 >>> /system/
bin/mediaserver <<<
08-18 03:43:29.688: INFO/DEBUG(551): signal 11 (SIGSEGV), fault addr
deadbaad
08-18 03:43:29.688: INFO/DEBUG(551): r0 00000003 r1 deadbaad r2
00000027 r3 ffff6150
08-18 03:43:29.688: INFO/DEBUG(551): r4 ffff6128 r5 afe2fef8 r6
afe39dd0 r7 000432b0
08-18 03:43:29.688: INFO/DEBUG(551): r8 40307b24 r9 afe39dd0 10
a9d2856d fp 405073fc
08-18 03:43:29.688: INFO/DEBUG(551): ip 0000001a sp 40507370 lr
afe1ff33 pc afe1066a cpsr 20000030
08-18 03:43:29.746: INFO/DEBUG(551): #00 pc 0001066a /
system/lib/libc.so
08-18 03:43:29.746: INFO/DEBUG(551): #01 pc 00027f10 /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.746: INFO/DEBUG(551): #02 pc 00027c98 /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.756: INFO/DEBUG(551): #03 pc 000295c0 /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.756: INFO/DEBUG(551): #04 pc 00028dcc /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.756: INFO/DEBUG(551): #05 pc 00028754 /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.768: INFO/DEBUG(551): #06 pc 0001facc /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.768: INFO/DEBUG(551): #07 pc 00020080 /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.778: INFO/DEBUG(551): #08 pc 00020dec /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.778: INFO/DEBUG(551): #09 pc 00014be0 /
system/lib/libopencoremkvsplitter.so
08-18 03:43:29.778: INFO/DEBUG(551): #10 pc 0001bad4 /
system/lib/libopencoremkvrecognizer.so
08-18 03:43:29.787: INFO/DEBUG(551): #11 pc 000ec4bc /
system/lib/libopencore_player.so
08-18 03:43:29.787: INFO/DEBUG(551): #12 pc 000d75ee /
system/lib/libopencore_player.so
08-18 03:43:29.797: INFO/DEBUG(551): #13 pc 000e0238 /
system/lib/libopencore_player.so
08-18 03:43:29.797: INFO/DEBUG(551): #14 pc 000ecdc0 /
system/lib/libopencore_player.so
08-18 03:43:29.807: INFO/DEBUG(551): #15 pc 000594b2 /
system/lib/libopencore_common.so
08-18 03:43:29.807: INFO/DEBUG(551): #16 pc 00059568 /
system/lib/libopencore_common.so
08-18 03:43:29.807: INFO/DEBUG(551): #17 pc 0005961e /
system/lib/libopencore_common.so
08-18 03:43:29.817: INFO/DEBUG(551): #18 pc 000f04fc /
system/lib/libopencore_player.so
08-18 03:43:29.817: INFO/DEBUG(551): #19 pc 000f05c4 /
system/lib/libopencore_player.so
08-18 03:43:29.826: INFO/DEBUG(551): #20 pc 000285d4 /
system/lib/libutils.so
08-18 03:43:29.826: INFO/DEBUG(551): #21 pc 0000f880 /
system/lib/libc.so
08-18 03:43:29.826: INFO/DEBUG(551): #22 pc 0000f3f4 /
system/lib/libc.so
08-18 03:43:29.836: INFO/DEBUG(551): stack:
08-18 03:43:29.836: INFO/DEBUG(551): 40507330 00044e08 [heap]
08-18 03:43:29.836: INFO/DEBUG(551): 40507334 afe0e940 /system/
lib/libc.so
08-18 03:43:29.846: INFO/DEBUG(551): 40507338 afe3c



active objects problem

by shadow » Tue, 18 Aug 2009 11:59:58 GMT


 Yes, other allocation of arrays or/and objects work.

--
 Best regards.





--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



active objects problem

by RaviY » Tue, 18 Aug 2009 12:36:34 GMT


 And, how does your test code look like? Did you make sure you have
initialized OsclBase, Error, Memory, and Scheduler?

-Ravi






--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



active objects problem

by shadow » Tue, 18 Aug 2009 12:48:16 GMT


 y test application is a simple Java based media player.

What does it mean: "Did you make sure you have initialized OsclBase,
Error, Memory, and Scheduler."?
How can i be sure that is for example, Scheduler has been initialized?
can you give me some advise?

--
Best regards.

On 18 , 11:36, RaviY <yend...@pv.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



active objects problem

by shadow » Tue, 18 Aug 2009 15:13:35 GMT


 t seems that node' thread doesn't have scheduler, because even i if
call OsclExecScheduler *pCurrentScheduler = OsclExecScheduler::Current
(); i've a crash. Do you have any ideas? why scheduler isn't created?
Thread context is valid... i've been checking it like this:

fprintf( m_pLogFile, "CMyMkvNode::CMKVNode( int32 &aPriority ):
iThreadContext = 0x%08x;\tThread's ID: %d\n", &iThreadContext,
iThreadContext.Id() );
fflush( m_pLogFile );

the following call causes a crash too:
fprintf( m_pLogFile, "CMyMkvNode::CMyMkvNode( int32 &aPriority ):
ThreadHasScheduler = %d\n", iThreadContext.ThreadHasScheduler() );
fflush( m_pLogFile );

--
Best regards.

On 18 , 11:36, RaviY <yend...@pv.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



active objects problem

by RaviY » Tue, 18 Aug 2009 22:12:35 GMT


 an you explain in more detail about the changes that you are making?
a. Are you using the existing java MediaPlayer APIs to create the
underlying player?
b. If your code does go through playerdriver, can you enable the
"debug" logs in playerdriver.cpp
c. Where did you modify the native code to add this new AO?

-Ravi

On Aug 18, 2:12am, shadow <yuri.bul...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



active objects problem

by fadden » Wed, 19 Aug 2009 03:48:11 GMT


 

  ...
  ...

0xdeadbaad is currently used when somebody calls abort().  If this
trace is correct, the code in libopencoremkvsplitter is deliberately
aborting.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



active objects problem

by shadow » Wed, 19 Aug 2009 17:41:41 GMT


 hanks a lot for the help... the reason of crash was in not correct
linked libraries.

--
Best regards.

On 18 , 21:12, RaviY <yend...@pv.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. Problem installing Android 2.0 on Mac (Snow Leopard)

I had a similar problem. The fix was to start from scratch using the
2.0 base download then use it to download the required API levels.

Al.
--

* Looking for Android Apps? - Try http://andappstore.com/ *

======
Funky Android Limited is registered in England & Wales with the
company number  6741909.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.




-- 

2. cyanogen 4.2.3.1

http://forum.xda-developers.com/showthread.php?t=567610

hayah.. udah ada update baru lagi..

--~--~---------~--~----~------------~-------~--~----~
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group, please visit the following page:
 

3. Sometimes the running emulator is not found from within Eclipse?!

4. A note on "scamming the market"

5. Does android have a numeric keypad?

6. Droid Explorer

7. CyanogenMod v.4.2.3