Random Address Violation during release instance


(jptechon) #1

HI,

I hit problem on release instance.

It seems related to the bitmap animation but I cant reproduce it easily.

I try to do a application to create and release in every 30s case. It will have exception in a hour or half hour case.

In our production application, it will random show the violation address during release the plugin.

Please advise how to locate the problem and how to solve.

My environment is : delphi 10.2.2 hydra version 5.0.89.1163.
I create a visual plug in fmx and load that plug in vcl.

Code to create instance:

begin
if MainFormInstance <> nil then
ModuleManager.ReleaseInstance(MainFormInstance);

// ModuleManager.CreateInstance(‘FmxVPForm_ScanCard’, MainFormInstance); //create a new instance
ModuleManager.CreateInstance(‘NewVisualPlugin_Menu’, MainFormInstance); //create a new instance
if MainFormPlugin <> nil then
MainFormPlugin.ShowParented(target_panel);
end

Code to release instance:
ModuleManager.ReleaseInstance(MainFormInstance);


(EvgenyK) #2

can this problem be related to bitmap animation component?
if you create a simple testcase w/o hydra but with the bitmap animation that is created and is released every 30s, AV will be reproduced?


(jptechon) #3

ok will try and let you know.


(EvgenyK) #4

by other hand, you can launch FMX plugin under debugger and you can get callstack.
btw, you can compile host & plugin w/o runtime packages