-
Notifications
You must be signed in to change notification settings - Fork 34
Possible error in WAttribute::rollback() #541
Comments
Well spotted, @udyni |
@udyni , did you get annoyed by this bug somehow or did you simply see this bug by reading the code? |
I was studying the code to understand where the memorized attributes were
read from the database and set in the attribute write value and just
noticed the error in the code.
…On Fri, Mar 15, 2019, 19:13 Reynald Bourtembourg ***@***.***> wrote:
@udyni <https://github.com/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?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#541 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkpezgTNBWwQRl7hgGCngKRBKRmczODOks5vW-K2gaJpZM4b2CH_>
.
|
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). |
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!
* 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
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
The text was updated successfully, but these errors were encountered: