CascadesCarnivoreProject / Carnassial

Carnassial: Simplifying Remote Camera Data
Other
3 stars 0 forks source link

data: Editor programatic update interlocks are incomplete #135

Closed twest820 closed 7 years ago

twest820 commented 8 years ago

Data binding remains enabled for most updates to control objects, resulting in silent enumerator invalidation. Current develop bits have some troubles with this. Issues aren't known with feature/data bits though Saul has a patch which provokes a stack overflow.

Review for risk and completion of the interlock code is needed.

saulgreenberg commented 8 years ago

To illustrate, the problem can be provoked by the following loop (i.e. the patch provoking the stack overflow mentioned above), where any change in control will result in the silent enumerator evaluation. For example, inserting the following in Generate (in EditorControls) before the real foreach will result in an infinite loop as the enumerator is reset to the first item (i.e., the File type) immediately after the control value is set, and the loop will immediately restart.

foreach (ControlRow control in templateTable) { Debug.Print (control.Type); control.DefaultValue = "Foo"; Debug.Print ("This will never be printed "); }

twest820 commented 7 years ago

Looks OK on code review after recent revisions.