[OmniORB] "pure virtual method called"
Cameron Rochester
C_Rochester@motherwell.com.au
Tue Oct 29 09:03:00 2002
Hello all,
I am having a problem with "pure virtual method called" (this is the message
printed on screen just before the app core dumps). The exact same code
worked with OmniORB 3.0.3 but does not appear to work with OmniORB 4.0.0.
The code that appears to be giving this exception is:
EventChannelImpl::EventChannelImpl()
{
ConsumerAdminImpl* ca = new ConsumerAdminImpl();
m_consumerAdmin = ca->_this();
ca->_remove_ref();
SupplierAdminImpl* sa = new SupplierAdminImpl();
m_supplierAdmin = sa->_this();
sa->_remove_ref();
}
where the member variables are defined to be:
CosEventChannelAdmin::ConsumerAdmin_var m_consumerAdmin;
CosEventChannelAdmin::SupplierAdmin_var m_supplierAdmin;
and the classes inherit from the following:
class ConsumerAdminImpl
: public virtual POA_CosEventChannelAdmin::ConsumerAdmin,
public virtual PortableServer::RefCountServantBase
class SupplierAdminImpl
: public virtual POA_CosEventChannelAdmin::SupplierAdmin,
public virtual PortableServer::RefCountServantBase
Does anyone have any ideas about this problem? Below is the stack trace from
the core dump. The call to "_this()" appears to be the culprit. If anyone
would be able to help it would be most appreciated, please let me know if
you want more information/code.
Thanks in advance
Cameron Rochester
#0 0xfe3d9da0 in __sigprocmask () from /usr/lib/libthread.so.1
#1 0xfe3cf400 in _resetsig () from /usr/lib/libthread.so.1
#2 0xfe3ceb4c in _sigon () from /usr/lib/libthread.so.1
#3 0xfe3d1a28 in _thrp_kill () from /usr/lib/libthread.so.1
#4 0xfe2395b0 in abort () from /usr/lib/libc.so.1
#5 0xff156e00 in __default_terminate ()
from /home/cameronr/omni/build/lib/libomnithread.so.3
#6 0xff156e30 in __terminate ()
from /home/cameronr/omni/build/lib/libomnithread.so.3
#7 0xff2d1d04 in __pure_virtual ()
from /home/cameronr/omni/build/lib/libomniORB4.so.0
#8 0xff264f50 in
servant__this__Q24omni10omniOrbPOAPQ214PortableServer11Servant
BasePCc () from /home/cameronr/omni/build/lib/libomniORB4.so.0
#9 0xff271bc4 in PortableServer::ServantBase::_do_this ()
from /home/cameronr/omni/build/lib/libomniORB4.so.0
#10 0x416ac in EventChannelImpl::EventChannelImpl ()
#11 0x40168 in main ()