question

DTL avatar image
0 Votes"
DTL asked DTL commented

VS2008 MFC applications crash on VS2019 build

I have a large number of MFC C++ applications that were being built on Visual Studio 2008 by a 3rd party. They continue to be stable with Release builds from VS2008. After building Release builds on VS2019 we have reports of the applications crashing, seemingly randomly. One cause of a single application crashing was due to an uninitialized variable. However we don't know if we've caught all instances of this problem in that application, let alone the dozens of other applications still building on VS2008.

The previous vcproj project files have been automatically updated to vcxproj using build target 142. This legacy codebase has no automated testing.

I cannot find a Visual Studio 2008 Standard installer for us to run our own VS2008 builds to diagnose this problem. Plus as I understand it VS2008 won't install on Windows 10 anyway.

Are there any guides on what has changed since VS2008 to introduce this issue or any tools to help find all areas of the code that would cause a crash in VS2019, but not in VS2008?

c++
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DavidLowndes-6766 avatar image
0 Votes"
DavidLowndes-6766 answered DTL commented

I'd recommend that you build with code analysis to see if it can identify any suspect source code. I'd also test (as thoroughly as you can) a debug build of your program, compiled with the run-time checking options enabled.

It feels odd answering someone with the same name :)

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Initially I was scratching my head wondering why you were answering your own question! :)

2 Votes 2 ·

Haha, yes I've seen your posts and was like "I can't remember writing that!" lol :)

0 Votes 0 ·
RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered

Maybe try using static analysis tools on the codebase. Also MS has VC++ visual-cpp-change-history-2003-2015


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.