Skip to content

Conversation

@yann-lty
Copy link
Member

Description

This PR aims to improve attribute value change propagation, introduced with the concept of "onAttributeChanged" callback system on node descriptors.
The goal is to fix data model access issues happening randomly in Meshroom, leading to broken UI components as shown below in the ImageGallery:
imageGallery

Features list

  • Test suites for validating both the current expected behavior and the refactoring.
  • Move attribute value change propagation and callback handling as part of the Node logic.

Implementation remarks

Part of the current implementation lives in the Attribute class, binding the valueChanged signal to a slot directly within the class constructor. This seems to be the root issue that breaks Qt's evaluation system.

This PR move that connection logic to the attributeFactory function, and bind it to a slot defined on the Node class, where all the attribute callback and value change propagation is now dealt with.

Unit tests were added to validate the expected behavior of this system.
And while not being able to write a specific test to validate this PR fixes the main visible problem stated in the description, many manual tests that were failing fast on the current implementation are now working fine.

Introduce test fixture to simplify graph testing in isolation.
Suite of tests to validate the behavior of desc.Node 'on{Attribute}Changed' behavior.
Test value change propagation and callback trigger
for attribute connected to Group and ListAttribues.
Move the attributeChanged callback logic within Node, as this
is a Node level mecanism (callbacks being declared on the node desc).

This commit also moves the attribute valueChanged signal outside of
the Attribute's constructor.
This seems to be the root cause to undesired side-effects breaking Qt's evaluation
system, data model access and consequently Meshroom's UI.
New test suite that focuses on testing the behavior of the attribute
changes callback system when such an attribute is connected to
an upstream dynamic output value.
@yann-lty yann-lty changed the title WIP: Fix attribute value change propagation and callback handling Fix attribute value change propagation and callback handling Oct 28, 2024
With valueChanged signal being connected outside of the
Attribute's constructor, the emitSignals logic is not required to prevent
early valueChanged propagation.
@cbentejac cbentejac self-requested a review October 28, 2024 14:18
@cbentejac cbentejac added this to the Meshroom 2024.1.0 milestone Oct 28, 2024
@cbentejac cbentejac merged commit 35914bd into develop Oct 30, 2024
3 checks passed
@cbentejac cbentejac deleted the fix/attributeValueChanged branch October 30, 2024 16:09
snorkelopstesting1-a11y pushed a commit to snorkel-marlin-repos/alicevision_meshroom_pr_2586_582b3e70-156b-471a-995f-5fc481739303 that referenced this pull request Oct 22, 2025
snorkelopsstgtesting1-spec added a commit to snorkel-marlin-repos/alicevision_meshroom_pr_2586_582b3e70-156b-471a-995f-5fc481739303 that referenced this pull request Oct 22, 2025
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