Can I please ask you to provide a sample source app with which we can reproduce this here. In our demo apps using markers, no error can be seen here.
Ok, time for me to come clean and eat humble pie. In my application I was inadvertently indirectly freeing FBounds after the markers had been loaded. This had been in my code for years but only just started causing problems. After changing this everything works fine. I apologise for the inconvenience caused and infering that the problem was in WebGMaps.
We are experiencing the same issue.
Our findings, if you comment out the new hooks stuff, the AV goes away (or exit early)
<DELPHI>
procedure TWebGMaps.InstallHook;
var
frm: TCustomForm;
begin
exit; //<- Bail out to avoid AV
if not Assigned(HookedForms) then
HookedForms := TList.Create;
if not Assigned(HookedClients) then
HookedClients := TList.Create;
frm := GetParentForm(Self);
HookedClients.Add(self);
if HookedForms.IndexOf(frm) = -1 then
begin
HookedForms.Add(frm);
{$IFDEF DELPHI_UNICODE}
OldWndProc := TFarProc(GetWindowLongPtr(frm.Handle, GWL_WNDPROC));
NewWndProc := MakeObjectInstance(HookWndProc);
SetWindowLongPtr(frm.Handle, GWL_WNDPROC, LInteger(NewWndProc));
{$ENDIF}
{$IFNDEF DELPHI_UNICODE}
OldWndProc := TFarProc(GetWindowLong(frm.Handle, GWL_WNDPROC));
NewWndProc := MakeObjectInstance(HookWndProc);
SetWindowLong(frm.Handle, GWL_WNDPROC, LInteger(NewWndProc));
{$ENDIF}
FHooked := true;
end;
end;
procedure TWebGMaps.HookWndProc(var Msg: TMessage);
var
i: integer;
wgm: TWebGMaps;
frm: TCustomForm;
begin
exit; // <-Bail out to avoid AV
frm := GetParentForm(Self);
if Assigned(frm) and not (csDestroying in frm.ComponentState) then
Msg.Result := CallWindowProc(OldWndProc, frm.Handle, Msg.Msg, Msg.wParam, Msg.lParam);
if Msg.Msg = WM_CLOSE then
begin
RemoveHook;
if Assigned(HookedClients) then
begin
for i := HookedClients.Count - 1 downto 0 do
begin
wgm := TWebGMaps(HookedClients.Items);
frm := GetParentForm(wgm);
if (frm = GetParentForm(Self)) and (frm = Application.MainForm) then
begin
wgm.Free;
HookedClients.Delete(i);
end;
end;
if HookedClients.Count = 0 then
FreeAndNil(HookedClients);
end;
end;
end;
Not sure what this hook stuff is for but seems to work pretty good without ... and as a bonus no AV.
This was introduced for issues with specific updates of the Microsoft IE TWebBrowser control. For specific Windows 10 updates, Microsoft had broken this control and the implementation with the hooks was a workaround for the Microsoft breaking change.
I also had to comment out (Exit;) the hooks, giving AV on Windows 7.