Page 1 of 1

Re: Application Defined Exception

Posted: Tue Jul 30, 2019 8:55 am
by salvadordf
When I click on the "ShowBrowserChild" button I get this error :
System Error. Code: 5. Access denied
That error is generated when some control was created and destroyed in different threads.

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.