On Wednesday 24 June 2009 01:11:05 am Ryan Talbot wrote: > 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 >
Sorry to bring-up this very old thread but I faced the same problem lately. I couldn't find the root cause of the problem but I have a workaround. I wonder if you had find the root cause of this problem? My Codec Engine version is the same but either shared library or stand alone application it doesn't matter. If I mix codec engine application with C++ and external libraries(Qt4 in my case) application terminates with the same error. If no external libraries are linked, then program works as expected. My workaround is: * Built a shared library for codec engine related parts * Do not link this with main application but use 'dlopen' with the library and import symbols with 'dlsym'. Regards, Caglar _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
