Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To Run CEF4Delphi with Delphi_FMX_Linux/FMXExternalPumpBrowser2 #422

Open
Stefan1286b opened this issue May 31, 2022 · 10 comments
Open

Comments

@Stefan1286b
Copy link

Hi.
I've been trying to compile and start Delphi_FMX_Linux/FMXExternalPumpBrowser2 for hours now. Without success.
I use Delphi 11.1 Architect with FMXLinux 1.69
Start it with PAServer on Ubuntu 18.04 LTS with all Updates.
I can start every other FMXLinux Application.
linux
win

@Stefan1286b
Copy link
Author

In the middle of the Linux Console you see an error. This is because I copied CEF with user root and not changed the permissions.

@salvadordf
Copy link
Owner

The FMX initialization in Delphi 11 seems to have changed. I'll have to ask for some favors to test this because I only have a Delphi Pro license.

@salvadordf salvadordf added the bug label Jun 1, 2022
@Stefan1286b
Copy link
Author

Stefan1286b commented Jun 1, 2022

I've tested it now with Delphi 10.4. But it is the same problem.
FMXLinux 1.65

@Stefan1286b
Copy link
Author

can it be some other error since it doesn't work with Delphi 10.4 either?

@salvadordf
Copy link
Owner

I'll try to implement the Linux work scheduler in a similar way than the CEF sample application to see if that's a requirement now.

The Lazarus demo with an external pump is also having initialization problems with the last CEF binaries. I'll try to fix that first and then I'll ask for favors to test the Delphi solution because I only have a Delphi Pro license.

Sorry if this is taking too long.

@salvadordf
Copy link
Owner

After implementing the new Linux work scheduler I still get the same issue with all browsers using an external message pump in Linux.

The previous CEF4Delphi release which included Chromium 101 didn't have this issue. Please keep using the previous release.

I'll check again all code changes in CEF 102.

@salvadordf
Copy link
Owner

I'm getting this error on the terminal when I try to run some (all?) Linux demos built with Lazarus with GlobalCEFApp.MultiThreadedMessageLoop set to false.
Gtk-ERROR **: 15:27:45.937: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported «trap» para punto de parada/seguimiento (core' generado)`

@salvadordf
Copy link
Owner

The CEF project maintainer said that GTK3 is enabled by default. GTK3 is required by the Chrome runtime. Client applications using GTK2 will now require a custom build of CEF with use_gtk=false set via GN_DEFINES.
https://bitbucket.org/chromiumembedded/cef/issues/2969/support-chrome-windows-with-cef-callbacks#comment-60072383

The update to CEF 102 included this :
https://bitbucket.org/chromiumembedded/cef/branch/5005?dest=4951#Llibcef/browser/alloy/alloy_browser_main.ccT106

It seems that it's necessary to use only GTK3 when GlobalCEFApp.MultiThreadedMessageLoop is false.
CEF4Delphi still uses GTK2 in several units and that needs to be changed.

@salvadordf
Copy link
Owner

salvadordf commented Jun 25, 2022

The latest update includes some Lazarus demos using GTK3.
They use GlobalCEFApp.MultiThreadedMessageLoop := false and they work correctly.
The new OSRExternalPumpBrowser demo for GTK3 is similar to FMXExternalPumpBrowser2 but the FMX demo is not fixed yet.

@salvadordf
Copy link
Owner

The latest update fixes this issue but it's also necessary to modify the FMX.Platform.Linux.pas unit in FMXLinux in order to avoid an access violation.
https://bitbucket.org/crossvcl/fmxlinux/issues/254/cef-initialization-with-fmxlinux

Please, download the latest CEF4Delphi version and test this on your computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants