StopLoad() from OnLoadError()?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

StopLoad() from OnLoadError()?

Postby Sydius » Thu Jan 22, 2015 3:46 am

Is it okay to call StopLoad() from inside an OnLoadError() callback? The reason I ask is that, the vast majority of the time, it seems to prevent the default error text page from loading, but every now and then it doesn't and the default error text page loads. I can't repro it, but I have dumps where it's the only explanation I have. I'm interested in knowing if that's a known possibility or if I'm just not looking hard enough elsewhere in the dump.
Sydius
Newbie
 
Posts: 3
Joined: Thu Jan 22, 2015 3:41 am

Re: StopLoad() from OnLoadError()?

Postby magreenblatt » Thu Jan 22, 2015 10:24 am

By dumps you mean crashes? What OS and CEF version? Can you post the backtrace?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: StopLoad() from OnLoadError()?

Postby Sydius » Thu Jan 22, 2015 12:53 pm

Yeah, but it's crashing much later so the dump / stack trace wouldn't be that useful. I'm crashing in the OnLoadEnd() callback because of the presence of a "cef-error:" URL. I can see that the body of the page was replaced by an error message indicating that it had timed out. This is on Windows. We pulled it from http://chromiumembedded.googlecode.com/svn/trunk/cef1 @ rev 1103 and http://src.chromium.org/svn/trunk/src @ rev 176706 back in February of 2013.

I could fix it to not crash in the event of a cef-error URL, but I'd really like to know how it's even getting there. From my experimentation, if you don't call StopLoad() in the OnLoadError(), it seems to proceed to call OnLoadStart() and OnLoadEnd() for the error text. If you do call StopLoad(), it doesn't do that. I can't find any other way to end up in OnLoadEnd() with a cef-error URL.
Sydius
Newbie
 
Posts: 3
Joined: Thu Jan 22, 2015 3:41 am

Re: StopLoad() from OnLoadError()?

Postby Sydius » Mon Jan 26, 2015 11:04 pm

I don't suppose this is something that should work? Does anybody else stop the loading from the error handler?
Sydius
Newbie
 
Posts: 3
Joined: Thu Jan 22, 2015 3:41 am

Re: StopLoad() from OnLoadError()?

Postby Cromulus » Mon Feb 02, 2015 1:03 am

I thought it should work, but I recently had the same situation that also left me scratching my head. On Windows7/CEF1 I'd created the OnLoadError() callback to prevent error message pollution, and added StopLoad() in it to prevent the error from reaching OnLoadEnd(). Somehow, "cef-error:" still rarely gets through to there, which I didn't think was possible. Perhaps it's being generated by something other than the page load, like an internal error? I haven't come up with a good explanation yet.
Cromulus
Newbie
 
Posts: 1
Joined: Mon Feb 02, 2015 12:06 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 65 guests