JVM crash/hang when rapidly/frequently loading urls

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

JVM crash/hang when rapidly/frequently loading urls

Postby Aaron » Fri Apr 15, 2016 10:05 am

I'm using JCEF embedded in a Swing app, and have it configured such that URLs are loaded in the browser in response to users clicking on rows in a table. The URLs are loaded in the following fashion:

browser.loadURL(somePostRequest.getURL());
browser.loadRequest(somePostRequest);

The two-step loading approach was implemented after observing that calling browser.loadRequest() alone w/ a POST CefRequest object did not seem to trigger anything happening. I followed along in the debugger all the way until it got into native code and after that nothing happened, and the various browser handler callbacks that get called as part of loading a URL were never triggered. This itself may be a bug, but calling loadURL() first seemed to be a work around.

Anyway, the issue I'm seeing is that occasionally if I click on rows in rapid succession, the application will freeze and I'll get a popup stating "Java Platform SE binary has stopped working". To be exact, it seems to happen after I click around a lot, and then wait for a couple seconds, and then click again. The Exception Information in the generated .hdmp file states "The thread tried to read from or write tow a virtual address for which it does not have the appropriate access."

I suspect there's something racy going on in the bowels of CEF which could take some time to identify/fix; what I'm really interested in though is if there's any way(s) I can insulate myself from this crashing my app. Is my two-step URL launching approach exacerbating the problem? Are there steps I can take within my app to prevent the conditions that cause this from happening?

I'm using CEF version 3.2526.1366.g8617e7c and a build of JCEF through commit a5f1e20ac81. I'm using Java 1.7.0_76 but I believe I was also able to reproduce using 1.7.0_79.

Let me know if any other information is needed. Thanks in advance for any help you can provide.
Aaron
Newbie
 
Posts: 8
Joined: Fri Dec 18, 2015 9:53 am

Re: JVM crash/hang when rapidly/frequently loading urls

Postby yolaiyoqu » Mon Jul 04, 2016 10:29 pm

Hi Aaron,

I met the same issue. Have you solved it? Thanks.
yolaiyoqu
Newbie
 
Posts: 2
Joined: Tue May 31, 2016 1:47 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 42 guests