Notes |
|
(0035374)
|
Brad King
|
2014-03-10 12:37
|
|
I cannot reproduce this:
$ ctest --version
ctest version 3.0.0-rc1
$ ctest -C Debug -R hc
(popup appears)
$ ctest --interactive-debug-mode 0 -C Debug -R hc
(popup does not appear)
$ ctest -M Experimental -T Test -C Debug -R hc
(popup does not appear) |
|
|
(0035375)
|
Mathieu Malaterre
|
2014-03-10 13:07
|
|
Ok, that's what I feared.
Anyway for reference on my system (Vista Pro SP2/32bits, Visual Studio Express 2010), I always get a heap corruption doing:
$ cat hc.cxx
#include <windows.h>
int main()
{
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
char * p = new char[10];
for( int i = 0; i < 500; ++i ) p[i] = i;
delete p;
return 0;
}
$ cl hc.cxx
$ cl.exe -> NO message box
however:
$ cl /MDd hc.cxx
$ cl.exe -> message box for heap corruption appear !
Just for info, SetThreadErrorMode is not available on my system. |
|
|
(0035376)
|
Mathieu Malaterre
|
2014-03-10 13:21
|
|
For reference, with:
$ cl /MDd hc.cxx
and
$ cl /MTd hc.cxx
I get a message box. With
$ cl /MD hc.cxx
and
$ cl /MT hc.cxx
I do not get a message box. |
|
|
(0035378)
|
Brad King
|
2014-03-10 13:47
|
|
Re 0014801:0035376: I observe that behavior too: Debug builds get the popup without suppression, Release builds do not get the popup.
The inconsistency is that the suppression works for me. |
|
|
(0035380)
|
Mathieu Malaterre
|
2014-03-11 04:56
|
|
Well that's odd.
For reference (tested on Win7/64bits and Win Vista Pro/32bits), anytime my project is compiled with CMAKE_BUILD_TYPE:Debug I cannot get proper behavior for --interactive-debug-mode 0. All other build type (Release RelWithDebInfo MinSizeRel) are working as expected.
I'll switch the openjpeg dashboard to use RelWithDebInfo.
You can close the issue. |
|
|
(0035381)
|
Mathieu Malaterre
|
2014-03-11 06:06
|
|
|
|
(0035382)
|
Brad King
|
2014-03-11 08:57
|
|
Re 0014801:0035380: Okay, resolving as "suspended" pending further discoveries.
|
|
|
(0035932)
|
Mathieu Malaterre
|
2014-05-26 15:49
|
|
|
|
(0035933)
|
David Cole
|
2014-05-26 16:04
|
|
CMake/CTest/CPack do not need CrtSetReportMode calls in them... Your test program does.
The test program is the thing that's popping up the dialog, and then ctest is timing out because there's a dialog waiting for user input.
You should put the CrtSetReportMode calls into your test app to prevent the dialog from popping up if that's what you want to do. |
|
|
(0035936)
|
Mathieu Malaterre
|
2014-05-27 03:00
|
|
thanks david. My initial goal is fairly simple I need to have --interactive-debug-mode 0 behave properly when building in Debug mode. In which case the patch needs to go instead in the cmake: `create_test_sourcelist` code generation.
comments ? |
|
|
(0035937)
|
David Cole
|
2014-05-27 06:06
(edited on: 2014-05-27 06:09) |
|
Perhaps something like this in your code before your create_test_sourcelist call:
set(CMAKE_TESTDRIVER_BEFORE_TESTMAIN "
#ifdef _MSC_VER
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
#endif
")
(from analysis of CMake's Templates/TestDriver.cxx.in ... you may need an extra include, too)
I think it belongs in your project still, not in CMake itself. Perhaps some people want this and others don't. The popup window is very convenient for immediately notifying an interactive user that something is wrong and I would not want to suppress it in general.
|
|
|
(0042505)
|
Kitware Robot
|
2016-06-10 14:29
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|