• Segmentation fault when globaldefs::NamingAttributes_T_var is used

    From Rajesh Kannan@21:1/5 to All on Fri Apr 8 01:25:41 2016
    Hi,

    We are using globaldefs::NamingAttributes_T_var to access the notifications from CORBA (TAO+ACE).

    <code>
    if (strcmp(notification.filterable_data[i].name,"objectName") == 0)
    {
    globaldefs::NamingAttributes_T_var testStruct;

    if (notification.filterable_data[i].value >>= testStruct) {

    for (CORBA::ULong j=0; j < testStruct->length() ; j++ )
    {
    cout<<"struct of name"<<(*testStruct)[j].name<<endl;
    cout<<"struct of value"<<(*testStruct)[j].value<<endl;

    }
    }
    }
    <code end>

    While executing the above, getting segmentation fault from #0 0x00000019 in ?? ()
    #1 0x080824b4 in globaldefs::NVSList_T::_tao_any_destructor(void*) ()


    <backtrace>

    #0 0x00000019 in ?? ()
    #1 0x080824b4 in globaldefs::NVSList_T::_tao_any_destructor(void*) ()
    #2 0x08088fcd in TAO::Any_Dual_Impl_T<globaldefs::NVSList_T>::free_value() () #3 0xb7d08754 in TAO::Any_Impl::_remove_ref (this=0x83b9df0) at Any_Impl.cpp:120
    #4 0xb7d01117 in CORBA::Any::~Any (this=0x83a4018, __in_chrg=<optimized out>) at Any.cpp:46
    #5 0x080e2999 in CosNotification::Property::~Property() ()
    #6 0x080ebccf in TAO::details::unbounded_value_allocation_traits<CosNotification::Property, true>::freebuf(CosNotification::Property*) ()
    #7 0x080e8795 in TAO::details::generic_sequence<CosNotification::Property, TAO::details::unbounded_value_allocation_traits<CosNotification::Property, true>, TAO::details::value_traits<CosNotification::Property, true> >::freebuf(CosNotification::Property*
    ) ()
    #8 0x080e2d49 in TAO::details::generic_sequence<CosNotification::Property, TAO::details::unbounded_value_allocation_traits<CosNotification::Property, true>, TAO::details::value_traits<CosNotification::Property, true> >::~generic_sequence() ()
    #9 0x080e29d3 in TAO::unbounded_value_sequence<CosNotification::Property>::~unbounded_value_sequence() ()
    #10 0x080ded55 in CosNotification::PropertySeq::~PropertySeq() ()
    #11 0x080e2c1b in CosNotification::StructuredEvent::~StructuredEvent() ()
    #12 0x081b2ffe in TAO::In_Var_Size_SArgument_T<CosNotification::StructuredEvent, TAO::Any_Insert_Policy_Stream>::~In_Var_Size_SArgument_T() ()
    #13 0x081b0842 in POA_CosNotifyComm::StructuredPushConsumer::push_structured_event_skel(TAO_ServerRequest&, TAO::Portable_Server::Servant_Upcall*, TAO_ServantBase*)
    ()
    #14 0xb7e02e19 in TAO_ServantBase::synchronous_upcall_dispatch (this=0x8387f54, req=..., servant_upcall=0xbfffe884, derived_this=0x8387f54) at Servant_Base.cpp:574
    #15 0x081b0a82 in POA_CosNotifyComm::StructuredPushConsumer::_dispatch(TAO_ServerRequest&, TAO::Portable_Server::Servant_Upcall*) ()
    #16 0xb7de0def in TAO_Object_Adapter::do_dispatch (this=0x8386a70, req=..., upcall=...) at Object_Adapter.cpp:1198
    #17 0xb7de1968 in TAO_Object_Adapter::dispatch_servant (this=0x8386a70, key=..., req=..., forward_to=...) at Object_Adapter.cpp:353
    #18 0xb7de1da7 in TAO_Object_Adapter::dispatch (this=0x8386a70, key=..., request=..., forward_to=...) at Object_Adapter.cpp:766
    #19 0xb7ec5efd in TAO_Adapter_Registry::dispatch (this=0x8376438, key=..., request=..., forward_to=...) at Adapter_Registry.cpp:110
    #20 0xb7f4bb02 in TAO_Request_Dispatcher::dispatch (this=0x8377308, orb_core=0x83761b8, request=..., forward_to=...) at Request_Dispatcher.cpp:21
    #21 0xb7edf06c in TAO_GIOP_Message_Base::process_request (this=0x83b8f80, transport=0x83b8ec0, cdr=..., output=..., parser=0x83b8f8c) at GIOP_Message_Base.cpp:1014
    #22 0xb7ee121a in TAO_GIOP_Message_Base::process_request_message (this=0x83b8f80, transport=0x83b8ec0, qd=0x83b4b78) at GIOP_Message_Base.cpp:737
    #23 0xb7f79641 in TAO_Transport::process_parsed_messages (this=0x83b8ec0, qd=0x83b4b78, rh=...) at Transport.cpp:2502
    #24 0xb7f79a0a in TAO_Transport::consolidate_process_message (this=0x83b8ec0, q_data=0x83b4b78, rh=...) at Transport.cpp:1842
    #25 0xb7f79d48 in TAO_Transport::handle_input_missing_data (this=0x83b8ec0, rh=..., max_wait_time=0x0, q_data=0x83b4b78) at Transport.cpp:1988
    #26 0xb7f7aa2d in TAO_Transport::handle_input (this=0x83b8ec0, rh=..., max_wait_time=0x0) at Transport.cpp:1746
    #27 0xb7ecc90b in TAO_Connection_Handler::handle_input_internal (this=0x83b4e5c, h=11, eh=0x83b4df0) at Connection_Handler.cpp:292
    #28 0xb7eccb77 in TAO_Connection_Handler::handle_input_eh (this=0x83b4e5c, h=11, eh=0x83b4df0) at Connection_Handler.cpp:251
    #29 0xb7ef3fab in TAO_IIOP_Connection_Handler::handle_input (this=0x83b4df0, h=11) at IIOP_Connection_Handler.cpp:407
    #30 0xb7c7ceb6 in ACE_TP_Reactor::dispatch_socket_event (this=0x83778b8, dispatch_info=...) at TP_Reactor.cpp:545
    #31 0xb7c7d807 in ACE_TP_Reactor::handle_socket_events (this=0x83778b8, event_count=@0xbffff588: 0, guard=...) at TP_Reactor.cpp:415
    #32 0xb7c7d918 in ACE_TP_Reactor::dispatch_i (this=0x83778b8, max_wait_time=0x0, guard=...) at TP_Reactor.cpp:244
    #33 0xb7c7db1a in ACE_TP_Reactor::handle_events (this=0x83778b8, max_wait_time=0x0) at TP_Reactor.cpp:173
    #34 0xb7f2ab65 in TAO_ORB_Core::run (this=0x83761b8, tv=0x0, perform_work=0) at /root/ACE_wrappers/ace/Reactor.inl:188
    ---Type <return> to continue, or q <return> to quit---
    #35 0xb7f24dac in CORBA::ORB::run (this=0x83783b8, tv=0x0) at ORB.cpp:188
    #36 0xb7f24e15 in CORBA::ORB::run (this=0x83783b8) at ORB.cpp:174
    #37 0x0807ce97 in main ()
    <backtrace end>

    Can you please suggest, is it necessary to free the testStruct? We tried using "testStruct->release()" and free(testStruct). But getting the same error again. Please suggest.

    Rajesh

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)