Pluginval: Test 1 failed

Hello, I use a database connection in plugin, the SQL query does not always have to be made. If I have an SQL query in my plugin and it is not made, is the whole code including the SQL query run through in Pluginval? To limit the SQL query I have stored the values ​​I get from the database in another file.

Pluginval will just be executing the plugin as if it’s in a host DAW. If the plugin doesn’t execute that method then Pluginval won’t be looking up all the methods available and calling them (how would it know what parameters to pass?).

Off topic comment about this code: is there a good reason it returns an int with “magic numbers”? It would be much more readable if you used an enum class for the return type (you could even static_cast to an int if you really needed an int somewhere).

The return values are used to check if the result is a valid serialkey.

I have a website, there is possible to create a serial key. The database checks if the serial key is created.

Are threads the solution for this problem? how does this works?

This function checks if the serialkey from the file and from the database are the same. So this function should run once in the programm

Sure, but if you used a enum class:

enum class KeyQueryResult {

then your SQLSerialQuery would instead return a KeyQueryResult:

KeyQueryResult SQLSerialQuery(std::string serialNumber)
  // query code
  // ...
  // key was activated
    return KeyQueryResult::keyActivated;
  // ...
  // key not found
    return KeyQueryResult::keyNotFound;
  // etc. etc.

then instead of checking against magic numbers that you have to go looking some place else to understand what they actually mean, you can do stuff like:

    if(returnValueSQLSerialQuery == KeyQueryResult::keyActivated) {
        // show that key is activated
    else if(returnValueSQLSerialQuery == KeyQueryResult::keyNotFound) {
        // show that key not found
    // etc. etc.

or better would be to switch on returnValueSQLSerialQuery then the compiler will warn you if you didn’t take care of all the options in KeyQueryResult.

This is way more readable and maintainable, plus the compiler is going to help you not make mistakes/omissions.

Anyway, slightly off topic for what is your real problem.

Have you tried running PluginVal in the debugger? This should give better idea as to why the test is failing. You need to set the “run in process” (or however it’s called) option though for this to work properly.

1 Like

I’m a bit confused as to what the problem is here?
What test is failing and why?

Thank you, I have used the enum. :slight_smile:
I have only the .exe file. I seached a little bit, but i doesn´t found the document/file (.sln). I found the pluginval-develop file. There is no build file.

I used the option “validate in process”
This is the output from the console:

pluginval v0.2.7 - JUCE v5.4.7
Started validating: C:\Users\Philipp\OneDrive\Desktop\EQ\Builds\VisualStudio2019\x64\Debug\VST3\EQ.vst3
Random seed: 0x2ea73e
Validation started: 6 Sep 2022 8:57:58pm

Strictness level: 5
Starting test: pluginval / Scan for known types: C:\Users\Philipp\OneDrive\Desktop\EQ\Builds\VisualStudio2019\x64\Debug\VST3\EQ.vst3...
Num types found: 0
!!! Test 1 failed: No types found
FAILED!!  1 test failed, out of a total of 1

Finished validating: C:\Users\Philipp\OneDrive\Desktop\EQ\Builds\VisualStudio2019\x64\Debug\VST3\EQ.vst3

That means that either the .vst3 file doesn’t exist or no plugins can be found in it for some reason.

You’re using quite an old version of pluginval though, can I suggest updating to v1.0.1 and seeing if you get the same error?

Now I have rebuild the VST3. I got more information about the error:

Random seed: 0x939b5d
Validation started
Strictness level: 5
Starting tests in: pluginval / Scan for plugins located in: C:\Users\Philipp\OneDrive\Desktop\EQ\Builds\VisualStudio2019\x64\Debug\VST3\EQ.vst3...
Started validating: C:\Users\Philipp\OneDrive\Desktop\EQ\Builds\VisualStudio2019\x64\Debug\VST3\EQ.vst3
Num plugins found: 0
!!! Test 1 failed: No types found. This usually means the plugin binary is missing or damaged, an incompatible format or that it is an AU that isn't found by macOS so can't be created.
FAILED!!  1 test failed, out of a total of 1

Finished validating: C:\Users\Philipp\OneDrive\Desktop\EQ\Builds\VisualStudio2019\x64\Debug\VST3\EQ.vst3

Finished batch validation

How can I create the binary or the AU?

Are you sure this EQ.vst3 file exists and is valid?
Does it load in other hosts/DAWs?
Does it load in the juce audio plugin host example?

Just to clarify that, the term binary means a compiled version of your plugin, so the VST3 is a binary. This error means that pluginval simply does not find your plugin

Yes, i can run the .exe file in the ‘Standalone Plugin’ folder. The modification date of the EQ.vst3 is the time, when I rebuild the vst3 file.
There is an error in Juce-Plug-In-Host at the scan.

I deleted all the database code and the code that writes to/reads from files. So it was just the equalizer itself. It worked there. Pluginval gave no error and Juce-Plug-In-Host worked too

It sounds like you’re doing something in the code then which is stopping the plugin from initialising.
You might need to attach the debugger to the JUCE Audio Plugin Host example (or you could do this with pluginval) built in debug mode and step through the initialisation process to see where its failing when you have the database code in place.

1 Like

When I debugg the scan of the valid plugin, typesFound.size() = 0 so the plugin failed.

That is the file Juce_PluginDirectoryScanner.cpp

this are the values of typesFound.

I mean by stepping through VST3PluginFormat::findAllTypesForFile as the plugin is scanned.
It might be that the dll can’t be loaded or could be a problem finding the descriptions from the VST3 factory.

I hope that is the right thing,

I think that the path of the dll File is not the right, that is the VST3 file, not the .dll file.
I tried the other VST3, witch works, that has the factory value of nullptr

I tried to load in the plug-in in Fl-studio. The first one is the .vst3 file, the second is the .dll file. The .dll has 32 Bits.

But I created the VST3 with 64 Bit. is there an error while creating?