disable crash error dialog

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.

disable crash error dialog

Postby dcaputi » Mon Dec 08, 2014 2:40 pm

Chromium is crashing in my application on Windows 8/8.1 and CEF is handling the error OK.
The problem is that every time the child process crashes and restarts, the user sees the windows default "XYZ-Program has stopped working" pop-up dialog.

I just want to suppress that pop-up.

I've appended the command line switch "noerrdialogs" in ClientApp::OnBeforeCommandLineProcessing, but that doesn't help.
As a sanity test, I can reproduce this crash in Chrome and using that command line option works great.

Any ideas?

-Dan C.
dcaputi
Techie
 
Posts: 20
Joined: Thu Nov 21, 2013 9:38 am

Re: disable crash error dialog

Postby magreenblatt » Tue Dec 09, 2014 8:37 am

What CEF version? You can try:
Code: Select all
_CrtSetReportMode(_CRT_ASSERT, 0);
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: disable crash error dialog

Postby dcaputi » Tue Dec 09, 2014 9:43 am

Per MSDN: "When _DEBUG is not defined, calls to _CrtSetReportMode are removed during preprocessing."
Our production release is using CEF 3.1650.1562. This is the last stable binary release that worked well with Flash.

BTW, the crash is in an unwanted 3rd-party plugin (Light Spark) and I'm able to block the plugin from loading so the crash itself is not the problem.
I'm just trying to get a handle on the error reporting piece of this for future reference.

Is there a way to suppress the default Windows error handler in newer versions of CEF?
Ideally, if CEF was to recognize the --noerrdialogs command line switch, that would do it.

-Dan C.
dcaputi
Techie
 
Posts: 20
Joined: Thu Nov 21, 2013 9:38 am

Re: disable crash error dialog

Postby magreenblatt » Tue Dec 09, 2014 9:59 am

Newer versions of CEF support crash reporting which I believe results in this dialog being suppressed. See https://code.google.com/p/chromiumembed ... il?id=1131. You can dig through the breakpad code to identify what exactly causes the suppression.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: disable crash error dialog

Postby me12 » Thu Dec 11, 2014 4:42 am

(Only tested this on Windows 7. No idea if it works with Windows 8...)

You could use "SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);" for Windows, see: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

This would disable the error message box from the whole application not just child processes though.

If you are only interested to surpress the sub process crashes, extract them into a seperate executable.

If you dont know what I mean with this, see this quote:

By default the main application executable will be spawned multiple times to represent separate processes. This is handled via command-line flags that are passed into the CefExecuteProcess function. If the main application executable is large, takes a long time to load, or is otherwise unsuitable for non-browser processes the host can use a separate executable for those other processes. This can be configured via the CefSettings.browser_subprocess_path variable. See the “Application Structure” section for more information.
me12
Techie
 
Posts: 31
Joined: Thu Jul 10, 2014 12:46 pm

Re: disable crash error dialog

Postby Baxter15 » Wed May 18, 2016 2:41 pm

I'm using CEF build 2526. Has there been any fixes to allow the "noerrdialogs" switch to work? Our application recovers and reloads the browser and contents when the renderer crashes. We do not want the user to see the program crash dialog.
Baxter15
Techie
 
Posts: 18
Joined: Thu Jul 16, 2015 8:51 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 87 guests