Re: Application Defined Exception
Posted: Tue Jul 30, 2019 8:55 am
When I click on the "ShowBrowserChild" button I get this error :
In this case, TFraChromium.ChromiumLoadEnd is executing TMDIChild.BrowserDownloadComplete which calls CloseFormRefresh that frees TMDIChild.FFormRefresh
TMDIChild.FFormRefresh was created in TMDIChild.FormShow in the main thread but TFraChromium.ChromiumLoadEnd is executed in a CEF thread.
To avoid this problem, send a windows message to TMDIChild to destroy TMDIChild.FFormRefresh in the main thread.
That error is generated when some control was created and destroyed in different threads.System Error. Code: 5. Access denied
In this case, TFraChromium.ChromiumLoadEnd is executing TMDIChild.BrowserDownloadComplete which calls CloseFormRefresh that frees TMDIChild.FFormRefresh
TMDIChild.FFormRefresh was created in TMDIChild.FormShow in the main thread but TFraChromium.ChromiumLoadEnd is executed in a CEF thread.
To avoid this problem, send a windows message to TMDIChild to destroy TMDIChild.FFormRefresh in the main thread.