Author Topic: REQUEST: plugin check  (Read 6379 times)

Hollywood_315

  • Guest
REQUEST: plugin check
« on: August 21, 2018, 06:25:25 AM »
Hi guys, hope you are all well.
I have a small favour to ask: much appreciated if you can run a quick test for me.
Could you download this plugin (2.5.4) and put in the Apps subfolder

https://www.vaicompro.com/downloads.html
 
Then import the .vap profile that it generates in its Profiles subfolder after VA restart.
Once this profile is loaded, press keyboard key '1'. All good so far (you'll hear some noise).
Then switch to another profile and back, and press the '1' key again.
Now you'll see an error message in the VA window (and the plugin stops functioning).

Now the jackpot question is what generates this error on switching profile?
Does your debugging tool have anything to say about it?
The profile does not use any variables, only plugin context.
Any guidance welcome, I looked at this from all angles myself already but for the life of me cannot get it sorted.

Many thanks!
« Last Edit: August 21, 2018, 10:11:40 AM by Hollywood_315 »

kourou

  • Jr. Member
  • **
  • Posts: 81
  • Anything that can go wrong will go wrong
    • FANNY (Discord)
Re: REQUEST: plugin check
« Reply #1 on: August 21, 2018, 12:45:21 PM »
Am affraid you need to post the code of your dll  :-X

Hollywood_315

  • Guest
Re: REQUEST: plugin check
« Reply #2 on: August 22, 2018, 01:01:41 AM »
Thanks kourou, happy to help with that just since it's not an open source project we'd then need to see how we could do things securely. I was just thinking that running the plugin in VA's dev environment would show some additional error details that as a plugin dev I just don't get myself. All I get is the generic UNABLE TO INVOKE PLUGIN, PLUGIN NOT VALID FOR THIS VERSION OF VOICEATTACK, wich is not an an awful lot to go on :D. I'm sure I must be missing something here, but since the profile passes no variables it's all pretty puzzling and could sure use some kind of additional clue. Cheers.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: REQUEST: plugin check
« Reply #3 on: August 22, 2018, 08:44:25 AM »
If you get that type of error, that means that the parameters you are using for one of your functions does not match anything that VA is looking for.  VA also doesn't check to see if the plugin functions are a matched set, so if you have functions that are set up for v3 of the plugin interface mixed with v4, there's going to be issues.  That error message is there to warn the *end user* that they're using a plugin that's not compatible under the assumption that the interface is correct.

Also, make sure the version of the .net framework is 4.5.  Not sure if that's a factor here or not.

Hollywood_315

  • Guest
Re: REQUEST: plugin check
« Reply #4 on: August 22, 2018, 11:17:14 AM »
Thanks Gary, appreciate the feedback.
I've been working this on the v4 interface, but I'll be thoroughly checking all functions to make double sure there's no mixmatch. Thanks for the advice on that one.
I'm compiling the plugin against .NET 4.5.2, unless you're telling me otherwise I'll be assuming that's not the issue here.
All the best

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: REQUEST: plugin check
« Reply #5 on: August 22, 2018, 11:31:27 AM »
I'm not at my home machine, so I can't check for sure, but I believe VA is compiled using v4.5 - not sure if that makes a difference or not (I would certainly try just compiling with v4.5 to see if that helps).

Hollywood_315

  • Guest
Re: REQUEST: plugin check
« Reply #6 on: August 23, 2018, 01:56:22 PM »
Ok I tried a build with 4.5 target but no change so we can exclude that I guess. Investigations continue!

Hollywood_315

  • Guest
Re: REQUEST: plugin check
« Reply #7 on: February 01, 2019, 04:53:04 AM »
Hi all

Sorry to come back to this but need some help. I compile below code against any CPU for .NET 4.5.
It is recognized as plugin by VA but as you can see it is completely void in function.
I have two profiles, A with a single command which invokes this plugin with context ('test') and profile B (empty).

I load A and all is well with the world. I invoke the command and VA is happy. Next I switch to B and then back to A again. Now here for the fun part. How can it be that I now get this: 'UNABLE TO INVOKE PLUGIN, PLUGIN NOT VALID FOR THIS VERSION OF VOICEATTACK'.

Is there something missing in below code? Zero variables are involved here and I have laterally tried everything to get rid of this same bug for VAICOM PRO (which is needless to say slightly more complex than below lol).
Many thanks!

---

using System;

namespace Testplugin
{
    public class Plugin
    {
        public static string VA_DisplayName()
        {
            return "TEST PLUGIN 1.0";
        }
        public static string VA_DisplayInfo()
        {
            return "TEST PLUGIN 1.0";
        }
        public static Guid VA_Id()
        {
            return new Guid("{2B62CBBE-2713-4E19-A8D3-4D74583AB2D9}");
        }
        public static void VA_StopCommand(dynamic vaProxy)
        {
        }
        public static void VA_Init1(dynamic vaProxy)
        {       
        }
        public static void VA_Invoke1(dynamic vaProxy)
        {       
        }
        public static void VA_Exit1(dynamic vaProxy)
        {
        }
    }
}

 



Hollywood_315

  • Guest
Re: REQUEST: plugin check
« Reply #8 on: February 01, 2019, 05:05:53 AM »
Ah, "almost" everything,.. I just tried setting the StopCommand() method without vaProxy.
I knew it had to be something stupid on my part.. :o
Case Closed! Cheers guys
« Last Edit: February 05, 2019, 07:02:01 AM by Hollywood_315 »