Skip to content

Stability enhancemets - #7272

Merged
ev-mp merged 4 commits into
realsenseai:developmentfrom
ev-mp:stab
Sep 13, 2020
Merged

Stability enhancemets#7272
ev-mp merged 4 commits into
realsenseai:developmentfrom
ev-mp:stab

Conversation

@ev-mp

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

Copy link
Copy Markdown
Contributor

No description provided.

Evgeni Raikhel 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
Comment thread common/output-model.cpp Outdated
Comment thread src/l500/l500-device.cpp
Comment thread src/option.h
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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

Comment thread src/hw-monitor.cpp Outdated
{
return _locked_transfer->send_receive({ details.sendCommandData.begin(),details.sendCommandData.end()});
}
else

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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 realsenseai:development Sep 13, 2020
ev-mp pushed a commit to ev-mp/librealsense that referenced this pull request Sep 14, 2020
…llow up on PR realsenseai#7272

(cherry picked from commit 78ee0f0)

# Conflicts:
#	src/hdr-config.cpp
ev-mp pushed 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