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

option-value and usage in options-changed notifications #12616

Merged
merged 6 commits into from
Feb 8, 2024

Conversation

maloel
Copy link
Collaborator

@maloel maloel commented Jan 29, 2024

Prequel to DDS-related bulk-query changes:

  • the rs2::options_list object now returns rs2::option_value rather than just the rs2_option
  • rs2::option_value now holds a rs2_option_value const *
  • rs2_option_value is a struct containing a type, id, and union of as_float etc.
  • added rs2_option_type
  • new APIs: rs2_get_option_value, rs2_delete_option_value, rs2_option_type_to_string, rs2_get_option_value_from_list
  • on_options_changed notifications therefore now return the actual values seen so you don't need to query them again...

@maloel maloel requested a review from OhadMeir January 29, 2024 05:59
@Nir-Az
Copy link
Collaborator

Nir-Az commented Jan 29, 2024

While you are working on it, just adding that I see an exception when I stop debugging. (debug configuration)

image

image

src/rs.cpp Show resolved Hide resolved
src/rs.cpp Show resolved Hide resolved
src/rs.cpp Show resolved Hide resolved
src/rs.cpp Show resolved Hide resolved
@maloel
Copy link
Collaborator Author

maloel commented Jan 29, 2024

While you are working on it, just adding that I see an exception when I stop debugging. (debug configuration)

I can take a look, but I don't understand the highlight you have or the meaning... is this in the private branch?

@OhadMeir
Copy link
Contributor

While you are working on it, just adding that I see an exception when I stop debugging. (debug configuration)

I can take a look, but I don't understand the highlight you have or the meaning... is this in the private branch?

It also happened to me on the public branch before I completed my PR, I thought I handled all the cases.
The problem happened when closing the device, the callback iterated over a list that was cleared so the iterator was invalidated.

Nir showed me he had this error, I told him that you have a PR that changes the behavior, so don't know if it is still relevant.

@maloel
Copy link
Collaborator Author

maloel commented Jan 30, 2024

when closing the device, the callback iterated over a list that was cleared

I'll try to reproduce. Technically I don't quite understand how... the device was destroyed while a callback was in progress? The join() wasn't blocking?
Or maybe the sensor was still alive, but its options were deleted?

src/rs.cpp Outdated Show resolved Hide resolved
src/rs.cpp Outdated Show resolved Hide resolved
@maloel maloel merged commit 1acac71 into IntelRealSense:development Feb 8, 2024
17 checks passed
@maloel maloel deleted the option-value branch February 8, 2024 11:45
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.

3 participants