Closed kcfresh53 closed 1 year ago
@kcfresh53 hi ! Are you with Windows or Linux ? Can you share your project as zip in this ticket or share a link (or send it to my email if you want to keep it private) I'll investigate (you shared me CEF logs but my code also make logs (probably not displayed with Windows)) but seems to me the "scene" is not the root cause because in our project https://github.com/stigmee/stigmee the CEF node was on a scene. Maybe in your script you are closing the scene and reopening it and CEF was closed.
@kcfresh53 I may have understood what you have made wrong: you only need one instance of CEF for the whole project. No more :) You should let consider it as the "engine" and be singleton i.e. the Godot update function is implicitly "pumping" CEF internal messages between CEF forked processes:
Therefore, do not confuse CEF with its browser views (aka tabs ... I do not know to name things, I hope the name is correct) that you are allowed to create as many as you want. My code is probably detecting that you are trying to create 2 CEF instances ...
... and an error message is displayed (readable in the Godot console ?) ...
... and abort.
Why do you need one CEF for each of your "Navigat" (ion panel ?) ? When you create a new browser view, it will be created as Godot node as a child of the CEF node. Contrary to Unity, Godot does not display them in the scene graph. Let these "private" nodes in peace : the creation function will return you their node reference, and you can store them as variables in your "Navigat" nodes.
Note : For the moment, I never tried to delete browser views there is maybe a crash because CEF and Godot both reference them.
Thanks for the response, I am on windows and CEF is only used once in the project. The other pages do not hold a web view, the project is an app development base framework with customizable mobile components, multi database support (e.g superbase, firebase, SQL, etc.) and I planned on using the WebView to view native JavaScript components, local html pages, Leaflet JS maps and faster integration of other payment providers in Godot. I plan on the project being open source but its not ready yet so I will just send a project invite.
Beware CEF is not supported on Android and IOs https://magpcss.org/ceforum/viewtopic.php?f=6&t=18268
@kcfresh53 I have created a dev-cef branch in your project and added CEF node and 2 texture rectangles inside the 1st and 2nd panel. I added a Main.gd to your main node for the logic. Only the second browser reacts to mouse inputs, you have to add the logic to enable the good browser. You can follow my demos to add more features for your CEF.
It works nicely on my side so we can close this ticket I guess. We can continue talking about your project by email if you want :)
First off thanks for the amazing project, I have a similar issue to this but it has a unique cause. The web view works when run within its own scene but when put as a child of another scene it crashes with no errors present. This is the image of the web view scene:
and this is the structure of the other scene:
No matter the scene I place it in, as long as it is a child of another node, it will crash. I also tried copying a known working project and it still crashes but the demos work.
Here is what my log file is reporting:
If the issue is from my end, any help would be highly appreciated.