On Sonntag, 26. Dezember 2021 21:57:12 CET Andrew C wrote:
> *Diff patch for debugging/illustration purposes:*
> 
> Index: LS-DEBUG/src/engines/gig/InstrumentResourceManager.cpp
> ===================================================================
> --- LS-DEBUG/src/engines/gig/InstrumentResourceManager.cpp      (revision
> 4010)
> +++ LS-DEBUG/src/engines/gig/InstrumentResourceManager.cpp      (working
> copy)
> @@ -216,6 +216,8 @@
>     InstrumentEditor*
> InstrumentResourceManager::LaunchInstrumentEditor(LinuxSampler::EngineChanne
> l* pEngineChannel, instrument_id_t ID,
> void* pUserData) throw (InstrumentManagerException) {
>         const String sDataType    = GetInstrumentDataStructureName(ID);
>         const String sDataVersion = GetInstrumentDataStructureVersion(ID);
> +       fprintf (stderr, "Data type is %s and data version is %s\n",
> sDataType.c_str(), sDataVersion.c_str());
> +       fprintf (stderr, "Instrument plugin is %s\n",
> InstrumentEditorFactory::AvailableEditorsAsString().c_str());

The output of this was an empty string there, which means the sampler did not 
load *any* plugin DLL at all.

>         // find instrument editors capable to handle given instrument
>         std::vector<String> vEditors =
>             InstrumentEditorFactory::MatchingEditors(sDataType,
> sDataVersion);
> @@ -224,10 +226,16 @@
>                 fprintf(stderr,
>                     "ERROR: There is not any instrument editor registered
> to the sampler!\n"
>                     "[Cause: Make sure an instrument editor is installed to
> the sampler's plugin dir (%s)]\n",
> -                    InstrumentEditorFactory::PluginDirsAsString().c_str()
> -                );
> +
>                    InstrumentEditorFactory::PluginDirsAsString().c_str());
> +               if (InstrumentEditorFactory::FoundPlugins) {
> +                 fprintf (stderr,
> +                   "We found and registered plugins in %s at startup, but
> currently available plugins are:%s \n",
> +                    InstrumentEditorFactory::PluginDirsAsString().c_str(),
> +
>                  
> InstrumentEditorFactory::AvailableEditorsAsString().c_str()
> 
> +                  );
> +                };
>                 throw InstrumentManagerException(
> -                    "There is not any instrument editor installed and
> registered to the sampler"
> +                    "netcat seems to cause issues."
>                 );

Has nothing to do with netcat.

>             }
>             fprintf(stderr,
> Index: LS-DEBUG/src/plugins/InstrumentEditorFactory.cpp
> ===================================================================
> --- LS-DEBUG/src/plugins/InstrumentEditorFactory.cpp    (revision 4010)
> +++ LS-DEBUG/src/plugins/InstrumentEditorFactory.cpp    (working copy)
> @@ -44,6 +44,7 @@
>     std::map<String, InstrumentEditorFactory::InnerFactory*>
> InstrumentEditorFactory::InnerFactories;
> 
>     bool InstrumentEditorFactory::bPluginsLoaded = false;
> +    bool InstrumentEditorFactory::FoundPlugins = false;
> 
>     std::list<void*> InstrumentEditorFactory::LoadedDLLs;
> 
> @@ -287,6 +288,7 @@
>         }
>         closedir(hDir);
>         #endif
> +       InstrumentEditorFactory::FoundPlugins = true;
>         return true;
>     }

Wrong assumption. At this point it just *tried* to load plugins. It does not 
mean it was able to actually load any plugin successfully.

You should rather debug what happens in the loop above.

  for (dirent* pEntry = readdir(hDir); pEntry; pEntry = readdir(hDir)) {
    ...
  }

That loops iterares over all files found in the plugin dir and then tries to 
load every file that is actually a DLL file (i.e. filename ending with ".so").

> Index: LS-DEBUG/src/plugins/InstrumentEditorFactory.h
> ===================================================================
> --- LS-DEBUG/src/plugins/InstrumentEditorFactory.h      (revision 4010)
> +++ LS-DEBUG/src/plugins/InstrumentEditorFactory.h      (working copy)
> @@ -98,6 +98,7 @@
>         static String              PluginDirsAsString();
>         static std::vector<String> AvailableEditors();
>         static String              AvailableEditorsAsString();
> +       static bool                FoundPlugins;
>         static std::vector<String> MatchingEditors(String sTypeName, String
> sTypeVersion);
>         static void                LoadPlugins();
>         static void                ClosePlugins();





_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to