Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Blank{GUID} error in FMX Win32

 Post Reply Post Reply
Author
Helge Lange View Drop Down
Member
Member
Avatar

Joined: 18 Jun 2015
Posts: 81
Post Options Post Options   Quote Helge Lange Quote  Post ReplyReply Direct Link To This Post Topic: Blank{GUID} error in FMX Win32
    Posted: 20 Jun 2017 at 2:58pm
I ran across a strange error I didn't have before or I didn't notice.
When I use the FMX webgmaps in Win32 and I move it to another control (changing parent), it just is blank with the blank{guid} message.

I made an easy demo where I used a header/footer project, places a TLayout in the upper half and the map in the lower half and a speedbutton in the header. The speed button event has the following code (which works fine on Android)

procedure THeaderFooterForm.SpeedButton1Click(Sender: TObject);
begin
  WebGMap.Visible := False;
  WebGMap.Parent := Layout1;
  WebGMap.Align := TAlignLayout.Client;
  WebGMap.Visible := True;
end;

Any ideas how to make it work in Win32 ?
Helge
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jun 2017 at 3:32pm
Hi,

Can you try using the following code instead?

var
  WebGMap: TTMSFMXWebGMaps;
begin
  WebGMap := TTMSFMXWebGMaps.Create(Layout1);
  WebGMap.Parent := Layout1;
  WebGMap.Align := TAlignLayout.Client;
Back to Top
Helge Lange View Drop Down
Member
Member
Avatar

Joined: 18 Jun 2015
Posts: 81
Post Options Post Options   Quote Helge Lange Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jun 2017 at 3:42pm
As I understand the webgmap must be created on the mainform, right ?
The reason why I'm moving it around with the button is that in my "real" project that layout is on a TFrame, that is dynamically created.
So when I switch pages I just place TFrames inside a TLayout  on the mainform. At some frames I use the WebGMap, which is created on the mainform and then made invisible. If the frame is created that uses the map, I change the parent, the alignment and make it visible. In Android that works fine, but win32 gives me that error.

I'll try your solution, but I think it was made clear that i can't use webgmap that way directly on another form that is not the mainform
Back to Top
Helge Lange View Drop Down
Member
Member
Avatar

Joined: 18 Jun 2015
Posts: 81
Post Options Post Options   Quote Helge Lange Quote  Post ReplyReply Direct Link To This Post Posted: 20 Jun 2017 at 3:47pm
But strangely that works. I have to try that in Android, too :)
Back to Top
Helge Lange View Drop Down
Member
Member
Avatar

Joined: 18 Jun 2015
Posts: 81
Post Options Post Options   Quote Helge Lange Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jun 2017 at 3:41am
I still have some problem with it.
While the map is displayed perfectly in Android (FMX Win32 works fine) when I release the TFrame, i get problems in 

TTMSFMXAndroidWebGMapsWebBrowser.UpdateBounds;

Segmentation Fault.

Before I free the frame I call a frame proc call CloseView, it looks like this :

procedure TfMapView_Sucursal.CloseView;
begin
  WebGMap.Markers.BeginUpdate;
  WebGMap.Markers.Clear;
  WebGMap.Markers.EndUpdate;
  WebGMap.Visible := False;
  inherited;
end;

I clear the marker because this also causes problems when they're still there.
I also tried to dispose the map, but nothing, it still crashes at the same UpdateBounds...

Any Ideas ? Because in android this causes the app to close completely

Helge
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jun 2017 at 8:48am
Can you please provide a ready to run sample project so I can further investigate this issue?
Please also provide the version of Delphi and Android you are using.

Sample projects can be emailed to: mailto:help@tmssoftware.com
Back to Top
Helge Lange View Drop Down
Member
Member
Avatar

Joined: 18 Jun 2015
Posts: 81
Post Options Post Options   Quote Helge Lange Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jun 2017 at 3:57pm
Sent, my friend.
Back to Top
Helge Lange View Drop Down
Member
Member
Avatar

Joined: 18 Jun 2015
Posts: 81
Post Options Post Options   Quote Helge Lange Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jun 2017 at 4:02pm
Sorry, I forgot, I use android 6.0.1 (Galaxy S7 Edge) and Delphi 10.1 Berlin Upd 2. The map components are 2.8.0.2
Back to Top
Helge Lange View Drop Down
Member
Member
Avatar

Joined: 18 Jun 2015
Posts: 81
Post Options Post Options   Quote Helge Lange Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jul 2017 at 3:35pm
Hello TMS... did anything come out from that investigation with the sample app I sent you guys ?
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jul 2017 at 3:40pm
A reply was sent via email on Tuesday 04/07.

We have been able to trace and fix this issue.
The update will be available with the next release of the TMS FMX WebGMaps.
Back to Top
Helge Lange View Drop Down
Member
Member
Avatar

Joined: 18 Jun 2015
Posts: 81
Post Options Post Options   Quote Helge Lange Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jul 2017 at 5:31pm
you're absolutely right, I found your mail in spam for some reason :)

Thanks
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down