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

Rare memory access issue with SensorViewConfigurationRequest in OSMPDummySensor example #113

Open
ReinhardBiegelIntech opened this issue Jul 2, 2024 · 0 comments
Labels
question General questions about the standard, work-flow and code.

Comments

@ReinhardBiegelIntech
Copy link

Describe the problem

It's a bit hard to trigger, but were able to reproduce this with a custom OSMP sensor based on the OSMPDummySensor example:

  1. FMI/OSMP setup including SensorViewConfigurationRequest
  2. FMI variables are read one-by-one by the simulation environment, so GetInteger is called multiple times.
  3. Code here triggers regeneration of SensorViewConfigurationRequest request for each read
  4. Due to the buffer swapping in 3. (via {refresh,set}_fmi_sensor_view_config_request), the values for SensorViewConfigurationRequest FMI variables (hi, lo and size) might be out of sync. We had the situation that the hi part was different for both buffers, leading to an invalid buffer address being communicated over FMI

Ask your question

  1. Is there a restriction on how OSMP FMI variables have to be read (i.e. do the have to be read by a single call to GetInteger or is it ok to read each one individually)?
  2. Should the need_refresh mechanism be restructured?
  3. Is double-buffering even necessary for the SensorViewConfigurationRequest? According to according to OSMP doc communication of this message is restricted to the initialization mode anyway.
@ReinhardBiegelIntech ReinhardBiegelIntech added the question General questions about the standard, work-flow and code. label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General questions about the standard, work-flow and code.
Projects
None yet
Development

No branches or pull requests

1 participant