Hey folks,
 
I'm having some mysterious behavior occur when shutting down my
application.  It seems to be tied with shutting down CodecEngine 2.21,
and we did not have this problem when using CodecEngine 1.10.  
 
We have a modular, multi-platform application that collects video, among
other things, and its behavior is defined at startup with a list of
shared objects to load to give it the functionality we need for any
particular scenario.  The video recording capability on our DM6446-based
hardware is encapsulated in a shared object that utilizes the
CodecEngine API.
 
Things go well while the application is running, and we are able to
record video without any problems.  The problem surfaces when the
application closes: when Engine_close() gets called from within the
shared object, I get a "terminate called without an active exception.
Aborted."
 
The identical code worked flawlessly when using CodecEngine 1.10 on this
same hardware.  The fact that the CE API calls were encapsulated in a
shared object didn't seem to bother it.  Standalone, monolithic code
using CodecEngine 2.21 runs fine.  It would seem to indicate that
something in Engine_close() in this version of the API doesn't play well
inside a shared object context.
 
I eventually ended up building a test object to track down what was
going wrong.  It simply calls CERuntime_init() when the object opens and
then CERuntime_exit() when the object closes.  When CERuntime_exit() is
called, the same error happens as when Engine_close() was called before
(according to the output with CE_DEBUG=3).  If I don't call
CERuntime_exit(), the application hangs after return-from-main and never
closes.
 
Below is the relevant snippet from my test object code and an output
snippet from the application.  Has anybody tried using CodecEngine API's
from within a shared object and run into this?  Any insight would be
greatly appreciated.
 
Ryan
 
<code>
void ATEMEH264Port::PortOpen(xmlNodePtr xnpSetupNode)

{

        SOL::log << "Initializing CE runtime environment...";

        CERuntime_init();

 

}

 

void ATEMEH264Port::Close()

{

        SOL::log << "Shutting down CE runtime environment...";

        CERuntime_exit();

 

}
</code>
 
<output>
 
Start: Sun Feb  1 15:36:20 1970
SOL Version: 3.0
1226800259 INFO  : Loading configuration file reader [./sol.config.xml]
 
1226800259 INFO  :
Loading objects...
1226800259 INFO  Loading object::
./objects/ateme_h264_port.so[ATEME_H264_Port]
1226800259 INFO  Loading object::
./objects/test_control.so[Test_Control]
1226800259 INFO  :
Opening objects...
1226800259 INFO  Opening object:ATEME_H264_Port: ...
1226800259 INFO  Opening object:ATEME_H264_Port
ATEME_H264_Port::SOLBase::Open: Initializing CE runtime environment...
@0,939,967us: [+4 T:0x400209b0 S:0x03cf8734] OG - Global_init> This
program was built with the following packages:
@0,941,360us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
gnu.targets.arm.rtsv5T
(/home/rtalbot/dvsdk_2_00_00_18/xdctools_3_10_03/packages/gnu/targets/ar
m/rtsv5T/) [1,0,0,0,1225517428507]
@0,942,754us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.xdais.dm
(/home/rtalbot/dvsdk_2_00_00_18/framework_components_2_21/fctools/packag
es/ti/xdais/dm/) [1,0,5,0]
@0,944,068us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package ti.xdais
(/home/rtalbot/dvsdk_2_00_00_18/framework_components_2_21/fctools/packag
es/ti/xdais/) [1,2,1,0]
@0,945,393us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.utils.trace
(/home/rtalbot/dvsdk_2_00_00_18/framework_components_2_21/packages/ti/sd
o/utils/trace/) [1,0,0,1226385792502]
@0,946,820us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.ce.utils.xdm
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/packages/ti/sdo/ce/uti
ls/xdm/) [1,0,2,1226392459729]
@0,947,084us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.fc.dman3
(/home/rtalbot/dvsdk_2_00_00_18/framework_components_2_21/packages/ti/sd
o/fc/dman3/) [1,0,4,1226385259418]
@0,947,279us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.fc.acpy3
(/home/rtalbot/dvsdk_2_00_00_18/framework_components_2_21/packages/ti/sd
o/fc/acpy3/) [1,0,4,1226385241964]
@0,947,461us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
dsplink.gpp
(/home/rtalbot/dvsdk_2_00_00_18/dsplink-1_60-prebuilt/packages/dsplink/g
pp/) [5,0,0,1224878287000]
@0,947,634us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.linuxutils.cmem
(/home/rtalbot/dvsdk_2_00_00_18/framework_components_2_21/fctools/packag
es/ti/sdo/linuxutils/cmem/) [2,2,0,1226363746957]
@0,947,807us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
gnu.targets
(/home/rtalbot/dvsdk_2_00_00_18/xdctools_3_10_03/packages/gnu/targets/)
[1,0,1,1225517427930]
@0,947,982us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
gnu.targets.arm
(/home/rtalbot/dvsdk_2_00_00_18/xdctools_3_10_03/packages/gnu/targets/ar
m/) [1,0,0,0,1225517428045]
@0,948,153us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.catalog.c470
(/home/rtalbot/dvsdk_2_00_00_18/xdctools_3_10_03/packages/ti/catalog/c47
0/) [1,0,1,0,0]
@0,948,324us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.platforms.evmDM6446
(/home/rtalbot/dvsdk_2_00_00_18/bios_5_33_02/packages/ti/platforms/evmDM
6446/) [1,0,0,1,0]
@0,948,495us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.ce.osal
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/packages/ti/sdo/ce/osa
l/) [2,0,2,1226392293109]
@0,948,664us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.ce.osal.linux
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/packages/ti/sdo/ce/osa
l/linux/) [2,0,1,1226392304239]
@0,948,837us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.ce.ipc
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/packages/ti/sdo/ce/ipc
/) [2,0,1,1226392259449]
@0,949,007us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.ce.ipc.dsplink
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/packages/ti/sdo/ce/ipc
/dsplink/) [2,0,1,1226392278611]
@0,949,189us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.ce.alg
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/packages/ti/sdo/ce/alg
/) [1,0,1,1226391901169]
@0,949,361us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package ti.sdo.ce
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/packages/ti/sdo/ce/)
[1,0,6,1226391900950]
@0,949,532us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.ce.video
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/packages/ti/sdo/ce/vid
eo/) [1,0,3,1242816380000]
@0,949,705us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ti.sdo.ce.examples.codecs.xavsc_16
(/home/rtalbot/dvsdk_2_00_00_18/codec_engine_2_21/examples/ti/sdo/ce/exa
mples/codecs/xavsc_16/) []
@0,949,879us: [+4 T:0x400209b0 S:0x03cf8734] OG -     package
ateme_h264_port
(/home/rtalbot/das-rootfs/root/sol3_demo/objects/ateme_h264_port/) []
@0,950,160us: [+0 T:0x400209b0 S:0x03cf873c] OG - Global_atexit> enter
(fxn=0x404774c0)
@0,950,449us: [+0 T:0x400209b0 S:0x03cf873c] OG - Global_atexit> enter
(fxn=0x4047690c)
@0,950,922us: [+0 T:0x400209b0 S:0x03cf870c] OM - Memory_alloc>
Enter(0x18)
@0,951,229us: [+0 T:0x400209b0 S:0x03cf870c] OM - Memory_alloc> return
(0x10d510)
@0,951,784us: [+0 T:0x400209b0 S:0x03cf872c] OG - Global_atexit> enter
(fxn=0x4047483c)
@0,952,178us: [+0 T:0x400209b0 S:0x03cf8704] OM - Memory_alloc>
Enter(0x18)
@0,952,398us: [+0 T:0x400209b0 S:0x03cf8704] OM - Memory_alloc> return
(0x10d560)
@0,952,583us: [+0 T:0x400209b0 S:0x03cf8724] OG - Global_atexit> enter
(fxn=0x40473764)
@0,952,906us: [+0 T:0x400209b0 S:0x03cf872c] OG - Global_atexit> enter
(fxn=0x40475f70)
@0,953,379us: [+0 T:0x400209b0 S:0x03cf8724] ti.sdo.ce.osal.Sem -
Sem_create> count: 0
@0,953,591us: [+0 @0,960,917us: [+1 T:0x40cee490 S:0x40cedd54] OP -
daemon> thread created.
@0,962,149us: [+0 T:0x40cee490 S:0x40cedd54] OP - getCmd_d> Enter
(proc=0x40cedde8)
@0,963,479us: [+0 T:0x40cee490 S:0x40cedd34] ti.sdo.ce.osal.Sem -
Entered Sem_pend> sem[0x10d5e0] timeout[0xffffffff]
@0,964,872us: [+0 T:0x400209b0 S:0x03cf8704] OT - Thread_create> Exit
(task=0x10d788)
@0,966,194us: [+0 T:0x400209b0 S:0x03cf873c] OG - Global_atexit> enter
(fxn=0x40471958)
@0,967,647us: [+0 T:0x400209b0 S:0x03cf873c] OG - Global_atexit> enter
(fxn=0x40473c34)
@0,969,263us: [+0 T:0x400209b0 S:0x03cf8724] ti.sdo.ce.alg - ALG_init>
Enter
@0,970,492us: [+0 T:0x400209b0 S:0x03cf8714] OG - Global_atexit> enter
(fxn=0x404715a4)
@0,971,758us: [+0 T:0x400209b0 S:0x03cf8744] ti.sdo.ce.alg - ALG_init>
Exit
@0,972,988us: [+0 T:0x400209b0 S:0x03cf873c] OG - Global_atexit> enter
(fxn=0x404709d0)
@0,974,410us: [+0 T:0x400209b0 S:0x03cf8714] OM - Memory_alloc>
Enter(0x18)
@0,975,634us: [+0 T:0x400209b0 S:0x03cf8714] OM - Memory_alloc> return
(0x10d968)
@0,976,977us: [+0 T:0x400209b0 S:0x03cf873c] OG - Global_atexit> enter
(fxn=0x40476460)
@0,978,465us: [+6 T:0x400209b0 S:0x03cf8734] CE - Engine_init> CE
debugging on (CE_DEBUG=3; allowed CE_DEBUG levels: 1=min, 2=good, 3=max)
@0,979,779us: [+0 T:0x400209b0 S:0x03cf8724] OG - Global_atexit> enter
(fxn=0x4046de64)
@0,981,051us: [+0 T:0x400209b0 S:0x03cf8704] OM - Memory_alloc>
Enter(0x18)
@0,982,294us: [+0 T:0x400209b0 S:0x03cf8704] OM - Memory_alloc> return
(0x10d640)
@0,983,550us: [+0 T:0x400209b0 S:0x03cf8704] OM - Memory_alloc>
Enter(0x18)
@0,984,800us: [+0 T:0x400209b0 S:0x03cf8704] OM - Memory_alloc> return
(0x10db18)
@0,986,039us: [+0 T:0x400209b0 S:0x03cf8704] OM - Memory_alloc>
Enter(0x18)
@0,987,381us: [+0 T:0x400209b0 S:0x03cf8704] OM - Memory_alloc> return
(0x10db38)
@0,987,815us: [+0 T:0x400209b0 S:0x03cf874c] CS - Server_init()
@0,988,026us: [+0 T:0x400209b0 S:0x03cf874c] CS - Server_init>
Global_useLinkArbiter = 0
@0,988,209us: [+0 T:0x400209b0 S:0x03cf874c] OG - Global_atexit> enter
(fxn=0x4046c144)
1226800259 INFO  Opening object:Test_Control: ...
1226800260 INFO  : Entering RUN mode...
Space Bar Count: Missing
q
1226800273 INFO  : Closing objects...
1226800273 INFO  Closing object:ATEME_H264_Port: ...
1226800273 INFO  Closing object:ATEME_H264_Port: Shutting down CE
runtime environment...
@14,356,108us: [+0 T:0x400209b0 S:0x03cf87cc] OG - Global_exit> enter
@14,357,444us: [+2 T:0x400209b0 S:0x03cf87cc] OG - Global_exit> calling
function *0x4046c144()...
@14,358,795us: [+2 T:0x400209b0 S:0x03cf87cc] OG - Global_exit> calling
function *0x4046de64()...
@14,360,221us: [+0 T:0x400209b0 S:0x03cf879c] OM - Memory_free>
Enter(0x10d640, 0x18)
@14,361,470us: [+0 T:0x400209b0 S:0x03cf879c] OM - Memory_free> return
(0x1)
@14,362,705us: [+0 T:0x400209b0 S:0x03cf879c] OM - Memory_free>
Enter(0x10db18, 0x18)
@14,363,952us: [+0 T:0x400209b0 S:0x03cf879c] OM - Memory_free> return
(0x1)
@14,365,187us: [+0 T:0x400209b0 S:0x03cf879c] OM - Memory_free>
Enter(0x10db38, 0x18)
@14,366,513us: [+0 T:0x400209b0 S:0x03cf879c] OM - Memory_free> return
(0x1)
@14,367,753us: [+2 T:0x400209b0 S:0x03cf87cc] OG - Global_exit> calling
function *0x40476460()...
@14,369,019us: [+2 T:0x400209b0 S:0x03cf87cc] OG - Global_exit> calling
function *0x404709d0()...
@14,370,472us: [+2 T:0x400209b0 S:0x03cf87cc] OG - Global_exit> calling
function *0x404715a4()...
@14,371,746us: [+2 T:0x400209b0 S:0x03cf87cc] OG - Global_exit> calling
function *0x40473c34()...
@14,373,007us: [+2 T:0x400209b0 S:0x03cf87cc] OG - Global_exit> calling
function *0x40471958()...
@14,374,277us: [+0 T:0x400209b0 S:0x03cf879c] OP - doCmd> Enter
(cmdId=3, proc=0x0)
@14,375,657us: [+0 T:0x400209b0 S:0x03cf878c] ti.sdo.ce.osal.Sem -
Entered Sem_post> sem[0x10d5e0]
@14,377,130us: [+0 T:0x40cee490 S:0x40cedd34] ti.sdo.ce.osal.Sem -
Leaving Sem_pend> sem[0x10d5e0] status[0]
@14,377,381us: [+0 T:0x40cee490 S:0x40cedd54] OP - getCmd_d> Exit
(result=3)
@14,377,561us: [+0 T:0x40cee490 S:0x40cedd44] ti.sdo.ce.osal.Sem -
Entered Sem_post> sem[0x10d5f8]
@14,377,743us: [+0 T:0x40cee490 S:0x40cedd54] ti.sdo.ce.osal.Sem -
Leaving Sem_post> sem[0x10d5f8]
terminate called without an active exception
Aborted

</output>

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to