Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Possible error in WAttribute::rollback() #541

Closed
udyni opened this issue Mar 15, 2019 · 5 comments
Closed

Possible error in WAttribute::rollback() #541

udyni opened this issue Mar 15, 2019 · 5 comments

Comments

@udyni
Copy link

udyni commented Mar 15, 2019

As I was trying to understand how to recover the memorized value of an attribute, I noticed that in WAttribute::rollback() at line 2647 of w_attribute.cpp the rollback of type UShort is instead rolling back the value for data type Double.

Best regards
Michele

@bourtemb
Copy link
Member

Well spotted, @udyni
Thank you very much for the bug report!

@bourtemb
Copy link
Member

@udyni , did you get annoyed by this bug somehow or did you simply see this bug by reading the code?
In the first case, can you describe your use case and also the behaviour you were observing when the bug occurred?

@udyni
Copy link
Author

udyni commented Mar 15, 2019 via email

@bourtemb
Copy link
Member

After analyzing the source code and doing some simple tests, it looks like this bug can affect the users using WRITE DevUShort attributes (No impact on READ and READ_WRITE attributes it seems).
When an exception is thrown when trying to write the WRITE attribute, the set value is not rolled back correctly in some specific cases (exception in device server write method associated to this attribute, exception thrown because it is not allowed to write this attribute in the current state, exception in read_attr_hardware()).

bourtemb added a commit that referenced this issue Mar 18, 2019
The DevUShort WRITE only attribute value was not rolled back correctly to the previous valid value in 
some specific cases (exception thrown in the device server write method associated to this attribute, 
exception thrown by read_attr_hardware() method or exception thrown because it is not allowed to read 
this attribute in the current state).
Now it is!
Ingvord pushed a commit that referenced this issue Mar 29, 2019
* Added CHANGELOG.md
This file is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
List changes since cppTango 9.2.5.
Changes with potential compatibility issues are documented as suggested in #509 and are in bold.

* Add links to issues and PRs in CHANGELOG.md

* Update CHANGELOG.md
with references to #508,#516,#518,#520,#521,#522,#523,#529,#531,#533,#537

* Update CHANGELOG.md with #517

* Update CHANGELOG.md. Add link for issue 395

* Moved 2 items from Fixed to Changed section
Added a warning about the event subscription change sleep reduction

* First version of the release notes for cppTango 9.3.3
Rename RELEASE_NOTES in RELEASE_NOTES.md.
The previous RELEASE_NOTES content has been moved to CHANGELOG.md file.

* Added reference to cppTango#539
Preparation for cppTango 9.3.3 release

* Update CHANGELOG and RELEASE_NOTES with #541 and #542

* Reword one item in CHANGELOG.md and RELEASE_NOTES.md

* Update CHANGELOG.md with #544, #546 and #549

* Add reference to #532
Add 9.3.3 release date

* Add 9.3.3 release date
@bourtemb
Copy link
Member

Thanks again for the bug report @udyni
This issue should be fixed in #542

@bourtemb bourtemb added this to Done in Tango 9 Long Term Support via automation Mar 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Development

No branches or pull requests

2 participants