Issues in exported AAX plugins: drawing panels and buttons, sliding a panel
-
@Dan-Korneff I don't, but I can try putting something together if necessary.
I am hoping that @Christoph-Hart may have an idea of where the problem may lie based on the description and symptoms of the problem. Chris, please let me know if you need me to put together a HISE snippet. While demo'ing the buttons is straightforward, the sliding panel and MIDI player progress bar will be a lot more complex for me to decouple from the project into a simple demo snippet.
It is important to note that my entire interface is vectorized (with the exception of the artwork) and uses either imported vectors or LAF drawings.
- The elements that are not showing are buttons that have multiple states (normal, hover, pressed). It is only once they are hovered over that they appear.
- The panel that doesn't show up uses a timer to slide out.
- The MIDI "play indicator" that is not updating uses a panel with a timer.
-
Hmm, debugging AAX is the worst - I can't attach a debugger and the toolchain gets massively more complicated so your best chances is trying to figure out what the reason is from the outside.
I can see three different reasons for why this would happen so as first thing I'd suggest trying to nail this down:
- HISE regression
- Other AAX SDK
- Your plugin code
If it's a HISE regression, then I would recommend the binary search way of finding the culprit: start out with a commit 5 months in the past, if it still happens, try 2.5 months, if it then doesn't happen, try 3.75 months etc.
If it's the AAX SDK then you need to contact those guys (but that's the least likely option)
If it's your plugin code, then you can fix it yourself :)
All I can say from the information is that the repaint() call will not cause the UI to actually repaint (or something is preventing the UI timers to run), so it has to wait until the mouse hover flags the component as dirty to do another repaint. The first thing you can try is to do something like this:
const var repaintTest = Engine.createTimerObject(); repaintTest.setTimerCallback(function() { Console.print("REPAINT ALL"); for(c in Content.getAllComponents(".*") s.sendRepaintMessage(); this.stopTimer(); }); repaintTest.startTimer(5000);
Then load up the plugin and make sure that you open the plugin within 5 seconds (if it takes longer, then adjust the time), but don't hover over anything and check if it shows up those elements after the specified time.
While demo'ing the buttons is straightforward, the sliding panel and MIDI player progress bar will be a lot more complex for me to decouple from the project into a simple demo snippet.
If the timer is causing the issue you should be able to isolate this pretty easily: Just make a project with a simple panel that draws a counter in its paint callback and increase that in the panels timer callback. The UI timers are being suspended if no interface is open (HISE is counting the amount of created plugin editors and stops the UI timers when it's zero). If that is somehow failing on AAX then it might be possible that these timers never run.
-
@Christoph-Hart Thanks very much! This is very helpful. I'll be debugging as you suggest and will report back my findings asap.
-
@Christoph-Hart I ran the initial test with repaint. After 5 sec, the elements on the interface showed up. The sliding panel (that uses a timer) still doesn't come up.
I've discovered several more issues related to the "onNoteOn" callback.
-
I have "note indicators", small circles that light up when notes on the keyboard are played. They are not showing, and the "incoming note#" display on the top is also not showing any notes played.
-
"Learn MIDI note" is not working either. The way it works normally is that you enable the learn button next to a note, and when a key is pressed, it gets assigned to that instrument.
So, this seems pretty severe. I will now try different HISE commits to try to narrow it down.
-
-
@Christoph-Hart I am unsure if I am properly moving back in the commits.
In the Sourcetree, when I right-click on a commit I want to move back to, which option do I select?I was using "Reset current branch to this commit." It places the "HEAD" label on that commit. It looks right, but I am unsure if it is.
-
@gorangrooves Use the commandline
git checkout #commithash
-
@d-healey Thanks, but I'd rather not. I want to stick with the Sourcetree GUI. I find it to be easier, but I need to ensure I am doing it correctly.
-
@gorangrooves if you're referring to GithubDesktop, then a right click on any commit, create new branch from this commit (or something similar) is what you want, and just give it a name.
Delete that branch when not needed anymore -
@ustk Thanks. The software I am using is Sourcetree, which is the same as what Christoph uses. There are several options. While I understand the overall concept and what I am trying to do, I am not sure if I am doing it right.
-
@Christoph-Hart I confirmed that "Reset current branch to this commit" is the correct way.
Here is how my travel through time went for the last few hours. I am using VS2022.
-
I first tried compiling AAX using the 2.6.1 SDK going back several months, and only the latest commits would compile the plugin.
-
I swapped the AAX for the earlier 2.4.1 version. When I wasn't able to compile plugins with it either, I just tried to compile HISE.
-
I went as far back as Oct 2022 and tried dozens of times to compile HISE, moving up a month or a couple of weeks. Up until August 2023, it is impossible to compile HISE as it is getting a lot of errors and warnings.
So, the earliest I can compile is August 10, 2023. I compiled the AAX with that version, and the issue I reported still exists. This is using the old AAX SDK.
So, since I am unable to compile anything earlier than this date, this approach is a dead end.
Next step: create a simple project with just one issue, like do something on NoteOn?
-
-
@gorangrooves have you resaved the projucer file before compiling after jumping around in the git history? This will solve most compile errors (there are a few intermediate states which don‘t compile but most commits should work.
-
@Christoph-Hart I did. I would close Projucer, open updated Projucer project and clean build in VS before compiling.
-
@gorangrooves Something might be messing up in your local repo, you should definitely be able to build HISE all the way back to the first commit, except for those occasional commits that no-one can compile.
-
@d-healey I'll try again. I'll delete everything locally and start fresh.
-
@d-healey @Christoph-Hart I deleted the local HISE repository and started fresh. I was able to compile HISE from Jan 5th, 2023 and AAX.
My plugin displayed the GUI properly, but panel sliding (timer) and onNoteOn are not working. That leads me to believe that there are several issues introduced at different HISE development stages. I will continue to hunt down and document exactly what happened and when and will report here.
-
@Christoph-Hart I remembered I still had a backup of my old plugin version where those problematic features were working. I compiled it with the newest HISE and latest AAX SDK, and all those functions worked. The panel slides out, on NoteOn works. Whatever I had then working, it works now.
So, the problem lies somewhere in my project, but only for exported AAX.
Where do I go from here?
-
@gorangrooves said in Issues in exported AAX plugins: drawing panels and buttons, sliding a panel:
Where do I go from here?
Did you use git to keep track of changes in your project?
-
Yes, git would be super nice for this. If you haven't used git yet, it's time to do so, then commit your earlier version and then overwrite it with your current project it will show you all changes.
-
@Christoph-Hart I've been meaning to do the Git, but am not familiar enough with it and am pressed for the time.
I've restructured the project significantly, so I am not sure Git would be of much help other than telling me that everything is different now I used to have all sections of the project on the onInit. Now, they are split into files integrated with include.
I guess this will be a trial-and-error process. If I can at least get to the bits of code that are misbehaving, you could provide the clues as to why. The maddening thing is that it all works in HISE, compiled app, and VST, so there is no indication of anything being wrong.
-
@gorangrooves said in Issues in exported AAX plugins: drawing panels and buttons, sliding a panel:
Now, they are split into files integrated with include.
That will help. Comment out all of the includes. Then re-add them one by one until the problem happens.