This one is a head scratcher. I do not think it is related to Mk2, or the firmware.
This is what normally happens on boot:
- All the stored parameters are sent to their controls.
- The controls, on change, call their respective functions.
imagine we have a fader control, using the following function
function myFaderWasMoved(vo, v)
local typeV = type(v)
local valueToPrint = (typeV == 'table') and typeV or tostring(v)
print('LOG FUNCTION CALL [ myFaderWasMoved ]( '..valueToPrint..' )')
end
I set up a similar functionality log for each function called by a control. My template is quite short on controls, but almost 6k lines of code. This is the expected print
04:07:37.816 lua: LOG FUNCTION CALL [ myFaderWasMoved ]( 0.0 )
but some times, I get this
04:07:37.820 lua: LOG FUNCTION CALL [ myFa{"version":1,"presets":[{"slot":0,"bankNumber":0,"name":"KDS","projectId":"qzNMc7wxk2p1kVHHRY9t"},{"slot":1,"bankNumber":0,"name":"EMPTY","projectId":"pthdMCbauOIvie2M3cPf"},{"slot":2,"bankNumber":0,"name":"EMPTY","projectId":"pthdMCbauOIvie2M3cPf"},{"slot":3,"bankNumber":0,"name":"EMPTY","projectId":"pthdMCbauOIvie2M3cPf"},{"slot":4,"bankNumber":0,"name":"EMPTY","projectId":"pthdMCbauOIvie2M3cPf"},{"slot":5,"bankNumber":0,"name":"EMPTY","projectId":"pthdMCbauOIvie2M3cPf"},{"slot":6,"bankNumber":0,"name":derWasMoved ]( 0.0 )
And yes, I did set up my E1 with the first page of presets with one called “EMPTY”, except one called “KDS”.
Why was the json information of the first row of presets shown?
Now, this script is quite large (6k lines), and at some point it was using .5Mb of ram, I was afraid that there was some pointers wrongly returning stuff from other registry, but it seems that it is randomly when it happens. Any ideas?