Jump to content
OpenSplice DDS Forum
Sign in to follow this  
armando.paz

segmentation fault listener

Recommended Posts

Hi,

 

was testing the last release of community edition (V6.7) against some code that used to work with the previous version (V6.4). When reading data with a Listener the program crashes when receiving data. 

 

Did repeat the test using the example provided in the Opensplice tree:    ../examples/dcps/Listener

The example with the C language worked ok, but both isocpp and isocpp2 crash in a similar fashion as  my application.

 

Any clues ?

Saw inside the code (src/api/dcps/c++/common/code/Entity.cpp) a reference to issue OSPL-8179, that maybe is related to the crash. Below the fragment of file Entity.cpp:

 

------------------------------------------------------------------------

DDS::ReturnCode_t
DDS::OpenSplice::Entity::reset_dataAvailable_status (
) THROW_ORB_EXCEPTIONS
{
    u_result uResult;
 
/* TODO OSPL-8179: This is a bit tricky, the entity may already been deleted and in that case
 * this operation will perform a dirty memory read.
 * It may be better to wipe all pending events belonging to an entity when it is deleted or
 * if that is too intrusive find another way to safely detect/avoid deletion.
 * NOTE: This was copied from SAC.
 */
    uResult = u_observableAction(u_observable(this->uEntity),
                                 Entity_resetDataAvailable,
                                 NULL);
    return this->uResultToReturnCode(uResult);
}
 
 

Share this post


Link to post
Share on other sites

a little update:

 

- was working with a local build of the DDS tree, where I did configure to compile with C++11 support and defined the macro OSPL_USE_CXX11 in file  setup/x86_64.linux-release/config.mak. Compilation went OK, but produced a result reported in previous message.

 

- downloaded the binary of the Community Edition for the OS flavour I am using (Ubuntu 16.1), and after recompiling just the contents of directory custom_lib, to have the things in C++11 and compatible with my code base, the Listener example and my application did work.

 

So there is some issue with my local compilation ... if I have time will check what may be the problem.

 

And a final remark: 

- after transitioning from version 6.4 to 6.7 had to selected the events that where being notified to the Listener by setting the appropriate mask when associating the Listener to the DataReader.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×