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

Stability enhancemets #7272

Merged
merged 4 commits into from
Sep 13, 2020
Merged

Stability enhancemets #7272

merged 4 commits into from
Sep 13, 2020

Conversation

ev-mp
Copy link
Collaborator

@ev-mp ev-mp commented Sep 7, 2020

No description provided.

ev-mp and others added 3 commits September 7, 2020 21:03
Change-Id: I5314aee307905ea5801e8b9bed92880739ef8953
Refactoring of error-polling mechanism to stop after device disconnect

Change-Id: I0082a9277d05c4c607bf92d527d397328e688f58

Add AO deactivation in dtor for error polling

Change-Id: Ie18308ff4536fd40cac8a61d07b7b21c81522723
Change-Id: I476befc583db749f6bbeff9dbaef553bb1c19de3
@ev-mp ev-mp marked this pull request as ready for review September 13, 2020 06:03
common/output-model.cpp Outdated Show resolved Hide resolved
polling_errors_disable(polling_error_handler* handler)
: _polling_error_handler(handler), _value(1)
polling_errors_disable(std::unique_ptr<polling_error_handler>& handler)
: _polling_error_handler(std::move(handler)), _value(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure I like this: why not make it a shared_ptr<> instead, then we don't run into a situation where the value is now null but there really still is a handler?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The fix addresses only the issue of the polling handler in 'orphan' mode after device is (forcibly) disconnected.
In that case the device is indeed is 0xdeadbeef but the handler remained active and could fail on dereferencing invalid pointer.
With this design the handler will remain intact, and after device disconnects it will stop the active object in dtor.
So the polling events will be handled properly during the period between device disconnect and the dtor call

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I also recognize more things to improve in the design of active objects lifetime control but this will require a separate session

{
return _locked_transfer->send_receive({ details.sendCommandData.begin(),details.sendCommandData.end()});
}
else
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can remove the else clause and keep all the other code unindented

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Change-Id: I89c93e79430a2bda0aa9ad8c5d73811ff9dcfa8e
@ev-mp ev-mp merged commit abb5b43 into IntelRealSense:development Sep 13, 2020
ev-mp added a commit to ev-mp/librealsense that referenced this pull request Sep 14, 2020
…llow up on PR IntelRealSense#7272

(cherry picked from commit 78ee0f0)

# Conflicts:
#	src/hdr-config.cpp
ev-mp added a commit to ev-mp/librealsense that referenced this pull request Sep 14, 2020
@ev-mp ev-mp deleted the stab branch September 29, 2020 13:28
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