Skip to content

[SofaPyhon3/Plugin] Fix regression introduced in PR #243#276

Merged
damienmarchal merged 1 commit intosofa-framework:masterfrom
CRIStAL-PADR:pr-fix-regression-introduced-in-pr243
Jun 22, 2022
Merged

[SofaPyhon3/Plugin] Fix regression introduced in PR #243#276
damienmarchal merged 1 commit intosofa-framework:masterfrom
CRIStAL-PADR:pr-fix-regression-introduced-in-pr243

Conversation

@damienmarchal
Copy link
Contributor

@damienmarchal damienmarchal commented Jun 21, 2022

To fix memory error in PR #243 there is the need to get the latest data by calling getValue().
The way it was done in the 243 PR is wrong because it is using a begin/end edit pairs which trigger the DDG's followers (and not only precessors) which in return notify that the data is not eddited anymoer (while it was not editted at all). The consequence was that every call on read access on the python side eg: print(myobject.position.value)
was triggering the data change mecanisme to the position's follower.

To fix memory error in PR sofa-framework#243

There is the need to get the latest data by calling getValue().

The way it was done in the PR is wrong because it is using a begin/end edit pairs
which trigger the DDG's follower to notify the data is dirty (while it is not).

The consequence was that every call on read access eg:
print(myobjec.position.value)
was triggering the data change mecanisme
@damienmarchal damienmarchal added this to the v22.06 milestone Jun 21, 2022
@damienmarchal damienmarchal changed the title [SofaPyhon3/Plugin] Fix regression introduced in PR #4243 [SofaPyhon3/Plugin] Fix regression introduced in PR #243 Jun 21, 2022
@damienmarchal damienmarchal merged commit 9be1217 into sofa-framework:master Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants