[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] tools/metadataeng/engine/pub metadataengbase.h, 1.7,
From:       amsaleem () helixcommunity ! org
Date:       2010-03-31 22:31:57
Message-ID: 201003312232.o2VMWEYf003566 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/tools/metadataeng/engine/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv7006/engine/pub

Modified Files:
	metadataengbase.h 
Log Message:
"Nokia submits this code under the terms of a commercial contribution agreement with \
Real Networks, and I am authorized to contribute this code under said agreement."

Modified by: saleem.adookkattil@nokia.com

Reviewed by:

Date: 03/29/2010

Project: symbian_client_apps

ErrorId: AJIU-842V2E

Synopsis: Phonon backend CHXClientAppFrameWork component release failure due to \
object reference count problem

Overview:

Call to release CHXClientAppFrameWork component, failed to released it from memory \
due to multiple object reference count increment call during the component creation.

CHXClientAppFrameWork::CreateInstance(IHXClientAppFrameWork**) creates an instance of \
CHXClientAppFrameWork component.  This method call HX_ADDREF macro after allocating \
memory for the component and this set the reference count of object to one.

CHXClientAppFrameWork::Initialize() method call CHXClientAppFrameWork base class \
CHXCallbackHandler::Create() and this method call \
CHXClientAppFrameWork::GetInstance() method. CHXClientAppFrameWork::GetInstance() \
call reference count increment method and set the reference count of object to two.

due to this multiple reference count increment, interface release call on \
CHXClientAppFrameWork component never bring the reference count to zero and no \
destructor call made on object.

Fixed this reference count issue by setting m_pAppFrameWork = \
(IHXClientAppFrameWork*)this; in CHXClientAppFrameWork::Initialize() before calling \
CHXCallbackHandler::Create()  and setting m_pAppFrameWork to NULL in \
CHXClientAppFrameWork::Close.

Noticed couple of hidden problem after correcting the above error. They are

1) There was no call made to destroy  HXGlobalManagerImp instance (ie, no \
UninitConfig() method call made to release HXGlobalManagerImp).

   Added UninitConfig() method call inside CHXClientAppFrameWork ::Close() to release \
HXGlobalManagerImp instance.  In addition, calling close method from base destructor, \
cause failure to call UninitConfig of derived class(derived class instance destroyed \
before base instance).  So added close method call inside \
CHXSymbianAppFrameWork::~CHXSymbianAppFrameWork() to close CHXClientAppFrameWork \
instance derviced class destructor.  
2) There was no call to close HXPlayer inside CHXPlayerCtrlImpl instance. Added code \
close HXPlayer instance in CHXPlayerCtrlImpl::_OnDestroy. 

3) Added HX_DISABLE_LOGGING macro call to release log system.

Files modified: 

cvsroot\clientapps\appframeworks\common\hxclientappframework.cpp
cvsroot\clientapps\appframeworks\common\hxcallbackhandler.cpp
cvsroot\clientapps\appframeworks\common\platform\symbian\hxsymbianappframework.cpp
cvsroot\clientapps\appframeworks\common\hxplayerctrlimpl.cpp

Files added:

Image Size and Heap Use impact: None.

Module Release testing (STIF) : No. (There is no stiff test for phonon backend. \
Tested using phonon test player)

Test case(s) Added  : No

Memory leak check performed : Yes

Platforms and Profiles Build Verified: helix-client-symbian-4

Platforms and Profiles Functionality verified: armv5, winscw

Branch: 4_2_0_brizo, Head







Index: metadataengbase.h
===================================================================
RCS file: /cvsroot/datatype/tools/metadataeng/engine/pub/metadataengbase.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- metadataengbase.h	9 Mar 2010 18:03:58 -0000	1.7
+++ metadataengbase.h	31 Mar 2010 22:31:55 -0000	1.8
@@ -159,7 +159,7 @@
   STDMETHOD_(void, DoDestroy)(THIS);
 
   // functions must be implemented in the derived engines.
-  STDMETHOD_(HX_RESULT, SetupGlobals)(THIS_ HXBOOL bIsMetaData) PURE; // Specifies \
whether the instance belongs to MetaData or Thumbnail +  STDMETHOD_(HX_RESULT, \
SetupGlobals)(THIS) PURE;  STDMETHOD_(HX_RESULT, SetupPreferences)(THIS) PURE;
   STDMETHOD_(void, GetDefaultOptions)(THIS_ IHXValues* pOptions) PURE;
   STDMETHOD_(CHXMetaDataEntry*, CreateMetaDataEntry)
@@ -174,7 +174,7 @@
   STDMETHOD_(void, DeleteMetaDataEntry)
                     (THIS_ CHXMetaDataEntry *pEntry) PURE;
 
-  HX_RESULT     Initialize(HXBOOL bForceSyncReading = FALSE);
+  HX_RESULT     Initialize();
 
 private:
 


_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic