I can consistently cause GigPerformer to Freeze when I do this:
Create a Rack with 2 Scriptlets. “Scriptlet1” and “Scriptlet2”
In scriptlet1 put this code:
var HardwareSetup("Hardware Setup") : parameter "A","B","C","D" = "A"
// Called when a parameter value has changed
On ParameterValueChanged matching HardwareSetup
End
Put the following code in Scriptlet2. var HardwareSetup("Hardware Setup") : parameter "A","B","C","D" = "A"
Now on a Panel add two knobs.
Map Knob1 to The Scriptlet1 Parameter “HardwareSetup”
Map Knob2 to The Scriptlet2 Parameter “HardwareSetup”
Set the “Widget Link” to “A” for both controls.
Save
Once you are in normal mode, if you rotate the Knobs, gig performer freezes.
Same problem occurs if I use a number range (ex 1…4) instead of string values.
I’ve put a print command in the “ParemeterValueChanged” and the event does stop firing as well (ot at least stops printing).
Any suggestions on how to respond to a Parameter Change on a scriptlet while using linked widgets would be appreciated.
I loaded your gig and set the Widget Link Property of both widget to “A”
Then I moved the widgets, not issue at all.
I used the most recent version 4.8.2
Deskew, downloaded 4.8.2. Still happens.
Windows 11 v23H2, build 22631.3296
11th Gen Intel(R) Core™ i7-11800H @ 2.30GHz 2.30 GHz
32 Gig Ram
Will try on a backup machine when I have a moment.
My assumption is the following. Each time you move knob1 to update Scriptlet1 parameter, you continuously send values (not only discrete string values) to Scriptlet 1 (which in turn end its parameter value back to knob1) and to knob2 as they are synced. The process is then the same for knob2. All these communication are asynchronous which can be subject to race conditions. e.g. knob2 is continuously update bu knob1 and also continuously updated but Scriptlet2 parameter feedback and as values are not perfectly synced it will cause some loops.
Is there a way for you to merge Scriptlet1 and Scriptlet2 and to keep one single parameter (as these parameters are supposed to be synced) ?
Hi David,
Thanks. If you look in my sample there is no code in the event and I am not intentionally creating a loop back update. Note also that it appears this only happens in the Windows version and not the Mac version based on some of the other attempts to recreate noted above.
On your suggestion on merging the scripts. Unfortunately, no, in the real world the scripts serve different functions on different widgets. I might have 3-4 for that I am trying to keep in sync using the Link feature.
To go further, you the OnParameter event doesn’t have to be against the linked or bound parameter.
var HardwareSetup("Hardware Setup") : parameter 1..4 = 1
var HardwareSetup2("Hardware Setup2") : parameter 1..4 = 1
// Called when a parameter value has changed
On ParameterValueChanged matching HardwareSetup2
End
this will fail as well even through it is HardwareSetup (not hardwareSetup2) that is changing.
Correct - they’re parameters and changing one widget causes the scriptlet parameter to change, which is calling the widget back (which is then triggering the other widget due to the link) which then changes its parameter which then calls it back and the loop goes on.
I have to look at this more closely - I don’t understand (yet) why this is only happening on Windows.