Recently i upgraded to CE4Delphi 120.1.8.
Now i can't open more than one instance of my app anymore, the second instance will crash.
I tested with Simplebrowser demo , this is how to reproduce :
1 - Open Delphi, load SimpleBrowser demo. Compile and run it, it will run ok.
2 - Now, copy simplebrowser.exe to simplebrowser2.exe and run simplebrowser2.exe outside Delphi, it will run ok.
3 - Now repeat step 1 : on the line 'GlobalCEFApp.StartMainProcess', an AV is generated and the app crashes :
"Project SimpleBrowser.exe raised exception class $C0000005 with message 'access violation at 0x00000000: access of address 0x00000000'."
This problem did not happen on previous CEF / DCEF versions.
Any ideas about how to fix it ?
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.
Can't open more than one instance of app on CEF 120.1.8
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Can't open more than one instance of app on CEF 120.1.8
Last edited by thefunkyjoint on Fri Dec 22, 2023 6:33 pm, edited 1 time in total.
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: Can't open more of one instance anymore on CEF 120.1.8
PS : Looks like it's a CEF4Delphi issue, not CEF related...
I tested with the CEF sample program (cefclient.exe) and the crash won't happen.
I tested with the CEF sample program (cefclient.exe) and the crash won't happen.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Can't open more than one instance of app on CEF 120.1.8
CEF has changed the initialization and now it checks if other application uses the same GlobalCEFApp.RootCache value.
Read these threads for more information :
https://www.briskbard.com/forum/viewtopic.php?f=10&t=2208
https://magpcss.org/ceforum/viewtopic.php?f=6&t=19665
Read these threads for more information :
https://www.briskbard.com/forum/viewtopic.php?f=10&t=2208
https://magpcss.org/ceforum/viewtopic.php?f=6&t=19665
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: Can't open more than one instance of app on CEF 120.1.8

This is bad news... i'll try some workaround, maybe creating different directories for each instance.
I know the ideal is to have a tabbed browser, but there are people that like to open several instances of the app, don't ask me why

- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Can't open more than one instance of app on CEF 120.1.8
You can use a named mutex to detect a second instance.
Then send a message to the first instance to open a new tab.
Then send a message to the first instance to open a new tab.