I think I have figured this out. Within my application I need to call: const DWORD mode = SetErrorMode(SEM_NOGPFAULTERRORBOX); SetErrorMode(mode | SEM_NOGPFAULTERRORBOX); _set_abort_behavior( 0, _WRITE_ABORT_MSG);
The first two lines cover general protection fault type problems, and the third line covers anyone calling abort() in Debug builds. With this code in place all forms of error that I listed now result in failed builds reported by CruiseControl.NET, in both Debug and Release. The only downside is that the CruiseControl.NET logs are almost completely empty, and give no clue as to what has gone wrong. :( This is still better than it reporting a build timeout. 2009/4/27 Paul Richards <[email protected]>: > Hi, > We use CruiseControl.NET to automate testing of our C++ application. > > When our application fails, sometimes it will present a crash dialog > box. This is bad because effectively the automated build process is > hung until CruiseControl.NET times out the build and kills the > executable. This occurs regardless of whether a user is logged in to > the machine. > > These dialogs are not of our own doing. Some come from the debug CRT > (e.g. abort()) and others are the usual crash dialog presented by the > OS. > > Is there a way to suppress all crash dialogs on our autobuild machine > so that all failure modes of a C++ application result in a timely > reporting of failure? (Rather than waiting for the build timeout to > be reached.) > > > Sever failure modes of a C++ application cause this dialog problem for us: > > Throw uncaught C++ exception. > Call abort(). > Dereference NULL. > Call __debugbreak(). > > > > -- > Paul Richards > -- Paul Richards
