Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TAO::TAO_CO_THRU_POA_STRATEGY bit missing from CosEventChannelAdmin::EventChannel->for_suppliers(), causing it to throw CORBA system exception #2091

Closed
alexchandel opened this issue Jul 30, 2023 · 3 comments

Comments

@alexchandel
Copy link

Version

ACE: 7.0.11, TAO: 3.0.11 (and others)

Host machine and operating system

Occurs on all attempted builds (Windows and macOS).

Compiler name and version (including patch level)

Apple clang version 14.0.3 (clang-1403.0.22.14.1) and VS 2022

The $ACE_ROOT/ace/config.h file

ace/config-windows.h or ace/config-macosx-mojave.h

The $ACE_ROOT/include/makeinclude/platform_macros.GNU file

None. (Using CMake build)

Contents of $ACE_ROOT/bin/MakeProjectCreator/config/default.features

None.

AREA/CLASS/EXAMPLE AFFECTED:

CosEventChannelAdmin::EventChannel and possibly other generated client code.

The problem effects:

Runtime.

Synopsis

Invoking ->for_suppliers() on a CosEventChannelAdmin::EventChannel results in an internal system exception.

Description

When using ACE+TAO built with CMake, invoking ->for_suppliers() on a CosEventChannelAdmin::EventChannel results in an internal system exception. This is because the TAO::TAO_CO_THRU_POA_STRATEGY bit is not passed to the TAO::Invocation_Adapter constructor within the source implementation of that function (CosEventChannelAdminC.cpp).

  TAO::Invocation_Adapter _invocation_call (
      this,
      _the_tao_operation_signature,
      1,
      "for_suppliers",
      13,
      TAO::TAO_CO_NONE,
      TAO::TAO_TWOWAY_INVOCATION
      ,
      TAO::TAO_SYNCHRONOUS_INVOCATION,
      false
    );

However, when built with the "full source distribution" with build files already present, the Invocation_Adapter is constructed with the TAO::TAO_CO_THRU_POA_STRATEGY bit, as follows:

  TAO::Invocation_Adapter _invocation_call (
      this,
      _the_tao_operation_signature,
      1,
      "for_suppliers",
      13,
      TAO::TAO_CO_NONE | TAO::TAO_CO_THRU_POA_STRATEGY,
      TAO::TAO_TWOWAY_INVOCATION
      ,
      TAO::TAO_SYNCHRONOUS_INVOCATION,
      false
    );

What causes this bit to be missing?

@alexchandel
Copy link
Author

Some investigation finds " | TAO::TAO_CO_THRU_POA_STRATEGY" is emitted in be_visitor_operation_ami_cs::visit_operation and be_visitor_operation::gen_stub_operation_body, when be_global->gen_thru_poa_collocation() is set.

This defaults to true, but can also be set true and false by the strings -Gp and -Sp in char **av.

@alexchandel
Copy link
Author

It appears the problem was this line (now this line), taken from OpenDDS/cmake/tao_idl_sources.cmake. Disabling default behavior without a flag is quite confusing.

@jwillemsen
Copy link
Member

OpenDDS only uses a subset of TAO, so they disabled some features. Looks you found the flags that control this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants