Weird Issue / Bug - Knob Position not restoring graphically in big projects



  • Hi guys,

    I've been trying to solve this issue for weeks now and have exhausted just about every test I can think of. Any help would be greatly appreciated!

    I'm working on a huge plugin with hundreds of knobs saved in each preset (probably more than 400). There are always knobs at the end of the value tree which won't update their graphical positions either on a preset change or when changed from any other function in the project. However, the actual backend values of the knobs and labels are updating properly, so the knob callbacks are still being executed and the presets are being restored correctly. It's purely a graphical thing, but it gets worse as I add more knobs to my plugin. The more knobs I add, the more knobs break at the end of the chain in this way. It almost seems like there's an internal limit on the number of knobs that can be restored graphically.

    I should note, this only happens in the exported version of the plugin, and it happens for all of my test users too in all versions. At this point, I’ve removed everything and slowly added things back in to try to narrow the issue, and it’s nothing in particular. It seems like it has nothing to do with my code, or the knob callbacks, or the structure. The order of the knobs also doesn't matter because it's always the knobs at the very end of the tree that are affected. There’s just a point at which the last set of knobs will stop restoring their position if I have too many. I’ve even added print statements to the JUCE cpp to make sure all the knobs are getting the right values in the exported plugin, and they always do.

    I can't for the life of me figure out what could be causing this. From all the tests, it really just seems there's a limit to the number of knobs the plugin can restore graphically.

    The example below shows me tweaking the knobs and restoring the same preset. You’ll notice the value labels change back to the correct values, but the knob positions won’t update. Sonically, everything is restored properly.

    Knob Position Update Bug.gif



  • The knobs are sliders and the labels are Labels, right? Does it change anything if you change the order so that the sliders come before the labels?



  • The sliders are currently before the labels. Also, the labels aren't saved in preset, just the sliders which update the labels on their control callbacks.



  • @Christoph-Hart Any more ideas for things to try or what could be causing this? Just trying to work this out before I send out to more testers.



  • You could hide a few sliders and check if the remaining ones are repainted correctly. I'm not aware of any hard limit when it comes to UI elements, and especially Sliders are default JUCE components so their repaint routine is not interfering with the scripting thread.



  • Unfortunately, this did not fix it either. I have a massive number of objects stored in Globals in HISEScript, would that have an affect on anything?



  • I should also mention that it only breaks the knobs which are set to save in preset, so it seems to be related to that functionality. When I turn that off, the knob position will restore properly when set from another function. However, these are knobs that need to be saved in the preset.

    Even a linked slider fails to move the original slider position but is clearly updating the value. See below:

    ezgif-3-52319e3772c8.gif



  • Ah that's interesting, so if you disable saveInPreset for the slider in your screencast, it updates the position correctly? Does it say anything about a script timeout error in the console?

    At this point it might be the best way to just send me the project so I can debug it. It's the same that is also causing the crash in logic, right?



  • Ah that's interesting, so if you disable saveInPreset for the slider in your screencast, it updates the position correctly? Does it say anything about a script timeout error in the console?

    Yes, if I disable saveInPreset for that slider above and then reexport the plugin, it will update the position correctly. I often do get a lot of Execution timed-out errors within HISE but I haven't seen any like that in the debug console of the exported plugin.

    At this point it might be the best way to just send me the project so I can debug it. It's the same that is also causing the crash in logic, right?

    That would be very much appreciated! Yes, it's the same project with the Logic crash. I'll send you a private message with the deets.


Log in to reply
 

18
Online

884
Users

3.2k
Topics

26.8k
Posts