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

Fix: PublisherZMQ::flush is called after the publisher has been destructed #426

Merged

Conversation

Tradias
Copy link
Contributor

@Tradias Tradias commented Sep 13, 2022

There are unfortunately no tests for any of the loggers :(. But adding them seemed out-of-scope for this pr.

Test code:

    static constexpr auto XML = R"(
<root>
    <BehaviorTree>
    <SetBlackboard output_key="arg1" value="1" />
    </BehaviorTree>
</root>
)";
    BT::BehaviorTreeFactory factory;
    auto tree = factory.createTreeFromText(XML);
    BT::PublisherZMQ zmq_logger{tree, 1};
    tree.tickRoot();

Output:

Exception thrown at 0x00007FFE533E4FD9 in test-behavior-tree.exe: Microsoft C++ exception: zmq::error_t at memory location 0x0000005A1F7AEB40.
[PublisherZMQ] Publisher quitting.
[PublisherZMQ] just died. Exception Context was terminated
Exception thrown at 0x00007FF659E7124F in test-behavior-tree.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

@facontidavide
Copy link
Collaborator

Hopefully closed by #440

@Tradias
Copy link
Contributor Author

Tradias commented Oct 2, 2022

Looks like #440 was never actually compiled by the CI.

@Tradias
Copy link
Contributor Author

Tradias commented Oct 7, 2022

@facontidavide I made the necessary changes to the pipeline. It now actually runs gtest_logger_zmq test. This pr is therefore ready from my side.

@facontidavide facontidavide merged commit c00546e into BehaviorTree:master Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants