OSR and the calling of onAfterCreated

Having problems with building or using the JCEF Java binding? Ask your questions here.

OSR and the calling of onAfterCreated

Postby julianave1987 » Mon Oct 12, 2020 9:09 am

When I run my code locally with OSR set to FALSE the code doesn't seem to return from the onAfterCreated function of the addLifeSpanHandler. On the other hand when I set it to TRUE, 'onAfterCreated' gets called quickly and we have no problems. The kicker is my colleague has the exact opposite experience when running the exact same code.

I was wondering if anyone had any insight on this. We have clients with this same experience. On some of their computers it works and some it doesn't seem to. Are there any other settings I should be aware of, or any other checks I should do to determine if I should/could use OSR true or false?
julianave1987
Newbie
 
Posts: 7
Joined: Mon Oct 12, 2020 9:07 am

Re: OSR and the calling of onAfterCreated

Postby magreenblatt » Mon Oct 12, 2020 9:27 am

What OS and CEF/JCEF version? How does it behave with the detailed sample app?
magreenblatt
Site Admin
 
Posts: 12379
Joined: Fri May 29, 2009 6:57 pm

Re: OSR and the calling of onAfterCreated

Postby julianave1987 » Mon Oct 12, 2020 9:32 am

OS is Windows 10 Pro with the latest updates

CEF/JCEF Version is the most current - today I have done a GIT pull and re-built it:
Using:
JCEF Version = 84.3.8.267
CEF Version = 84.3.8
Chromium Version = 84.0.4147.105


This is the output of the detailed sample:

PS C:\git\java-cef\tools> .\run.bat win64 Release detailed
Offscreen rendering disabled
Using:
JCEF Version = 84.3.8.267
CEF Version = 84.3.8
Chromium Version = 84.0.4147.105
AppHandler.stateHasChanged: INITIALIZING
initialize on Thread[AWT-EventQueue-0,6,main] with library path .\jcef_build\native\Release
Added scheme search://
Added scheme client://
AppHandler.stateHasChanged: INITIALIZED
BrowserFrame.onAfterCreated id=1
julianave1987
Newbie
 
Posts: 7
Joined: Mon Oct 12, 2020 9:07 am

Re: OSR and the calling of onAfterCreated

Postby Czarek » Mon Oct 12, 2020 10:12 am

Anything interesting in logs when the issue occurs?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: OSR and the calling of onAfterCreated

Postby julianave1987 » Mon Oct 12, 2020 10:18 am

Unfortunately not. No exceptions get thrown, or at least no negative log output. I'm really helpless on this :(

I once let my application sit for ~50 minutes and then FINALLY onAfterCreated had been called, but when I used that part of my application it wasn't rendered properly.
julianave1987
Newbie
 
Posts: 7
Joined: Mon Oct 12, 2020 9:07 am

Re: OSR and the calling of onAfterCreated

Postby Czarek » Mon Oct 12, 2020 10:35 am

How are you running CEF message loop?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: OSR and the calling of onAfterCreated

Postby magreenblatt » Mon Oct 12, 2020 11:05 am

@julianave1987 the output that you show above looks correct for the detailed app. How does the app behave?
magreenblatt
Site Admin
 
Posts: 12379
Joined: Fri May 29, 2009 6:57 pm

Re: OSR and the calling of onAfterCreated

Postby julianave1987 » Mon Oct 12, 2020 11:17 am

Czarek wrote:How are you running CEF message loop?


We wrote a public class which extends the CefMessageRouterHandlerAdapter:

public class MessageRouterHandler extends CefMessageRouterHandlerAdapter

magreenblatt wrote:@julianave1987 the output that you show above looks correct for the detailed app. How does the app behave?


I guess, it behaves normally. How I would expect it to. A browser I can use to go to google or amazon. Buttons work and everything.



Some more info regarding the program. We have a jar file which gets called in a bat file. In our java code the same jar is called again with different parameters. In this second running of the jar file is where we initialize a seperate part of our program which is used for screen recording. Here is where we initialize and use the JCEF code to create a browser frame (for later) - and where it hangs
julianave1987
Newbie
 
Posts: 7
Joined: Mon Oct 12, 2020 9:07 am

Re: OSR and the calling of onAfterCreated

Postby magreenblatt » Mon Oct 12, 2020 11:30 am

In this second running of the jar file is where we initialize a seperate part of our program which is used for screen recording. Here is where we initialize and use the JCEF code to create a browser frame (for later) - and where it hangs

How are you running the jar file this second time?
magreenblatt
Site Admin
 
Posts: 12379
Joined: Fri May 29, 2009 6:57 pm

Re: OSR and the calling of onAfterCreated

Postby julianave1987 » Mon Oct 12, 2020 11:43 am

magreenblatt wrote:How are you running the jar file this second time?

Through a ProcessBuilder with a big list of arguments starting with java.exe including the -jar creator.jar argument.
julianave1987
Newbie
 
Posts: 7
Joined: Mon Oct 12, 2020 9:07 am

Next

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 5 guests