APIKey Range check error

I have been chasing an issue where deleting a TListBoxItem in one of my forms (Android app) causes the app to crash; but only if the TTMSFNCGoogleMaps component on the form has a Google key. I haven't been able to narrow this down to a line of code which indicates that perhaps something is overwriting memory somewhere. When this sort of error occurs, I turn on range and overflow checking. I did this and it turns out that there is a range check error occurring when the Map component accesses the Google Maps key, either when set in the object inspector or within the code in the app.
To replicate this error, simply create a new app, drop a TTMSFNCGoogleMaps component onto it, set the key in the object inspector, turn on Range checking and build and run the app. It will get a range error even in Windows. I also tried the Demo app and it also had problems starting when Range checking is on.
I'm hoping that the APIKey range error is causing my original issue with my TListBoxItem as there is no known relationship between then other than being on the same form.
I would appreciate a fix for this soon, as the commercial app I have written is in testing and is supposed to be published shortly. Thanks!
I'm using Delphi 10.4.1 and maps v1.1.0.1 (with a few TMS approved mods)


We have tested this here and couldn't reproduce the issue. We have dropped a new instance on the form, entered our API key, turned on range checking in project->options->compiler. We have also dropped a TListBox on the form with some items in it, and a button to delete the items and still not able to reproduce the issue. Can you provide a sample (exlude your API key) or perhaps create the maps programmatically and see if the issue is reproducible?

Maybe the microsft edge version I have is too old. Can I ask what version you are using?
Also, make sure you build and not just compile. Thanks.

I'm using the stable version 86.0.622.48

I updated edge to 86.0.622.48 (same as yours) and also updated the map components to I did some tests using the attached project (a simple TTMSFNCGoogleMap on a form).
From my tests, it appears that there is a problem when compiled as a 32 bit target, on either Android or Windows when the Google key is used. I'm guessing when you tried it you compiled as a 64 bit target which works also for me.
Map test3.zip (7.4 KB)

We actually tested on a 32 bit project. Thanks for the sample, we'll investigate this here as soon as possible


We have managed to trace and solve this issue. It is an TMS FNC Core fix so we'll release an update at a later stage. The fix can be made in the FMX.TMSFNCPeristence unit @ line 840, replace

procedure TTMSFNCWriter.WritePropInfoValue(AInstance: TObject; const APropInfo: TTMSFNCPropertyInfo);
          Writer.WriteString(ColorToHTMLEx(GetOrdProp(o, p)))


procedure TTMSFNCWriter.WritePropInfoValue(AInstance: TObject; const APropInfo: TTMSFNCPropertyInfo);
  c: TTMSFNCPersistenceColor;
          c := TTMSFNCPersistenceColor(GetOrdProp(o, p));

Yes, that's fixed the problem. Thanks guys!
And, as I had hoped, the deleting a TListBoxItem problem in my app has now disappeared. Phew! That was a hard bug to find.
PS. If anyone else mods the code; enclose the two lines in a begin/end.

Thanks for reporting the issues are fixed Rodney ;)