Hi list,
I've been trying to compile and run opencore on native PC following
the instructions in quick_start.txt . The reason I want to do this is
that it's supposed to be easier to work on host pc since what I want
to do is not hardware dependent, but so far it doesn't seem to be the
case. After 8 bug fix commits I managed to finish the compilation, but
other problem follows. Here is the problem description:
Since H223LowerLayer is both PvmfPortBaseImpl and
PVMFPortActivityHandler, it sends itself to the constructor of
PvmfPortBaseImpl to act as its iPortActivityHandler. During the
destruction of PvmfPortBaseImpl,
iPortActivityHandler->HandlePortActivity will be called. The problem
is, the real implementation of HandlePortActivity lies inside
H223LowerLayer, and the order of destruction is:
~H223LowerLayer
~PvmfPortBaseImpl
iPortActivityHandler->HandlePortActivity
So when HandlePortActivity is actually invoked,
H223LowerLayer::HandlePortActivity() is already invalid, and the code
path falls to PVMFPortActivityHandler::HandlePortActivity, which is a
pure virtual function. This will cause a SIGABRT:
pure virtual method called
terminate called without an active exception
Program received signal SIGABRT, Aborted.
(Backtrace enclosed.)
p.s. Here is the snipped source code related to this issue:
external/opencore/protocols/systems/3g-324m_pvterminal/h223/include/lowerlayer.h:
class H223LowerLayer : public PvmfPortBaseImpl,
public PVMFPortActivityHandler
};
external/opencore/pvmi/pvmf/include/pvmf_port_base_impl.h:
class PvmfPortBaseImpl : public PVMFPortInterface
{
OSCL_IMPORT_REF PvmfPortBaseImpl(int32 aPortTag,
PVMFPortActivityHandler* aNode, const char*name = NULL);
};
external/opencore/pvmi/pvmf/include/pvmf_port_interface.h:
class PVMFPortInterface
{
PVMFPortActivityHandler *iPortActivityHandler;
};
external/opencore/pvmi/pvmf/include/pvmf_node_interface.h:
class PVMFPortActivityHandler
{
public:
virtual ~PVMFPortActivityHandler() {}
virtual void HandlePortActivity(const PVMFPortActivity &) = 0;
};
implementation:
external/opencore/protocols/systems/3g-324m_pvterminal/h223/src/lowerlayer.cpp:
H223LowerLayer::H223LowerLayer(int32 aPortTag, TPVLoopbackMode aLoopbackMode)
: PvmfPortBaseImpl(aPortTag, this),
{
}
external/opencore/pvmi/pvmf/src/pvmf_port_base_impl.cpp:
OSCL_EXPORT_REF PvmfPortBaseImpl::PvmfPortBaseImpl(int32 aTag,
PVMFPortActivityHandler* aNode, const char*name)
: PVMFPortInterface(aNode),
{
}
OSCL_EXPORT_REF PvmfPortBaseImpl::~PvmfPortBaseImpl()
{
PortActivity(PVMF_PORT_ACTIVITY_DELETED);
}
OSCL_EXPORT_REF void PvmfPortBaseImpl::PortActivity(PVMFPortActivityType
aActivity)
{
if (iPortActivityHandler)
{
PVMFPortActivity activity(this, aActivity);
iPortActivityHandler->HandlePortActivity(activity);
}
}
--
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
j...@n20a:~/scm/mydroid/external/opencore/build_config/opencore_dynamic$ gdb
build/bin/linux/pv2way_omx_engine_test GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/john/scm/mydroid/external/opencore/build_config/opencore_dynamic/build/bin/linux/pv2way_omx_engine_test...done.
(gdb) run
Starting program:
/home/john/scm/mydroid/external/opencore/build_config/opencore_dynamic/build/bin/linux/pv2way_omx_engine_test
[Thread debugging using libthread_db enabled]
Test Program for PV Engine class.
Basic engine tests.
Start alloc dealloc test, proxy 1.
[New Thread 0xf776eb70 (LWP 2863)]
[Thread 0xf776eb70 (LWP 2863) exited]
Start init test, num runs 1, proxy 1.
[New Thread 0xf776eb70 (LWP 2864)]
pure virtual method called
terminate called without an active exception
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xf776eb70 (LWP 2864)]
0xf7fdf430 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fdf430 in __kernel_vsyscall ()
#1 0xf75047d1 in raise () from /lib32/libc.so.6
#2 0xf7507c32 in abort () from /lib32/libc.so.6
#3 0xf771a87f in __gnu_cxx::__verbose_terminate_handler() () from
/usr/lib32/libstdc++.so.6
#4 0xf77187b5 in ?? () from /usr/lib32/libstdc++.so.6
#5 0xf77187f2 in std::terminate() () from /usr/lib32/libstdc++.so.6
#6 0xf77194a5 in __cxa_pure_virtual () from /usr/lib32/libstdc++.so.6
#7 0xf7bcf29f in PvmfPortBaseImpl::PortActivity (this=0x8233820,
aActivity=PVMF_PORT_ACTIVITY_DELETED)
at
/home/john/scm/mydroid/external/opencore/pvmi/pvmf/src/pvmf_port_base_impl.cpp:146
#8 0xf7bcfb3b in ~PvmfPortBaseImpl (this=0x8233820, __in_chrg=<value optimized
out>)
at
/home/john/scm/mydroid/external/opencore/pvmi/pvmf/src/pvmf_port_base_impl.cpp:235
#9 0xf7e73243 in ~H223LowerLayer (this=0x8233820, __in_chrg=<value optimized
out>)
at
/home/john/scm/mydroid/external/opencore/protocols/systems/3g-324m_pvterminal/h223/src/lowerlayer.cpp:79
#10 0xf7e5128e in CPVH223Multiplex::Close (this=0x822c480)
at
/home/john/scm/mydroid/external/opencore/protocols/systems/3g-324m_pvterminal/h223/src/cpvh223multiplex.cpp:225
#11 0xf7e7b4fd in TSC_324m::ResetTsc (this=0x81c5048)
at
/home/john/scm/mydroid/external/opencore/protocols/systems/3g-324m_pvterminal/h324/tsc/src/tscmain.cpp:494
#12 0xf7e7edf3 in TSC_324m::DoReset (this=0x81c5048, cmd=...)
at
/home/john/scm/mydroid/external/opencore/protocols/systems/3g-324m_pvterminal/h324/tsc/src/tscmain.cpp:1603
#13 0xf7e7fc7c in TSC_324m::ProcessCommand (this=0x81c5048, aCmd=...)
at
/home/john/scm/mydroid/external/opencore/protocols/systems/3g-324m_pvterminal/h324/tsc/src/tscmain.cpp:1897
#14 0xf7e7faa1 in TSC_324m::Run (this=0x81c5048)
at
/home/john/scm/mydroid/external/opencore/protocols/systems/3g-324m_pvterminal/h324/tsc/src/tscmain.cpp:1839
#15 0xf7b5f9e5 in OsclExecSchedulerCommonBase::CallRunExec (this=0x81d5f68,
pvactive=0x81c5088)
at
/home/john/scm/mydroid/external/opencore/oscl/oscl/osclproc/src/oscl_scheduler.cpp:1235
#16 0xf7b5fdb2 in OsclExecSchedulerCommonBase::BlockingLoopL (this=0x81d5f68)
at
/home/john/scm/mydroid/external/opencore/oscl/oscl/osclproc/src/oscl_scheduler.cpp:1294
#17 0xf7b5ecfe in OsclExecSchedulerCommonBase::StartScheduler (this=0x81d5f68,
aSignal=0x81b36b0)
at
/home/john/scm/mydroid/external/opencore/oscl/oscl/osclproc/src/oscl_scheduler.cpp:797
#18 0xf7c4ddb9 in CPVInterfaceProxy::AppStartScheduler (this=0x81b3638)
at
/home/john/scm/mydroid/external/opencore/baselibs/thread_messaging/src/pv_interface_proxy.cpp:632
#19 0xf7c4d7ee in CPVInterfaceProxy::InThread (this=0x81b3638)
at
/home/john/scm/mydroid/external/opencore/baselibs/thread_messaging/src/pv_interface_proxy.cpp:523
#20 0xf7c4da07 in pvproxythreadmain (aPtr=0x81b3638)
at
/home/john/scm/mydroid/external/opencore/baselibs/thread_messaging/src/pv_interface_proxy.cpp:582
#21 0xf764a80e in start_thread () from /lib32/libpthread.so.0
#22 0xf75a892e in clone () from /lib32/libc.so.6