Access Violation

Post Reply
fmesturini
Posts: 2
Joined: Thu Jun 06, 2019 1:27 pm

Access Violation

Post by fmesturini » Wed Jun 12, 2019 2:20 pm

Hi, my name is Felipe

I'm new in forum, so I started using TChromiun, it's a good component.
There's some machines that genereate an Acess Violation when I close my VCL Application, I follow all the steps to destroy the componentes.

I'll try to describe the problem.

When I try to destroy the GlobalCEFApp App object, the system raise an Access Violation error at TCustomForm class on method IsFormSizeStored, when it tries to access the property HorzScrollBar and VertScrollBar, but if I remove the TChormium componente from my project it doesn't happend.
So I think that this issue ocurres when I FreeAndNil GlobalCEFApp Object;

Anyone knows how to solve this problem?

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

Re: Access Violation

Post by salvadordf » Fri Jun 14, 2019 6:21 am

Hi,

You can create and destroy many TChromium components while the application is running but GlobalCEFApp can only be destroyed after you have closed all your forms, preferably in the last code lines inside the DPR file.

fmesturini
Posts: 2
Joined: Thu Jun 06, 2019 1:27 pm

Re: Access Violation

Post by fmesturini » Mon Jun 24, 2019 5:00 pm

Ok, thanks by the answer.

So, I modified to destroy de GlobalCEFApp at the last line of my .DPR, but I receive another error, the error is Access Denied, when the form that contains TChromiumWindow is destroyed.

I am using the component with the configuration above.

I have a form that show a HomePage with some information from my Company and I used subprocess to avoid that multiple instance of app was created, I follow the destriction steps from samples, any idea to solve this one?

Thanks.

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

Re: Access Violation

Post by salvadordf » Tue Jun 25, 2019 10:36 am

Perhaps some destruction step is missing or incomplete.

Do you have the same error when you run the SubProcess demo ?
That demo uses a TChromiumWindow component and a different EXE for the subprocesses, like your application.

If you still have problems consider using a TChromium and a TCEFWindowParent as shown in the SimpleBrowser2 demo.

TChromiumWindow works fine but the TChromium + TCEFWindowParent combination follows the CEF destruction events to the letter.

Post Reply