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

Simple sample crashes #6

Open
Kerstin-Keller opened this issue Mar 15, 2022 · 2 comments
Open

Simple sample crashes #6

Kerstin-Keller opened this issue Mar 15, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Kerstin-Keller
Copy link
Contributor

The following sample currently crashes on Windows in Release configuration

// Copyright (c) Continental. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

#include <iostream>
#include <thread>

#include <tcp_pubsub/executor.h>
#include <tcp_pubsub/publisher.h>
#include <tcp_pubsub/subscriber.h>

int main()
{
    std::shared_ptr<tcp_pubsub::Executor> executor = std::make_shared<tcp_pubsub::Executor>(4);

    int counter = 0;

    tcp_pubsub::Publisher hello_world_publisher(executor, 1588);
    tcp_pubsub::Subscriber hello_world_subscriber(executor);

    std::cout << "Hello tcp_pubsub!" << std::endl;

    return 0;
}

image

In debug, or if one inserts a sleep before the return, it executes fine.

@FlorianReimold FlorianReimold added the bug Something isn't working label Mar 15, 2022
@ZhenshengLee
Copy link

Friendly ping for updates?

@FlorianReimold
Copy link
Member

No updates on this. The bug was not triggered in a real-world scenario, so we directed our effort to different things 😉
Are you using tcp_pubsub in a scenario where this actually matters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants