Hi,
I am using VCL version 2.9.4.6 and am getting an access violation when closing the form that the map is on.
I cannot debug it as it keeps crashing Delphi (Tokyo 10.2.2 February 2018 patch).
It is happening in procedure TWebGMaps.HookWndProc on line:
Msg.Result := CallWindowProc(OldWndProc, frm.Handle, Msg.Msg, Msg.wParam, Msg.lParam);
The form it is on is an MDI Child and I am using DevEx Ribbons, etc.
Any help would be greatly appreciated.
Thanks,
Ken
Please use the latest version v2.9.4.7
This is actually the version I installed yesterday. The setup says it is v2.9.4.7 but after install the component version is still v2.9.4.6 and has the same problem.
I cannot reproduce a problem here. Does this problem happen with any of our demos? Does it happen when you just place TWebGMaps on a new VCL application?
I will investigate and reply but as per my message above. Is it possible that it is still v2.9.4.6?
If the installer mentioned 2.9.4.7 , it is the latest. I see in the repo version nr. was overlooked in the source.
Thanks, I cannot replicate this either. I think it is connected with the DevEx components although this was not happening previously.
It seems that when the form is closed and this line is executed:
Msg.Result := CallWindowProc(OldWndProc, frm.Handle, Msg.Msg, Msg.wParam, Msg.lParam);
that the form has already been freed.
But how can we reproduce this?
I would suspect that DevEx are also using hooks but not sure if changes on DevEx's part or yours have caused this to start happening. For now I have patched your code to stop this happening.
Could you inform about your patch so we can investigate whether this could be applicable in our release?
I'm afraid that I was too optimistic. Everything I have tried so far fails to work consistently.
I understand the difficulty.
This does not help I'm afraid.
I don't know if this helps but the block after is never entered.
if Msg.Msg = WM_CLOSE then
We'd really need to be able to reproduce this here.
If you are willing to download the DevEx trial I can provide some code.
I would prefer if this can be isolated with a project just using standard Delphi controls and our controls and there is a proof this way the problem is really in our code.
Ok. I will start stripping out code until I find the problem then, starting with the hook.
I need a bit of assistance please. I am only getting a problem if I load markers, if not, there is no error. I get an error when FMarkers id freed.Do you have any idea what could cause this?
And if I comment out FreeAndNil(FMarkers); in TWebGMaps.Destroy there is no problem when I have added Markers!