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

When testing a cycle event, calling application_impl::stop_offer_event is invalid. #666 #694

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hjkcst
Copy link

@hjkcst hjkcst commented May 7, 2024

When testing a cycle event, calling application_impl::stop_offer_event is invalid. #666

See bug#666 for details of the issue.

…t is invalid.This change can fix the problem
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this modification is dangerous,

Copy link
Author

Choose a reason for hiding this comment

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

Do you have a better way to solve this problem?

@hjkcst
Copy link
Author

hjkcst commented May 22, 2024

Does anyone know who is required to review and merge code after committing changes? What is the process like?

@007herelsp
Copy link
Contributor

@hjkcst Can you provide the test code

@hjkcst
Copy link
Author

hjkcst commented May 31, 2024

@hjkcst Can you provide the test code
Sorry, the specific code may not be convenient to disclose, you can refer to the test process in this issue, run the stop_offer_event call, you can see the problem.
#666

@007herelsp
Copy link
Contributor

image
void event::update_cbk(boost::system::error_code const &_error) added the is_provided_ detection, which is used to exit the cycle_timer

@hjkcst
Copy link
Author

hjkcst commented Jun 4, 2024

image void event::update_cbk(boost::system::error_code const &_error) added the is_provided_ detection, which is used to exit the cycle_timer

Hello,007herelsp

I think this modification cannot completely delete the reference count of the pointer corresponding to cycle event, which means that cycle event instances still exist. The function of application_impl::stop_offer_event is to unregister the cycle event, that is, to delete it rather than stop it.

thanks,jinkuan

@007herelsp
Copy link
Contributor

007herelsp commented Jun 4, 2024

image

implementation/routing/src/routing_manager_base.cpp
image
implementation/routing/src/event.cpp

There is deletion logic

@hjkcst
Copy link
Author

hjkcst commented Jun 5, 2024

image

implementation/routing/src/routing_manager_base.cpp image implementation/routing/src/event.cpp

There is deletion logic

Hello,007herelsp

I know this is delete logic, I mean not completely delete clean (this has to do with the nature of the smart pointer). Perhaps you can test this by printing the reference count of the cycle event by adding a log at the end of the deletion.
For example, ptr1.use_count ().

thanks,jinkuan

@007herelsp
Copy link
Contributor

007herelsp commented Jun 6, 2024

image
implementation/routing/src/routing_manager_base.cpp

add its_event->set_provided(false);

image

and void event::update_cbk(boost::system::error_code const &error) added the is_provided detection, which is used to exit the cycle_timer

I have tested this code and it can successfully release the event data, but I am not sure if it brings other problems, you can test it

@hjkcst
Copy link
Author

hjkcst commented Jun 12, 2024

I think it needs to be tested by the authorities, so how can the authorities intervene in this modification?

@hjkcst
Copy link
Author

hjkcst commented Jul 23, 2024

halo, administrator of the vsomeip library, pay attention to this issue.

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.

2 participants