Windows Server 2008 - Console behavior??
Background: upgraded from Windows Server 2003 to Windows Server 2008 R2 Have an application written in VS2008 C++ build in debug x64. When I run the application on Window Server 2003, I receive a "Debug Assertion Failed" with three options in the popup, Abort, Retry, Ignore. When I select Abort, it application quits, and control returns back to the console prompt. When running the same app on Windows Server 2008, I receive the same assertion (expected) with the same three options. When I select Abort, the application shuts down, but so does the console. Is this by design? Is there a setting to prevent the console from closing in a situation like this? Any help is greatly appreciated. Thank You, finch
July 9th, 2012 11:12am

Might check the data execution prevention settings. Control Panel|System|Advanced|Performance|Settings|DEP Regards, Dave Patrick .... Microsoft Certified Professional Microsoft MVP [Windows] Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 9th, 2012 11:20am

Dave, thanks for your expedient reply. I checked both servers (WS2003 and WS2008), and they are both have DEP turned "On" with no additional entries added. Any other ideas?
July 9th, 2012 12:23pm

Might try entering an exception for your program. Also check the system and application event logs for errors. Regards, Dave Patrick .... Microsoft Certified Professional Microsoft MVP [Windows] Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 9th, 2012 12:27pm

Finch, How is the app being started? For me, aborting an assert on 2008 R2 works the same way it does on 2003: 1. If i launch the app (x64 debug) by typing the name in a cmd instance then the cmd instance stays running after the abort 2. If i lauch the app by double clicking it, then the console goes away after the abort in your instance is the cmd console going away after having started it from a cmd window? The innards of console app hosting has changed quite a bit between 2003 and 2008 R2 but on my vanilla boxes it seems to work the same way when it comes to asserts.Doug Kentner
July 9th, 2012 2:33pm

Hi Doug, The app is started via Windows scheduler, which calls the executable and passes it args. There are some details I left out of the initial report. The app called from scheduler runs,and will call CreeateProcess() to create new threads which will execute other tasks. On WS2003, if the code executing in the thread caused the assertion, control would return to the main process after clicking 'Abort' on the assertion dialog. On WS2008, after clicking Abort on the assertion dialog, not only does it kill the thread that caused it, but the process that spawned it as well. You had mentioned "The innards of console app hosting has changed quite a bit between 2003 and 2008 R2", can you point me in the direction of where I could find these differences documented? Thanks for your help Doug!!
Free Windows Admin Tool Kit Click here and download it now
July 9th, 2012 3:07pm

Finch, The primary change to console apps is best documented in the 6th edition Windows Internals Pt. 1, however the following give a good look as well: http://blogs.technet.com/b/askperf/archive/2009/10/05/windows-7-windows-server-2008-r2-console-host.aspx Basically all console was previously run under the Csrss.exe process, they've moved it out underneath a dedicated conhost.exe process now. I'd expect some changes in certain behaviors, this may be one of them (It would be interesting to walk this through with the debugger and watch what's happening) just so I'm clear, are you creating child processes or threads via the process you're calling from Task Scheduler? Doug Kentner
July 9th, 2012 5:00pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics