Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Application Defined Exception

Post Reply
User avatar
salvadordf
Posts: 4040
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Application Defined Exception

Post 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.
Post Reply