I have a Delphi/Seattle FireMonkey project that runs with no problems that I've just moved to Berlin.
After a clean build, I now get an access violation when run as Win32 or Win64.
More specifically:
1) The problem occurs if the application includes a form that has a TWebBrowser. If that form is not created by the application, then the access violation does not occur.
2) The problem occurs in TCustomWebBrowser.FormHandleDestroyed in FMX.WebBrowser.pas. (FormHandleDestroyed and FormHandleCreated are evidently new procedures added with Berlin).
3) The problem occurs with the line FURL := FWeb.URL; as FWeb is nil and there is no check against this member being nil.
4) Invoking any menu item on a form results in the access violation (the form with the TWebBrowser has not even been used and is not visible).
5) Here's the bottom of the stack trace when the access violation occurs:
FMX.WebBrowser.TCustomWebBrowser.FormHandleDestroyed(???,???) System.Messaging.TMessageManager.TListenerList.IterateAndSend($50C3A5,$19FB70) System.Messaging.TMessageManager.TListenerList.SendMessage($5E70E30,$8983220) System.Messaging.TMessageManager.SendMessage($5E70E30,$8983220,True) FMX.Forms.TCommonCustomForm.DestroyHandle FMX.Forms.TCustomForm.DestroyHandle FMX.Forms.TCommonCustomForm.Recreate FMX.Forms.TCommonCustomForm.HandleNeeded FMX.Forms.TCommonCustomForm.Show Listings.TListingsForm.ActionItemDetailsExecute($5E906B0) System.Classes.TBasicAction.Execute FMX.ActnList.TCustomAction.Execute System.Classes.TBasicActionLink.Execute(???) FMX.Controls.TControl.Click FMX.Menus.TMenuItem.Click FMX.Menus.TClickList.DoClicks($88DE250) FMX.Types.TTimer.DoOnTimer FMX.Types.TTimer.Timer FMX.Platform.Win.TimerCallBackProc(0,275,25782,3462593) :73e884f3 user32.SetManipulationInputTarget + 0x53 :73e644f7 ; C:\WINDOWS\SysWOW64\user32.dll :73e6661f ; C:\WINDOWS\SysWOW64\user32.dll :73e66300 user32.DispatchMessageW + 0x10 FMX.Platform.Win.TPlatformWin.HandleMessage :00894704 Fmx::Platform::Win::TPlatformWin::HandleMessage(Self=????) FMX.Platform.Win.TPlatformWin.Run FMX.Forms.TApplication.Run
Does anybody have any suggestions as to a workaround to this problem?
I could probably add a check to see if FWeb is nil, but the problem more likely has to do with the reason that FormHandleDestroyed() is being called.
Thanks for the help, in advance,
Dan