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. Total and free memory information in android phones and emulator

Hi,

I have gone through the ActivityManager.MemoryInfo and
Debug.MemoryInfo classes and the API's provided by them to get an
insight of the available memory present and the memory consumption
being done. I have been through the methods provided by Runtime class
to get memory information.

I still haven't got a clear idea as to how to retrieve the system
level memory information.

For e.g. lets say the emulator is allocated 56MB of RAM and 24MB is
being used (which can be a combination of cached, actual memory which
cannot be GCed and other memory like dirty which can be freed whenever
required.). All at the system level and the application level.

I would be really glad if someone guided me  because i read that its
not that accurate to get memory usage in android ! I am using android
sdk 2.2.

Thanks,
Adithya.

-- 

2. Permissions storage at installation

Hi all,

I have read sources of PackageManagerService to follow steps of the
installation. I have now a clearer view on how permissions are granted but I
did not found in this code where the fact that applications are granted to
actual package are stored?
I mean, ok permissions are checked, gratend flag is set to true etc, but
then where is it stored to be checked at runtime?

-- 
Benats Guillaume .

-- 

3. 2.3 Google API's missing?

4. Double thumb on a seekbar

5. 3d engine question and Irrlicht

6. 2.3 SD card emulation

7. Need your help to clarify CTS 2.2_r3 failure test case issues on Froyo.