knowledge-database (beta)

Current group: comp.soft-sys.ace

Re: [tao-users] PushSupplier not connecting ...

Re: [tao-users] PushSupplier not connecting ...  
Sandro Santos Andrade
From:Sandro Santos Andrade
Subject:Re: [tao-users] PushSupplier not connecting ...
Date:21 Jan 2005 15:28:31 -0600
Hi Honorato,

Thanks for help. I did several tests, including connecting just the
supplier, but the error remains.

By the way, the Kokyu example
($TAO_ROOT/orbsvcs/examples/RtEC/Kokyu/Service.cpp) connects in
following sequence:

1) Events consumers
2) Events suppliers
3) Timeout consumers

and all works fine.

What is different in my scenario:

- I'm using a POA created from CIAO containers'POA
- Event channel, admins and proxies references are passed by method
arguments. I mean:

1) Server Object: contains Event_Channel_var reference and passes it to
Session object:

ACE_NEW (session_i, Session_i(this->event_channel_.in())

2) Session Object: gets the event_channel reference in constructor:

Session_i::Session_i (RtecEventChannelAdmin::EventChannel_ptr ec) :
event_channel_(RtecEventChannelAdmin::EventChannel::_duplicate(ec))

and obtains the consumer_admin and supplier_admin. The admins references
are passed to another object:

ACE_NEW (manager_i, Manager_i(this->consumer_admin_.in(),
this->supplier_admin_.in())

3) Manager Object: gets the admins references and creates the proxies

Manager_i::Manager_i (RtecEventChannelAdmin::ConsumerAdmin_ptr ca,
RtecEventChannelAdmin::SupplierAdmin_ptr sa)

The manager object uses the admins references, creates the proxies and ,
when trying to connect only the supplier, the segmentation fault occurs.

I don't know if all this reference's travel makes something wrong, but
consumers are connected fine.

Any suspicion ?

Thanks,
Sandro

Em Sex, 2005-01-21 ās 17:09, Honorato Saavedra escreveu:
> Hello Sandro:
>
>
> I don't know how you did it, but if I connect a
> consumer before connect any supplier, then I get a
> beauty segmentation fault too. Just check it.
>
>
> Saludos desde Mxico
> Honorato Saavedra H.
>
> --- Sandro Santos Andrade wrote:
>
> > CIAO VERSION: 0.4.3
> > TAO VERSION : 1.4.3
> > ACE VERSION : 5.4.3
> >
> > HOST MACHINE and OPERATING SYSTEM:
> > Linux beethoven 2.6.8-1-386 #1 Thu Nov 25
> > 04:24:08 UTC 2004 i686
> > GNU/Linux
> >
> > COMPILER NAME AND VERSION (AND PATCHLEVEL):
> > gcc version 3.3.5 (Debian 1:3.3.5-5)
> >
> > CONTENTS OF $ACE_ROOT/ace/config.h [if you use a
> > link to a platform-
> > specific file, simply state which one]:
> > #include "ace/config-linux.h"
> >
> > CONTENTS OF
> > $ACE_ROOT/include/makeinclude/platform_macros.GNU
> > (unless
> > this isn't used in this case, e.g., with
> > Microsoft Visual C++):
> > include
> > $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
> >
> > CONTENTS OF
> >
> $ACE_ROOT/bin/MakeProjectCreator/config/default.features
> > (used by MPC when you generate your own
> > makefiles):
> > // $Id$
> > // This is an automatically generated file.
> >
> > ssl=0
> > qos=1
> > cidl=0
> > rwho=0
> > sctp=0
> >
> > AREA/CLASS/EXAMPLE AFFECTED: my application
> >
> > DOES THE PROBLEM AFFECT:
> > COMPILATION? NO
> > LINKING? NO
> > EXECUTION? YES
> >
> > SYNOPSIS:
> > PushSupplier doesn't connect to Real-Time Event
> > Channel.
> >
> > DESCRIPTION:
> > PushSupplier connection generates a segmentation
> > fault in
> > RTEvent_Service in my application. Kokyu RtEC's
> > example works fine, but
> > my code doesn't.
> >
> > Code excerpt:
> >
> > RtecScheduler::handle_t data_supplier_rt_info =
> > this->scheduler_->create
> > ((string(state_.name.in()) +
> > "_data_supplier").c_str()
> > ACE_ENV_ARG_PARAMETER);
> > ACE_TRY_CHECK;
> >
> > this->scheduler_->set (data_supplier_rt_info,
> > RtecScheduler::VERY_HIGH_CRITICALITY, tmp, tmp, tmp,
> > time_val_to_period
> > (tv), RtecScheduler::VERY_LOW_IMPORTANCE, 0, 1,
> > RtecScheduler::OPERATION
> > ACE_ENV_ARG_PARAMETER);
> > ACE_TRY_CHECK;
> >
> > ACE_DEBUG((LM_DEBUG, "rt_info created.\n"));
> >
> > ACE_SupplierQOS_Factory data_supplier_qos;
> > RtecEventComm::EventSourceID supplier_id = 1;
> > data_supplier_qos.insert (supplier_id,
> > this->state_.locale_id,
> > data_supplier_rt_info, 1);
> >
> > ACE_DEBUG((LM_DEBUG, "Supplier QOS created.\n"));
> >
> > RtEC_Data_Supplier_i data_supplier(this->poa_.in());
> > ::DAIS::DataAccess::Group::RtEC_Data_Supplier_var
> > data_supplier_ref =
> > data_supplier._this();
> >
> > // This folowing line generates a segmentation fault
> > in RTEvent_Service
> > this->data_consumer_proxy_->connect_push_supplier
> > (data_supplier_ref.in(),
> > data_supplier_qos.get_SupplierQOS()
> > ACE_ENV_ARG_PARAMETER);
> > ACE_TRY_CHECK;
> >
> > Connecting consumers works perfect, but suppliers
> > connection causes the
> > segmentation fault. Trying to debug, I noticed that
> > the error occurs
> > after the peer_connected() method, but I have no
> > further information.
> >
> > I checked with CORBA::is_nil, all the references
> > (data_supplier_ref,
> > data_consumer_proxy), and all of them are ok.
> >
> > Thanks for any help,
> > Sandro
> >
> >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com
>
   

Copyright © 2006 knowledge-database   -   All rights reserved