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

[Core / Service]: Fixed crash that occured when communicating with eCAL 5.12 services #1579

Merged
merged 1 commit into from
May 3, 2024

Conversation

FlorianReimold
Copy link
Member

Description

The crash occured when a v0 client connected to a service server.

Related issues

…AL 5.12 services

The crash occured when a v0 client connected to a service server.
@FlorianReimold FlorianReimold added the cherry-pick-to-support/v5.13 Cherry pick these changes to support/v5.13 label May 2, 2024
Copy link
Contributor

@KerstinKeller KerstinKeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand why start() already calls user defined callbacks, and how that solves the problem. Is start() called by the user themselves? Maybe a flow diagram would help me understand. otherwise looks good 👍

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -1605,6 +1605,151 @@ TEST(ecal_service, Callback_SerializedServiceCallbacks) // NOLINT
}
#endif

#if 1
// Call different eCAL Service API functions from within the callbacks
TEST(ecal_service, Callback_ApiCallsFromCallbacks)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: all parameters should be named in a function [readability-named-parameter]

Suggested change
TEST(ecal_service, Callback_ApiCallsFromCallbacks)
TEST(ecal_service /*unused*/, Callback_ApiCallsFromCallbacks /*unused*/)

@FlorianReimold
Copy link
Member Author

ServerSessionV0::Start() is called by the factory create. As the buggy v0 protocol completely lacks any connection establishment, it immediately assumes that it is connected and therefore calls the EventCallback with a connected event. Before, it did that in the same thread. Now it does that in the io_context thread.

v1 never had that issue, as the EventCallback is called after the connection has been established. Thus, the event callback has always been called from the io_context thread.

@FlorianReimold FlorianReimold merged commit a65a831 into master May 3, 2024
15 of 17 checks passed
FlorianReimold added a commit that referenced this pull request May 3, 2024
…AL 5.12 services (#1579)

The crash occured when a v0 client connected to a service server.
FlorianReimold added a commit that referenced this pull request May 3, 2024
…AL 5.12 services (#1579)

The crash occured when a v0 client connected to a service server.
@KerstinKeller KerstinKeller deleted the hotfix/service_crash branch October 2, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-to-support/v5.13 Cherry pick these changes to support/v5.13
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants