jptechon
(jptechon)
April 15, 2015, 5:37pm
1
HI,
I use delphi XE7 update 1 Hydra 4.0.75.1103 build the sample Project VCLhost load FMXPlugin.
I can build successfully.
I can load FmxNonVisualPlugin and close the VCLhost successfully.
when I load FmxVisualPlugin and I show the FmxVisualPlugin and working currently.However, when I close the VCLHost. I get address violation at
ModuleManager.ReleaseInstance(Instance);
Any Idea?
1 Like
EvgenyK
(Evgeny Karpov)
April 16, 2015, 7:46am
2
odd. I’ve tried to reproduce this problem and It works as expected
my actions:
launch VCL host
select FmxVisualPlugin
create instance
close VCL host
jptechon
(jptechon)
April 17, 2015, 3:25am
3
Thank you. You are correct. I installed a blank windows and delphi XE7 and install Hydra only.
It works correctly.
I will check what other component that I installed introduce this problem.
Another Issue, I find on New installed blank XE7 on same project.
In the sample FmxVisualPlugin , I add one more form in it with simple tedit and button.
In one of the button the visual plugin, I show another form.
However, I can show the form correctly and then Once I click the Tedit control. The form get disappear.
< action: ,
launch VCL host
select FmxVisualPlugin
create instance
click show form button to show another form
click TEdit, then the form disappear
If you show the new form, then Click form title and move , then click tedit again, it wont disappeat but loss the cursor in it.
I attach the testing project.Bin.zip (1.0 MB)
Please advise.
jptechon
(jptechon)
April 17, 2015, 6:44am
4
Hi,
For address violation issue. The problem is depend on the machine. I can run in one machine that is no problem.
However , when I delivery to another machine. It has the same problem.
attached error when debug,
attached error when execute .
Any requirement on that?
Any hints on checking out the issue ?
joe
EvgenyK
(Evgeny Karpov)
April 17, 2015, 7:56am
5
if you enable debug dcu, disable optimization and launch it in debug mode, you will catch
First chance exception at $04BB1601. Exception class $C000001D with message 'system exception (code 0xc000001d) at 0x04bb1601'. Process vclhost.exe (3108)
callstack is
fmx.FMX.Forms.TCommonCustomForm.SetBorderIcons([biMaximize,biHelp,(out of bound) 5])
fmx.FMX.Platform.Win.TPlatformWin.ShowWindowModal($267DD10)
fmx.FMX.Forms.TCommonCustomForm.SendToBack
fmx.FMX.Forms.TCommonCustomForm.ShowModal
FmxVisualPlugin.TFmxVisualPlugin.Button2Click($2665B60)
...
so it is problem in FMX itself …
the same as I did:
enable debug dcu, disable optimization and launch it in debug mode
jptechon
(jptechon)
April 17, 2015, 8:54am
6
For the address violation problem,
After few test, it is related to the display card driver.
After I change new display card. it work correctly without any problem. Thank you for your help.
For the disappear issue:
You mean it is a fmx bug or what?
If I need a fmx visual plugin , click a button and show another fmx form , is it possible ?
As My case is:
I need in my XE7 vcl project , show a firemonkey form. Just Similar to the project I upload.
Any Suggestion on it?
Thanks, logged as bugs://71862
EvgenyK
(Evgeny Karpov)
April 20, 2015, 11:00am
8
Reproduced. Looks like they have changed something in initialization of FMX
EvgenyK
(Evgeny Karpov)
April 20, 2015, 1:14pm
9
as a temporary workaround, you can use this code:
TFmxVisualPlugin = class(THYFMXVisualPlugin)
private
fl: boolean;
procedure TFmxVisualPlugin.Button2Click(Sender: TObject);
begin
fl := True;
with TForm1.create(self) do
try
ShowModal;
finally
Free;
fl := False;
end;
end;
procedure TFmxVisualPlugin.HYFMXVisualPluginClose(Sender: TObject;
var Action: TCloseAction);
begin
if fl then Action:= TCloseAction.caNone;
end;
jptechon
(jptechon)
April 22, 2015, 3:36am
10
Thank you This solve the disappear issue but the Tedit control on focus without showing the cursor and when the button on focus normally you can press space key to click the button. The Newly show form also cant use this function.
Please help to check too,
jptechon
(jptechon)
May 11, 2015, 10:08am
12
When will be fix available for the Focus problem in the TEdit Control?
EvgenyK
(Evgeny Karpov)
May 12, 2015, 7:03am
13
we are working with this issue
jptechon
(jptechon)
May 13, 2015, 2:20am
14
Thank you for it and any suppose time frame on it? As we are checking the possible way to merge vcl and firemonkey in the same project.
Joe
EvgenyK
(Evgeny Karpov)
May 14, 2015, 6:02pm
15
Update uHYVisualPlugin_FMX.pas as
...
implementation
uses
WinApi.Windows, FMX.Platform.Win; //existing
{$HINTS OFF}
{$IFDEF DELPHIXE5UP}
type
THackApplication = class(TComponent)
private
FOnException: TExceptionEvent;
FRunning: Boolean;
end;
{$ENDIF}
{$HINTS ON}
procedure Application_SetRunningState;
begin
{$IFDEF DELPHIXE5UP}
THackApplication(Application).FRunning := True;
{$ENDIF}
end;
...
constructor THYFMXVisualPlugin.Create(AOwner: TComponent);
begin
Application_SetRunningState; //added
...
self.FormStyle := TFormStyle.{$IFDEF DELPHIXE6UP}Normal{$ELSE}fsNormal{$ENDIF}; //changed
...
end;
...
procedure THYFMXVisualPlugin.InitializeNewForm;
begin
..
Self.FormStyle := TFormStyle.{$IFDEF DELPHIXE6UP}Normal{$ELSE}fsNormal{$ENDIF}; //changed
..
end;
after this recompile Hydra_FMX_D## package
bugs://71862 got closed with status fixed.