Skip to content

yarp::os::Subscriber segfault when using callback #13

@randaz81

Description

@randaz81

The following code leads to a segfault (the first time data are received)

m_dataReader->new DataReaderClass;
m_dataReader->useCallback();
m_dataReader->topic("/ros_topic");

while the following is ok:

m_dataReader->new DataReaderClass;
m_dataReader->topic("/ros_topic");
m_dataReader->useCallback();

Being DataReaderClass defined as:

class DataReaderClass: public yarp::os::Subscriber<ros_msg_type>

The issue could be related to the fact that topic() automatically creates a connection? (The connection is typically created later when using a standard buffered port with callback, instead).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions