MantisBT - CMake
View Issue Details
0014868CMakeCMakepublic2014-04-08 14:062016-06-10 14:31
Brendan Shanks 
Patrick R. Gansterer 
normalmajoralways
closedmoved 
Visual Studio 2005/2008 SP1Windows XPSP3
CMake 2.8.12.2 
 
0014868: Visual Studio 2005/2008 crashes when debugging WinCE 6 CMake projects
Whenever I try to debug a Windows CE app with Visual Studio project files generated by CMake, Visual Studio crashes.
VS2005 and 2008 both crash in the same way: right after the EXE is deployed, with an access violation in devenv.exe (somewhere inside malloc())

I've only tested this with WinCE 6 and deploying/debugging on the emulator (using a generic BSP I built). If I create a new project from inside Visual Studio, debugging works fine.

It crashes after the EXE is deployed to the emulator, but if I make sure the msvcr DLL is copied to the same directory, the binary does work correctly (when launched from inside CE).

I have had this problem with both cmake 2.8.12.2 and cmake 3.0-rc3
Start with an extremely simple CMake project (like the one I attached).

> cd ce_cmake_test
> mkdir build
> cd build
> cmake -G "Visual Studio 9 2008 BKSEmulator_Rls (ARMV4I)" ..
Inside build, open ce_cmake_test.sln
Choose Debug->Start Debugging
After the deploy to the emulator succeeds, Visual Studio crashes ("Microsoft Visual Studio has encountered a problem and needs to close")
No tags attached.
zip ce_cmake_test.zip (998) 2014-04-08 14:06
https://public.kitware.com/Bug/file/5125/ce_cmake_test.zip
Issue History
2014-04-08 14:06Brendan ShanksNew Issue
2014-04-08 14:06Brendan ShanksFile Added: ce_cmake_test.zip
2014-04-08 14:08Brad KingAssigned To => Patrick R. Gansterer
2014-04-08 14:08Brad KingStatusnew => assigned
2014-04-09 22:56Brendan ShanksNote Added: 0035663
2016-06-10 14:29Kitware RobotNote Added: 0042530
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035663)
Brendan Shanks   
2014-04-09 22:56   
I figured out the cause and something of a workaround--if I set the solution's "Single startup project" to be the actual project (like "ce_cmake_test") rather than ALL_BUILD, debugging works without crashing Visual Studio!
(0042530)
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.