knowledge-database (beta)

Current group: comp.soft-sys.ace

[tao-users] PushSupplier not connecting ...

[tao-users] PushSupplier not connecting ...  
Sandro Santos Andrade
From:Sandro Santos Andrade
Subject:[tao-users] PushSupplier not connecting ...
Date:20 Jan 2005 23:56:37 -0600
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
   

Copyright © 2006 knowledge-database   -   All rights reserved