RE: Fix stability issues with Producer Active-x Control

"Eric Hyche" <[email protected]>
Newsgroups gmane.comp.multimedia.helix.devel
Organization RealNetworks, Inc.
Message-ID <005f01c9f0eb$b584cd50$208e67f0$@com>
Sujeet,

I was just going through CR emails that were sent while
I was on vacation. I'm sure you've already checked this in.

This sounds like the right fix for now to me (removing
CanUnload entrypoint), because properly implementing
CanUnload() for encsession.dll would take a lot of 
time right now (making sure every object inherits
from CHXBaseCountingObject).

As this codebase gets merged to mobile platforms
and optimized on them (as is being done with Android
now), those teams can address issues like this.

Eric

=======================================
Eric Hyche ([email protected])
Principal Engineer
RealNetworks, Inc.


>-----Original Message-----
>From: [email protected] [mailto:[email protected]]
>Sent: Monday, June 08, 2009 3:14 AM
>To: [email protected]; [email protected]
>Subject: CR: Fix stability issues with Producer Active-x Control
>
>Synopsis
>========
>Fix for Stability in Active-X control
>
>Branches: PRODUCER_13_0_RN and HEAD.
>Suggested Reviewer: Anyone.
>
>
>Description
>===========
>Stability issue was causes due following.
>Plugin Handler registers itself to be called at fixed interval.
>During callback it checks, if there are DLL's which can be unloaded and
>unloads those DLL.
>Above call was resulting in plugin handler unloading encession DLL.
>When OnPaint Message was called Active-x sample was trying to draw a
>sample which was refering to unloaded memory and crashing.
>
>encsession was exposing CanUnload method, which calls
>CHXBaseCountingObject::ObjectsActive().
>All objects within encsession are not derived from CHXBaseCountingObject
>and ObjectActive count is not set.
>
>Fix was to not expose CanUnload method. Unloading encession by plugin
>handler is not required for producer application. This functionality might
>be good to
>have for mobile applications. For now I am proposing to not have this
>method. If it is required then we should implement it correctly.
>
>
>Files Affected
>==============
>client/encodesvc/engine/encsession/hxplugin_entrypoints.cpp
>client/encodesvc/engine/encsession/Umakefil
>
>Testing Performed
>=================
>Tested with active-x sample.
>
>Performance Tests:
>- None
>
>Platforms Tested: win32-i386-vc7
>Build verified: win32-i386-vc7
>
>QA Hints
>========
>Please do long encodes with GUI and make GUI preview paint itself when
>ideal by bringing another application infront.
>
>Index: hxplugin_entrypoints.cpp
>===================================================================
>RCS file:
>/cvsroot/client/encodesvc/engine/encsession/hxplugin_entrypoints.cpp,v
>retrieving revision 1.1
>diff -u -r1.1 hxplugin_entrypoints.cpp
>--- hxplugin_entrypoints.cpp    10 Sep 2008 18:46:35 -0000      1.1
>+++ hxplugin_entrypoints.cpp    8 Jun 2009 05:57:56 -0000
>@@ -79,9 +79,11 @@
>
>     return retVal;
> }
>-
>+/*
>+CHXBaseCountingObject is not base class of all objects in this DLL.
>+Hence exposing this will lead to Plugin Handler unloading this DLL.
> STDAPI ENTRYPOINTCALLTYPE ENTRYPOINT(CanUnload2)(void)
> {
>     return (CHXBaseCountingObject::ObjectsActive() ? HXR_FAIL : HXR_OK);
> }
>-
>+*/
>cvs diff: Diffing docs
>cvs diff: Diffing platform
>cvs diff: Diffing platform/win32
>
>
>Index: Umakefil
>===================================================================
>RCS file: /cvsroot/client/encodesvc/engine/encsession/Umakefil,v
>
>Commented following line. Diff is messed up.
>
>#project.ExportFunction("CanUnload2",
>#                       "void")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.