Problem when upgrading to Hydra 5

Hi,

We’ve upgraded from Hydra 4 to Hydra 5. We’re using Delphi XE7 Pro, VS2015 and VS2017. And, now we are getting some errors when some of trying to load the plugins DLL module(mostly the plugin never loads and the application hangs and becomes Not Responsive). When we run the application through the Delphi IDE, we do see an Access Violation exception is raised when trying to load the plugin DLL(I did notice that the error occurs most often in the plugin’s initialization section at the line THYPluginFactory.Create). What makes it difficult to diagnose is that it is not all the plugin DLL modules that the error occurs in, and they all use the same set of components. And, it’s looks like to be the same plugin DLL modules that the error occurs, but not in a consistently, because sometimes that plugin module will load properly, but then it could be another plugin DLL module(that usually loads properly) that will raise the error on loading.

And, when we revert to back to Hydra 4, everything works as expected. So, at the moment we are using Hydra 4 because of this problem. And, we would prefer to be using Hydra 5, just to have the integration in VS2017 to help create new C# plugins.

When comparing the code of Hydra 5 against the code of Hydra 4, I noticed that there are some changes, maybe a little or significant change in architecture. Is it possible that some of these changes might be causing these exceptions?

1 Like

Hello

Which exactly Hydra 5 version do you use (ie what is the exact version # if .NET assemblies)?

Also could you create a simple testcase that reproduces the issue?

Thanks in advance

Hi,

The latest Hydra 5 version that we tried is 5.0.87.1149.

All the DLL modules that raised the exception are created with Delphi. We don’t have any problems with the .Net modules. Also, the host application is created with Delphi.

As for creating a simple testcase, I’ll see IF I can reproduce it in a simple testcase. As our application currently has 38 DLL modules created with Delphi XE7 and each DLL modules contains one or more plugins, and the problem has only occurred at the moment with 3 DLL modules, as we haven’t tested all of them(we’ve tested at least 10). The DLL modules are loaded dynamically as needed. And, we can’t reproduce the problem consistently.

At the moment, I’m under a time constraint to get the project completed, so this project will be completed with Hydra 4. I’ll try to reproduce in a simple testcase, once I have the time, either next week or the week after. If, I’m not able to reproduce in a simple testcase, we might have to schedule a time so that you can connect to my computer(using TeamViewer) to be able see what is happening and maybe help to diagnose the problem.

So this happens for both host and plugin parts being written in Delphi, no .NET involved? Am I right?

It only occurs in the plugin parts written in Delphi. The host works as expected, at least what I can see. And, the .Net plugins work as expected. By the time the error occurs, there have already been a few plugins written in Delphi and one .Net plugin that were loaded successfully. It seems to be the same plugins that always generate the error, but trying to find what combination that could be the cause is not obvious. And, everything works with Hydra 4.0.83.1133. The problem only occurs with Hydra 5 (I tried Hydra 5.0.87.1149 and Hydra 5.0.85.1141).

what plugins you are using: visual or non-visual?

try to update your code and load delphi plugins with LoadVCLModule instead of common LoadModule.
will it solve this problem?

I have a mix of both visual and non-visual. But, those given me problems happen to be visual plugins.

And, do you mean LoadUnmanagedModule, because I couldn’t find LoadVCLModule?

THYModuleManager / THYFMXModuleManager in 5.0.87.1149 have

function LoadVCLModule(FileName: string): THYCrossPlatformModule;

as I understand, you have problems with loading delphi VCL visual plugins into delphi host. Is it correct?

I checked the wrong code. After installing Hydra 5, I did see the function LoadVCLModule. I did try it, and no success.

And, I’m having problems loading VCL DLL modules that contain one or more visual plugins, but not all VCL DLL modules are giving me problems, only a few.

can you create a simple testcase that reproduces this problem, pls?
you can attach it here or send directly to support@

I’ll take some time next week for this.

I’ll try to trace through the code a little more deeper to see more precisely where the error occurs. Once I have a better picture of what is happening, I’ll try to reproduce it in a simple testcase. Because, at the moment, I don’t know what is the combination that causes the error, since it is only occurring in a few of the VCL plugin modules.

And, as I’ve mentioned before, I’m also willing to coordinate a time for you to connect to my computer remotely, in order to help with the debugging. But, I’ll try tracing in the code and create a simple testcase first. If, I’m unsuccessful to create a reproducible testcase, then it might be for you to connect to my computer remotely, to see what is happening.

I’ll let you know next week what my results are.